# LinearSolve dimensions Error

**URL:** <https://community.wolfram.com/t/linearsolve-dimensions-error/2156>\
**Category:** Questions\
**Tags:** mathematica, algebra\
**Created:** [May 7, 2014, 9:42pm UTC](https://community.wolfram.com/t/linearsolve-dimensions-error/2156 "2014-05-07T21:42:14Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![patchforever04](https://avatars.discourse-cdn.com/v4/letter/p/8c91f0/32.png) [@patchforever04](https://community.wolfram.com/u/patchforever04)\
**Post date:** [May 7, 2014, 9:42pm UTC](https://community.wolfram.com/t/linearsolve-dimensions-error/2156/1 "2014-05-07T21:42:14Z")

</div>

My Assignment is to set up and solve a system of equations to generate the coefficients of a quadratic (degree 2) interpolating polynomial for the population of Nebraska in the years 1900, 1950, and 2000 was 1,066,000, 1,326,000, and 1,713,000, respectively.

What does this error mean and how do I fix it?  
LinearSolve::lslc: Coefficient matrix and target vector(s) or matrix do not have the same dimensions. \>\>

MatrixForm[A = {{1, 1900, 1900^2}, {1, 1950, 1950^2}, {1, 2000, 2000^2}}]  
MatrixForm[b = {{1066000, 1326000, 1713000}}]  
x = LinearSolve[A, b]  
then I get the error

---

<div class="post-metadata">

**Author:** ![danl](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/danl/32/41267_2.png) [@danl](https://community.wolfram.com/u/danl)\
**Post date:** [May 7, 2014, 9:48pm UTC](https://community.wolfram.com/t/linearsolve-dimensions-error/2156/2 "2014-05-07T21:48:43Z")

</div>

In this case it means your rhs fails to have the correct dimension. It should be either a vector of 3 elements, or a matrix with 3 rows and any nymber of columns. What you have is matches neither of these.

---

<div class="post-metadata">

**Author:** ![patchforever04](https://avatars.discourse-cdn.com/v4/letter/p/8c91f0/32.png) [@patchforever04](https://community.wolfram.com/u/patchforever04)\
**Post date:** [May 7, 2014, 9:53pm UTC](https://community.wolfram.com/t/linearsolve-dimensions-error/2156/3 "2014-05-07T21:53:51Z")

</div>

O okay. Thank you.
