## Problem on writing a linear system as a matrix equation

Write the following system as a matrix equation for $x,y,z$:\begin{align}
y +z &=4\\
2x -y &=z
\end{align}
• ## Solution

Recall that
In this problem, our unknowns are $x,y,z$, which we put into the vector $\bfx$: $$\bfx = \begin{pmatrix}x\\y\\z\end{pmatrix}$$
In order to put the system of equations into the form of a matrix equation, we move all unknowns to the left hand side: \begin{align}
y + z &= 4\\
2x -y -z &=0
\end{align}
Recall that
We identify that $y + z$ is the dot product of $(0, 1, 1)$ with $(x,y,z)$.
Similarly, $2x-y-z$ is the dot product of $(2,-1,-1)$ with $(x,y,z)$.
Putting the two left hand sides into a column vector, we can write $$\begin{pmatrix} y+z \\ 2x - y-z \end{pmatrix} = \begin{pmatrix}0 & 1 & 1 \\2 & -1 & -1 \end{pmatrix} \begin{pmatrix}x\\y\\z\end{pmatrix}.$$
Hence, the system of linear equations can be written as $$\begin{pmatrix}0 & 1 & 1 \\2 & -1 & -1 \end{pmatrix} \begin{pmatrix}x\\y\\z\end{pmatrix} = \begin{pmatrix}4\\0\end{pmatrix}.$$