# Find x1 and x2

Algebra

### Find x1 and x2

Find $$x_{1 } and x_{2 }$$
Attachments
Picture1.png (3.84 KiB) Viewed 516 times
alg

Posts: 4
Joined: Sat Jun 29, 2019 10:13 pm
Reputation: 0

### Re: Find x1 and x2

Expand using matrix multiplication:
$$\begin{bmatrix} 1 & -1 \\ 1 & -2\end{bmatrix} \begin{bmatrix} x_{1 }\\ x_{2 } \end{bmatrix} = \begin{bmatrix} x_{1 } -x_{2 }\\ x_{1 } -2x_{2 } \end{bmatrix}$$
so
$$\begin{bmatrix} 5\\ 7 \end{bmatrix} = \begin{bmatrix} x_{1 } -x_{2 }\\ x_{1 } -2x_{2 } \end{bmatrix}$$
Then you can solve the simultaneous equations
$$5 = x_{1 } - x_{2 }\\ 7 = x_{1 } - 2x_{2 }$$
To find $$x_{1 }$$ and $$x_{2 }$$
Guest

### Re: Find x1 and x2

Another way to do this is to find the inverse to the matrix $$\begin{bmatrix}1 & 1\\ 1 & -1\end{bmatrix}$$ and multiply both sides of the equation by that inverse matrix.

To do that write the "augmented matrix" $$\begin{bmatrix}1 & 1 & 1 & 0 \\ 1 & -1 & 0 & 1 \end{bmatrix}$$, the given matrix with the identity matrix appended on the right. Now use "row operations" to reduce the original matrix to the identity matrix while applying the same row operations to the identity matrix.

There are three kinds or row operations:
multiply every number in one row by the same number
swap two rows
add a multiple of one row to another.

We have $$\begin{bmatrix}1 & 1 & 1 & 0 \\ 1 & -1 & 0 & 1 \end{bmatrix}$$ and we want $$\begin{bmatrix}1 & 0 & a & b\\ 0 & 1 & c & d \end{bmatrix}$$ where we need to determine a, b, c, and d. We already have a "1" in the upper left corner but we have a "1" below it where we want a "0". Subtract the first row from the second to get $$\begin{bmatrix}1 & 1 & 1 & 0 \\0 & -2 & -1 & 1$$ we want "1" in the low right where now we have "-2". Divide the second row by -2 to get $$\begin{bmatrix}1 & 1 & 1 & 0 \\ 0 & 1& 1/2 & -1/2\end{bmatrix}$$. Finally we have a "1" in the upper right where we want a "0". Subtract the second row from the first row to get $$\begin{bmatrix}1 & 0 & 1/2 & 1/2 \\ 0 & 1 & 1/2 & 1/2 \end[bmatrix}$$. So the inverse matrix to $$\begin{bmatrix} 1 & 1 \\ 1 & -1\end{bmatrix}$$ is $$\begin{bmatrix} 1/2 & 1/2 \\ 1/2 & -1/2 \end{bmatrix}$$.

You can check that is true by multiplying :
$$\begin{bmatrix} 1 & 1 \\ 1 & -1\end{bmatrix}\begin{bmatrix} 1/2 & 1/2 \\ 1/2 & -1/2 \end{bmatrix}= \begin{bmatrix}1/2+ 1/2 & 1/2- 1/2 \\ 1/2- 1/2 & 1/2+ 1/2\end{bmatrix}= \begin{bmatrix}1 & 0 \\ 0 & 1 \end{bmatrix}$$ and
$$\begin{bmatrix} 1/2 & 1/2 \\ 1/2 & -1/2\end{bmatrix}\begin{bmatrix} 1& 1 \\ 1 & -1 \end{bmatrix}= \begin{bmatrix}1/2+ 1/2 & 1/2- 1/2 \\ 1/2- 1/2 & 1/2+ 1/2\end{bmatrix}= \begin{bmatrix}1 & 0 \\ 0 & 1 \end{bmatrix}$$

So $$\begin{bmatrix} 1/2 & 1/2 \\ 1/2 & -1/2 \end{bmatrix}\begin{bmatrix}\begin{bmatrix}1 & 1 \\ 1 & -1 \end{bmatrix}\begin{bmatrix}x \\ y\end{bmatrix}= \begin{bmatrix}1/2 & 1/2 \\ 1/2 & -1/2\end{bmatrix}\begin{bmatrix}5 \\ 7 \end{bmatrix}$$
$$begin{bmatrix}1 & 0 \\ 0 & 1 \end{bmatrix}\begin{bmatrix} x\\ y \end{bmatrix}= \begin{bmatrix}x \\ y\end{bmatrix}= \begin{bmatrix}5/2+ 7/2 \\ 5/2- 7/2\end{bmatrix}= \begin{bmatrix}6 \\ -1\end{bmatrix}$$.

Of course with just a two by two matrix, it is much simpler to solve two equations in two unknowns as previously suggested. But "real life" problems might involve thousands of equations in thousands of unknowns so you need to use a very "mechanical" method such as this in a computer.
Guest