MATLAB: Solution when number equations is less than than the number of variables

linear algebralinear equationsmathematicsMATLABsolution methodssystem of equations

I am curious if there is some solution method in the case when we have the number of equation less the number of variables. For example, and X , Y are two variables. I would appreciate any guidance on this very basic querry.

Best Answer

There is no unique solution in general. That is, infinitely many possible solutions.
In this case, you have TWO variables, and ONE equation. So you could pick any value for X, substitute it into the equation, and then the value for Y is known, as long as b is not equal to zero. That is, you would compute
Y = (c - a*X)/b
Likewise, you could pick any value for Y, and then solve for X, as a function of Y. Again, that requires only that a is non-zero.
X = (c - b*Y)/a
Either approach is equally valid. There are also ways you can write a solution in the form of one that minimizes the norm of the vector [X,Y]. That is just another way to choose one of the infinitely many solutions.
So does a solution exist? Well, no. And, yes. But just not "a" solution. Any solution you desire.