code: protected void checkSizes(Matrix A, Vector b, Vector x) {
          if (!A.isSquare())
              throw new IllegalArgumentException("!A.isSquare()");
          if (b.size() != A.numRows())
              throw new IllegalArgumentException("b.size() != A.numRows()");
          if (b.size() != x.size())
              throw new IllegalArgumentException("b.size() != x.size()");
      }
docs: Checks sizes of input data for {@link #solve(Matrix, Vector, Vector)}.
  Throws an exception if the sizes does not match.