Solving a System of Equations without a Square Matrix I am new to linear algebra.

I have:


a known Mx1 vector called y
a known MxN vector called X
an unknown Nx1 vector called a


such that:

$$
y = Xa
$$

I also know that


each row of X ($x1i ...x1N$, $x2i ...x2N$, etc.) is linearly independent
M &lt; N (i.e. there are more columns than rows in X)


How can I go about solving this system of equations?  If the matrix were square, I think I could just invert X and solve accordingly for a.  However, I know you cannot invert a non-square matrix.  Intuitively I think there is a solution because the rows are both linearly independent and of a higher dimension than the number of elements in y.  Any tips would be greatly appreciated!
There is a solution because the rank of $A$ is $M$ (so the transformation is onto $\mathbb F^M$).  

You could row reduce $A$ and then read off the solutions.
There are a number of ways of looking at this, you're going to have to look for a least squares solution.

Multiply throughout by $X^{T}$, this will give you a square system which you can solve.