A.1. Matrix Systems of Linear Equations - JulTob/Mathematics GitHub Wiki

📘 Solving Systems of Linear Equations

Introduction. A system of linear equations is a collection of equations that share the same unknowns. For example:

\begin{cases}
x + 2y + 3z = 14 \\
2x + y + z = 10 \\
3x + 4y + 2z = 18
\end{cases}

can be written in matrix form as:

A\vec{x} = \vec{b} \quad \text{where} \quad
A = \begin{pmatrix}1 & 2 & 3\\ 2 & 1 & 1\\ 3 & 4 & 2\end{pmatrix}, \quad
\vec{x} = \begin{pmatrix}x\\y\\z\end{pmatrix}, \quad
\vec{b} = \begin{pmatrix}14\\10\\18\end{pmatrix}.

Our goal is to find all vectors $\vec{x}$ that satisfy this matrix equation.

🔁 1. Elementary Row Operations

To solve $A\vec{x} = \vec{b}$, we work with the augmented matrix:

\left(\begin{array}{ccc|c}
1 & 2 & 3 & 14 \\
2 & 1 & 1 & 10 \\
3 & 4 & 2 & 18
\end{array}\right)

We then apply elementary row operations:

  1. Swap two rows
  2. Multiply a row by a nonzero scalar
  3. Add a multiple of one row to another

These preserve the solution set of the system.

🧮 2. Gaussian Elimination

We use row operations to reduce the matrix to row echelon form (REF), which looks like:

\left(\begin{array}{ccc|c}
1 & * & * & * \\
0 & 1 & * & * \\
0 & 0 & 1 & *
\end{array}\right)

This form makes the system triangular, so we can solve from bottom to top (back substitution).

🧪 3. Example: Solve Step by Step

Given the system:

\begin{cases}
x + 2y + 3z = 14 \\
2x + y + z = 10 \\
3x + 4y + 2z = 18
\end{cases}

Start with the augmented matrix:

\left(\begin{array}{ccc|c}
1 & 2 & 3 & 14 \\
2 & 1 & 1 & 10 \\
3 & 4 & 2 & 18
\end{array}\right)

Step 1: Eliminate below first pivot (row 1).

  • $R_2 \gets R_2 - 2R_1$:
(2, 1, 1, 10) - 2 \cdot (1, 2, 3, 14) = (0, -3, -5, -18)
  • $R_3 \gets R_3 - 3R_1$:
  (3, 4, 2, 18) - 3 \cdot (1, 2, 3, 14) = (0, -2, -7, -24)

New matrix:

\left(\begin{array}{ccc|c}
1 & 2 & 3 & 14 \\
0 & -3 & -5 & -18 \\
0 & -2 & -7 & -24
\end{array}\right)

Step 2: Make pivot 1 in row 2.

  • $R_2 \gets (-1/3) \cdot R_2$
R_2 = (0, 1, 5/3, 6)

Step 3: Eliminate below pivot in row 2.

  • $R_3 \gets R_3 + 2 \cdot R_2$:
(0, -2, -7, -24) + 2 \cdot (0, 1, 5/3, 6) = (0, 0, -7 + 10/3, -12)

That is:

-7 + 10/3 = -11/3 \Rightarrow R_3 = (0, 0, -11/3, -12)

New matrix:

\left(\begin{array}{ccc|c}
1 & 2 & 3 & 14 \\
0 & 1 & \frac{5}{3} & 6 \\
0 & 0 & \frac{-11}{3} & -12
\end{array}\right)

Step 4: Make last pivot 1.

  • $R_3 \gets (-3/11) \cdot R_3$:
R_3 = (0, 0, 1, \frac{36}{11})

🔁 4. Back Substitution

From the final matrix:

\begin{cases}
z = \frac{36}{11} \\
y + \frac{5}{3}z = 6 \\
x + 2y + 3z = 14
\end{cases}

Plug back step-by-step:

  • From 2nd row:
y = 6 - \frac{5}{3} \cdot \frac{36}{11} = 6 - \frac{180}{33} = 6 - \frac{60}{11} = \frac{6\cdot11 - 60}{11} = \frac{66 - 60}{11} = \frac{6}{11}
  • From 1st row:
x = 14 - 2y - 3z = 14 - 2\cdot\frac{6}{11} - 3\cdot\frac{36}{11} = 14 - \frac{12}{11} - \frac{108}{11} = 14 - \frac{120}{11} = \frac{154 - 120}{11} = \frac{34}{11}

✅ Final Answer

\boxed{
x = \frac{34}{11}, \quad y = \frac{6}{11}, \quad z = \frac{36}{11}
}

🧩 5. Types of Solutions

  • ✅ Unique solution: One set of values (when rank = number of variables).
  • ♾️ Infinite solutions: At least one free variable (a row like $0 = 0$ appears).
  • ❌ No solution: Contradiction (a row like $0 = 1$ appears).

📎 6. Optional Note: Matrix Inverse Method

If $A$ is invertible, we can solve:

A \vec{x} = \vec{b} \quad \Rightarrow \quad \vec{x} = A^{-1} \vec{b}

This requires that $\det(A) \ne 0$, and will be explored in the next chapter (A.2 – Matrix Inverses).

🔚 Summary

  • Use the augmented matrix to represent $A\vec{x} = \vec{b}$.
  • Apply row operations to reach row echelon form.
  • Use back substitution to find the solution.
  • The number of pivots tells us how many variables are solved.
  • Use this method for exact symbolic solutions, not approximations.