Solving a 3×3 System of Linear Equations: A Step‑by‑Step Guide
When you encounter a 3×3 system of linear equations, you are dealing with three equations that each contain three variables—typically x, y, and z. Practically speaking, the goal is to find a single ordered triple ((x, y, z)) that satisfies all three equations simultaneously. This type of problem is fundamental in algebra, engineering, physics, and economics, where multiple constraints must be balanced at once. And in this article, we will explore the most reliable methods for solving such systems, explain the underlying mathematics, and provide practical tips to avoid common pitfalls. By the end, you will be confident in tackling any 3×3 linear system you encounter Worth keeping that in mind..
This changes depending on context. Keep that in mind.
Why Choose One Method Over Another?
Different approaches have distinct advantages depending on the context:
- Gaussian elimination works well for most textbook problems and is easily programmable.
- Matrix inversion offers a compact solution when the coefficient matrix is invertible, but it requires computing a determinant and adjugate.
- Cramer's rule is elegant for small systems and highlights the role of determinants, though it becomes cumbersome for larger matrices.
Understanding the trade‑offs helps you select the most efficient technique for a given situation.
1. Gaussian Elimination
Gaussian elimination transforms the system into an upper‑triangular form, making back‑substitution straightforward. The process consists of three main phases: forming the augmented matrix, performing row operations, and solving for the variables.
Step‑by‑Step Procedure
-
Write the augmented matrix ([A|B]) where A contains the coefficients of x, y, z and B holds the constants Small thing, real impact..
[ \begin{bmatrix} a_1 & b_1 & c_1 & | & d_1 \ a_2 & b_2 & c_2 & | & d_2 \ a_3 & b_3 & c_3 & | & d_3 \end{bmatrix} ]
-
Create zeros below the first pivot (the entry in the first row, first column). For each row i (i = 2, 3), compute the multiplier (m_i = \frac{a_i}{a_1}) and replace row i with (R_i - m_i R_1) Worth knowing..
-
Repeat for the second column. Use the new second‑row entry as the second pivot, then eliminate the entries below it using multipliers derived from the second pivot.
-
Normalize the pivots (optional). You may divide each pivot row by its leading coefficient to make the pivot equal to 1, simplifying later calculations Simple, but easy to overlook. That's the whole idea..
-
Back‑substitute. Starting from the last equation (which now has a single variable), solve for that variable, then substitute its value upward through the previous rows to find the remaining variables Surprisingly effective..
Example
Solve
[ \begin{cases} 2x + y - z = 3 \ x - 2y + 3z = -2 \ 3x + y + 2z = 4 \end{cases} ]
Augmented matrix
[ \begin{bmatrix} 2 & 1 & -1 & | & 3 \ 1 & -2 & 3 & | & -2 \ 3 & 1 & 2 & | & 4 \end{bmatrix} ]
Row operations
-
(R_2 \leftarrow R_2 - \frac{1}{2}R_1) → ([0, -2.5, 3.5, |-3.5])
-
(R_3 \leftarrow R_3 - \frac{3}{2}R_1) → ([0, -0.5, 3.5, |-2.5])
-
(R_3 \leftarrow R_3 - \frac{-0.5}{-2.5}R_2) → ([0, 0, 1, |-1])
Resulting upper‑triangular matrix
[ \begin{bmatrix} 2 & 1 & -1 & | & 3 \ 0 & -2.5 & 3.5 & | & -3 Surprisingly effective..
Back‑substitution
- From row 3: (z = -1)
- Row 2: (-2.5y + 3.5(-1) = -3.5) → (-2.5y - 3.5 = -3.5) → (y = 0)
- Row 1: (2x + 0 - (-1) = 3) → (2x + 1 = 3) → (x = 1)
Solution: ((x, y, z) = (1, 0, -1)).
Tips for Success
- Keep fractions exact whenever possible to avoid rounding errors.
- Use row swapping if a pivot is zero; this is called partial pivoting and improves numerical stability.
- Document each row operation; it helps track mistakes and is essential for grading or debugging.
2. Matrix Inversion
When the coefficient matrix A is square and invertible (i.Practically speaking, e. , its determinant ≠ 0), the solution can be expressed compactly as (\mathbf{x} = A^{-1}\mathbf{b}). This method highlights the relationship between linear systems and matrix algebra.
Computing the Inverse
-
Find the determinant (\det(A)). If (\det(A) = 0), the matrix is singular and no unique solution exists.
-
Construct the matrix of cofactors (C). Each entry (C_{ij}) is ((-1)^{i+j}) times the determinant of the submatrix obtained by deleting row i and column j Simple, but easy to overlook. Nothing fancy..
-
Transpose the cofactor matrix to obtain the adjugate (\text{adj}(A)).
-
Divide by the determinant: (A^{-1} = \frac{1}{\det(A)}\text{adj}(A)) Simple as that..
-
Multiply (A^{-1}) by the constant vector (\mathbf{b}) to get (\mathbf{x}).
Example
Using the same system as before, the coefficient matrix and constant vector are
[ A = \begin{bmatrix} 2 & 1 & -1 \ 1 & -2 & 3 \ 3 & 1 & 2 \end{bmatrix}, \qquad \mathbf{b} = \begin{bmatrix}3\-2\4\end{bmatrix} ]
Determinant
[ \det(A) = 2\bigl((-2)(2)-3(1)\bigr) - 1\bigl(1\cdot2-3\cdot3\bigr) + (-1)\bigl(1\cdot1-(-2)\cdot3\bigr) = 2(-4-3) - (2-9) + (-1)(1+6) = -14 +7 -7 = -14 ]
Since (\det(A) \neq 0), the inverse exists.
Cofactor matrix (computed quickly with a calculator or symbolic tool)
[ C = \begin{bmatrix} -7 & 5 & -5 \ -5 & 7 & -7 \ -3 & 1 & 1 \end{bmatrix} ]
Adjugate