So I have a math question regarding the least squares method. Given
$$A=\begin{bmatrix}-1&2\\0&0\\1&-2\end{bmatrix}$$
$$b=\begin{bmatrix}1\\-2\\3\end{bmatrix}$$
I want to derive the least-squares solution so I used $A^TAx=A^Tb$ with $A^T$ meaning $A$ transposed.
When calculating, I came to find that $$A^TA= \begin{bmatrix}2 &-4\\-4&8\end{bmatrix}$$
Now comes the problem. I have to get the inverse from this matrix, but the discriminant $= 0$. How do I solve this question when I can't inverse this matrix?
The final answer should be $$\begin{bmatrix}1\\0\end{bmatrix}+t\begin{bmatrix}2\\1\end{bmatrix}$$
Can someone help me out?