Why can I solve an impossible equation using linear algebra?

If there are fewer equations than unknowns, usually there are many solutions. It is not impossible, but indeterminate.

An extreme example is this: one unknown, but no equation !


What MATLAB is doing, here, is finding a solution to the underdetermined system of equations that has the fewest possible non-zero elements. That is, it maximises the number of zeros in $x$.

MATLAB can also be applied to actually-unsolvable systems (overdetermined), in which it will give the "solution" with the smallest error (that is, the one that minimises $||Ax-b||_2$).


It is not impossible. The problem has a geometric interpretation which may clear things up for you. We know that all points $(x,y,z)$ on a plane in three-dimensional space satisfy equations of the form $Ax+By+Cz=D$. We may therefore interpret the equations $a+2b=8$ and $4b+3c=18$ as planes in three-dimensional space. We know that if two planes in three-dimensional space are not parallel to one another, then they must intersect along a line. Therefore, any point $(a,b,c)$ (like $(0,4,2/3)$, for example) that lies on this line will satisfy the system of equations in your question.

Here is a diagram to illustrate my point. The point $(0,4,2/3)$ is indicated, as well enter image description here

In order to actually find these points, if the line is not parallel to any of the axes, then you may simply pick a value for $a$, $b$, or $c$, leaving you with only two unknowns, and then solve the resulting system of equations as you would normally.