# Can't figure out how to solve matrix equation Ax=0

I tried googling how to solve this matrix through RREF and parametric variables but failed to find something that works similarly to try and solve myself.

A is a 2x3 matrix with the values going [ 2 -1 -1 : 1 -2 2 ] (imagine the set after the colon to be under the first set)

x is [x_1, x_2, x_3] but obviously a column instead of a row and for lack of subscript key I just used "_#" to denote the same thing.

0 is a 2 row x 1 column matrix with two 0's.

To start, I wrote out the matrix's into 2 equations.

2x_1 - x_2 - x_3 = 0

x_1 - 2x_2 + 2x_3 = 0

Then I turned it into a simplified coefficient matrix. [ 2 -1 -1 0: 1 -2 2 0] (with the second set of numbers past the colon under the first set)

Afterward, I reduced it into RREF form to get:

[ 1 0 (-4/3) 0 : 0 1 (-5/3) 0 ] (with the second set of numbers past the colon under the first set)

Once I got this, I turned the matrix back to these equations:

X_1 - (4/3)X_3 = 0

X_2 - (5/3)X_3 = 0

So then I set X_1 = (4/3)X_3 and X_2 = (5/3)X_3. I then tried setting X_3 to t to try and see if I could finagle an answer by solving for 't'. So far, my answers have been wrong every time in comparison to the answer my book gives. Can someone tell me if I messed up somewhere? I deduced it would have to be from my matrix reduction but I did it over a few times in different ways to make sure but I still can't seem to get the answer...

• Note that $x=0$ works and that's not interesting. What's interesting is trying to find all solutions. In that case you will necessarily have some free variables in your answer, if that's what is bothering you?
– Mark
Sep 8, 2018 at 8:27
• what is the answer in the book? Sep 8, 2018 at 8:28
• x_1 = t x_2 = 5/4t x_3 = 3/4t I guess I am looking for all solutions as I know the trivial solution works; I get really similar answers but my x_1 is not t, my x_3 is t. Sep 8, 2018 at 8:29
• @Charlatan Are you sure that's the answer? It does not tell you what $x_3$ could be
– Mark
Sep 8, 2018 at 8:31
• @Mark I pressed enter by mistake earlier Sep 8, 2018 at 8:32

The general method for solving a linear equation $$Ax=b$$ is to utilize the Moore-Penrose inverse $$A^+$$ and the associated nullspace projector $$P=(I-A^+A)$$
With these two matrices, the general solution can be written as $$x=A^+b + Py$$ where the vector $$y$$ is completely arbitrary.

Applied to the current problem this technique yields \eqalign{ &A=\begin{bmatrix}2&-1&-1\\1&-2&2\end{bmatrix},\quad &A^+=\frac{1}{50}\begin{bmatrix}\;\;16&\;\;\;2\\\;-5&-10\\-13&\;\;14\end{bmatrix},\quad P=\frac{1}{50}\begin{bmatrix}16&20&12\\20&25&15\\12&15&9\end{bmatrix} \\ & b=\begin{bmatrix}0\\0\\0\end{bmatrix} ,\quad p=\begin{bmatrix}4\\5\\3\end{bmatrix} &\implies P=\frac{\;\;pp^T}{50},\quad x=0+\frac{p(p^Ty)}{50} = \lambda p = \lambda\begin{bmatrix}4\\5\\3\end{bmatrix} \\ }

• Informative, but how does it help the OP find the error in his computation?
– amd
Sep 8, 2018 at 21:12
• it does strike me interested; I haven't learned this method before but it looks rather useful... How do you find A+ and P? Sep 11, 2018 at 9:40
• The definition $P=(I-A^+A)$ holds in all cases. In this particular case, the matrix rows have full rank and therefore $\;A^+=A^T(AA^T)^{-1}$. In general, $A^+$ can be hard to calculate manually, but most languages (Matlab, Julia, Python) provide a function.
– greg
Feb 9, 2021 at 15:19

You are right, indeed by the augmented matrix for the system and by row operation we obtain

$$\left[\begin{array}{ccc|c} 2& -1& -1& 0\\ 1& -2& 2& 0 \end{array}\right]\to \left[\begin{array}{ccc|c} 2& -1& -1& 0\\ 0& -3& 5& 0 \end{array}\right]\to \left[\begin{array}{ccc|c} 6& 0& -8& 0\\ 0& -3& 5& 0 \end{array}\right]$$

from which we obtain

• $x_1=\frac43 x_3$

• $x_2=\frac 53 x_3$

that means we have a free parameter and by $x_3=t$ the genral solution is

$$(x_1,x_2,x_3)=t\left(\frac43,\frac53,1\right)$$

which is equivalent to

$$(x_1,x_2,x_3)=t\left(4,5,3\right)$$

• the book gives the answer as x_1 = t; I suspect I may of done something wrong but this is the answer set I get. Sep 8, 2018 at 8:33
• This implies the book solution is wrong. In particular if $x_1 = x_2$, there is no way $Ax = 0$
– Mark
Sep 8, 2018 at 8:33
• @Charlatan I believe you have a fundamental misunderstanding on the meaning of a solution. It does not make sense to talk about $x_1 = t$ as a solution. A solution to the problem must be a statement about all the variables $x_1, x_2, x_3$ and how they relate to one another
– Mark
Sep 8, 2018 at 8:36
• I am using Larson's Elementary Linear Algebra 8th Ed; the question is from section 2.1 question 37. Although it could be the book, I feel like the book could be onto something I am not seeing. Sep 8, 2018 at 8:38
• Yes there must be simply a typo in teh solution or in the given matrix.
– user
Sep 8, 2018 at 8:39