---
title: "solving systems"
type: concept
related: [Matricies]
source: https://www.jemoka.com/posts/kbhsolving_systems/
confidence: high
status: active
---

So let&rsquo;s say given a system:
\begin{equation} \begin{cases} x + 2y + z = 0 \\ 2x + 0y - z = 1 \\ x - y + 0z = 2 \end{cases} \end{equation}
We can represent this using a matricies.
\begin{equation} \begin{pmatrix} 1 &amp; 2 &amp; 1 \\ 2 &amp; 0 &amp; -1 \\ 1 &amp; -1 &amp; 0 \end{pmatrix} \begin{pmatrix} x \\ y \\ z \end{pmatrix} = \begin{pmatrix} 0 \\ 1 \\ 2 \end{pmatrix} \end{equation}
We will use Gaussian elimination. We will begin by multiplying the top row by \(-2\).
\begin{equation} \begin{pmatrix} -2 &amp; 0 &amp; 0 \\ 0 &amp; 1 &amp; 0 \\ 0 &amp; 0 &amp; 1 \end{pmatrix} \begin{pmatrix} 1 &amp; 2 &amp; 1 \\ 2 &amp; 0 &amp; -1 \\ 1 &amp; -1 &amp; 0 \end{pmatrix} \begin{pmatrix} x \\ y \\ z \end{pmatrix} =\begin{pmatrix} -2 &amp; 0 &amp; 0 \\ 0 &amp; 1 &amp; 0 \\ 0 &amp; 0 &amp; 1 \end{pmatrix} \begin{pmatrix} 0 \\ 1 \\2 \end{pmatrix} \end{equation}
And then we add row one to row two; we will not write out the transformation matrix:
\begin{equation} \begin{pmatrix} -2 &amp;-4 &amp;-2 \\ 2 &amp;-0 &amp;-1 \\ 1 &amp;-1 &amp;0 \end{pmatrix} \begin{pmatrix} x \\ y \\ z \end{pmatrix} = \begin{pmatrix} 0 \\ 1 \\2 \end{pmatrix} \end{equation}
