Multiplying Matrices and getting all possible solutions

50 Views Asked by At

So I have the following exercise (Sorry for the terrible formatting)

Mx = B where

M= \begin{bmatrix} 1 & 2 & 3 \\ 4 & 5 & 6\\ 7 & 8 & 9 \end{bmatrix}

B= \begin{bmatrix} 3 & 2 & 1 \\ 6 & 5 & 4\\ 9 & 8 & 7 \end{bmatrix}

I solve for x \begin{bmatrix} -1 & 0 & 1 \\ 2 & 1 & 0\\ 0 & 0 & 0 \end{bmatrix}

I'm having trouble getting all the solutions which is given as

Assuming a,b,c are the free variables \begin{bmatrix} a-1 & b & 1+c \\ 2-2a & 1-2b & -2c\\ a & b & c \end{bmatrix}

How was this last matrix achieved?

1

There are 1 best solutions below

0
On BEST ANSWER

To break it down one at a time, take the system for the first column $Mx = b_1$ so that $$\begin{bmatrix} 1 & 2 & 3 \\ 4 & 5 & 6\\ 7 & 8 & 9 \end{bmatrix}\begin{bmatrix}a_1\\a_2\\a_3\end{bmatrix} = \begin{bmatrix}3\\6\\9\end{bmatrix}$$

That is, $$a_1+2a_2+3a_3 = 3 \\4a_1+5a_2+6a_3 = 6\\ 7a_1+8a_2+9a_3 = 9 $$

Solving, with respect to $a_3$ as free variable: $a_2 = 2-2a_3$, and $a_1 = -\frac{a_2}{2} = a_3-1$. That is,

$$x = \begin{bmatrix}a-1\\2-2a\\a \end{bmatrix}$$

Computationally, $M x_z = 0$ has nontrivial solutions since rank = 2, kernel = 1. Thus $x_z = a(1, -2, 1)$ by directly solving $M x_z = 0$, and $x_b = (-1, 2, 0)$ by solving $M x_b = b$.