LINEAR ALGEBRA • PROBLEM-SOLVING & MODELING TOOLS

Choosing Solution Methods — Choosing Efficient Methods (Elimination vs Inverse vs Decomposition)

Learn when to use elimination, matrix inverses, or decomposition to solve systems of equations quickly and accurately.

Historical Context & Motivation

People have been solving systems of equations for thousands of years. Ancient Chinese mathematicians recorded methods for solving multiple unknowns at once in a text called The Nine Chapters on the Mathematical Art around 200 BCE. Their approach looked a lot like what we now call elimination — systematically removing variables until you find each answer.

As math advanced, new tools appeared. Mathematicians realized that writing equations in grid-like arrangements called matrices (a matrix is a rectangular array of numbers) opened the door to powerful new techniques. Some methods are fast for small problems, while others shine when problems get enormous. Choosing the right method can mean the difference between solving a problem in seconds and waiting hours — or even days.

~200 BCE
Ancient Elimination Methods
Chinese mathematicians develop row-reduction techniques to solve systems of linear equations, recorded in The Nine Chapters on the Mathematical Art.
1810
Gaussian Elimination Formalized
Carl Friedrich Gauss popularizes the systematic elimination method for solving systems, which becomes known as Gaussian elimination.
1855
Matrix Inverses Developed
Arthur Cayley formalizes matrix algebra, including the concept of an inverse matrix — a matrix that 'undoes' another matrix, much like dividing undoes multiplication.
1938
LU Decomposition Emerges
Tadeusz Banachiewicz and others develop LU decomposition, which breaks a matrix into simpler pieces. This becomes essential for efficient computation on early computers.
1960s–Today
Computers and Method Selection
With computers handling millions of equations, choosing the most efficient method becomes critical. Software like MATLAB and NumPy automatically selects strategies based on problem structure.

Today, we have three major families of solution methods: elimination, matrix inverses, and decomposition. The key question this lesson answers is: how do you pick the best one for a given problem?

Core Principles & Definitions

Before choosing a method, you need to understand what each one does. All three methods solve the same basic problem: given a system of linear equations (a set of equations where each variable is raised to the first power only), find the values of the unknowns. The difference lies in how they find those values and how quickly they do it.

1

Elimination

Combine equations to cancel out variables one at a time. You work through the system step by step until each variable is isolated. Think of it like peeling layers off an onion.
2

Matrix Inverse

Find a special matrix that 'undoes' the coefficient matrix. Multiplying both sides of the equation by this inverse gives you the answer directly — like using a master key.
3

Decomposition

Break the original matrix into simpler matrices (like factoring a number into primes). Then solve two easier problems instead of one hard one. Great for large or repeated problems.
4

Efficiency Matters

A 2-equation system can be solved by any method in seconds. But a 1,000-equation system? The wrong method could take millions of extra calculations. Choosing wisely saves time and reduces errors.
KEY TAKEAWAY
Imagine you need to get across town. You could walk (elimination — steady and reliable), take a taxi (inverse — fast but costs more setup), or ride a bus route that you've already planned (decomposition — efficient when you travel the same route often). No single option is always best; it depends on the situation.

Visual Explanation — The Decision Flowchart

This flowchart guides you through the decision process. Start at the top with your system Ax = b and follow the arrows based on your situation: how many right-hand sides you have, how large the system is, and whether you need the inverse matrix itself.

The diagram above captures the main idea: there is no single 'best' method. The right choice depends on the size of the system, the number of times you need to solve it, and whether you need the inverse matrix for another purpose. As you work through more problems, this decision process will become second nature.

Mathematical Framework

Every system of linear equations can be written in matrix form. Instead of writing out each equation separately, we pack the coefficients into a matrix A, the unknowns into a column vector x, and the constants into a column vector b.

MATRIX FORM OF A SYSTEM
Ax = b
A = coefficient matrix (the numbers in front of your variables), x = unknown vector (what you're solving for), b = constant vector (the numbers on the right side of the equals signs).

Method 1: Elimination (Gaussian Elimination)

In elimination, you perform row operations on the augmented matrix [A | b] (the coefficient matrix with the constants column attached). You add or subtract multiples of one row from another to create zeros below the diagonal. This transforms the system into a simpler triangular shape that you can solve by back-substitution — working from the bottom equation upward.

ELIMINATION OPERATION COUNT
Operations ≈ (2/3)n³
n = number of equations. For a 3×3 system, that's about 18 operations. For a 100×100 system, it's roughly 667,000.

Method 2: Matrix Inverse

If A has an inverse (written A⁻¹), you can multiply both sides of Ax = b by A⁻¹ to get x directly. The inverse is a special matrix such that A⁻¹ × A = I, where I is the identity matrix (a matrix with 1s on the diagonal and 0s everywhere else — it acts like the number 1 in multiplication).

INVERSE METHOD
x = A⁻¹b
Finding A⁻¹ takes about 2n³ operations — roughly three times as much work as elimination for a single solve. However, once you have A⁻¹, each new b vector only costs n² operations.

Method 3: Decomposition (LU Factorization)

Decomposition splits A into two triangular matrices: L (lower triangular, with zeros above the diagonal) and U (upper triangular, with zeros below the diagonal). Instead of solving one complex equation Ax = b, you solve two simpler ones: Ly = b (forward substitution) and Ux = y (back-substitution).

LU DECOMPOSITION
A = LU → Ly = b, then Ux = y
The factoring step costs (2/3)n³ (same as elimination), but each additional solve with a new b costs only n² operations — a massive savings when you have many right-hand sides.

Detailed Comparison — When Each Method Shines

Now that you know how each method works, let's compare them side by side. The chart below shows how the computational cost (number of arithmetic operations) grows with the size of the system. Think of computational cost as the 'price tag' of each method in terms of time and effort.

For a single solve, elimination and LU decomposition have similar costs. The inverse method costs roughly three times more. However, when you solve with many different b vectors, decomposition wins because the expensive setup is done only once.
Side-by-side comparison of solution methods
FeatureEliminationInverseDecomposition (LU)
Setup cost~(2/3)n³~2n³~(2/3)n³
Each extra solve~(2/3)n³ (redo all work)~n² (just multiply)~n² (forward + back sub)
Best forOne-time small systemsNeeding A⁻¹ explicitlyLarge systems; repeated solves
Ease of hand calculationStraightforwardTedious for n > 2Moderate

Worked Example — Solving a 2×2 System Three Ways

Let's solve the same small system using all three methods so you can see how they compare. Our system is:

SYSTEM
2x + y = 5, x + 3y = 7
In matrix form: A = [[2, 1], [1, 3]], x = [[x], [y]], b = [[5], [7]].
Method A: Elimination
1
Step 1 — Write the augmented matrixPlace A and b side by side: [2 1 | 5] on row 1 and [1 3 | 7] on row 2.
2
Step 2 — Eliminate x from row 2Replace row 2 with (row 2 − ½ × row 1). Row 2 becomes: [1 − 1, 3 − 0.5, 7 − 2.5] = [0, 2.5, 4.5].
3
Step 3 — Back-substituteFrom row 2: 2.5y = 4.5, so y = 1.8. Substitute into row 1: 2x + 1.8 = 5, so 2x = 3.2, giving x = 1.6.
x = 1.6, y = 1.8
Method B: Matrix Inverse
1
Step 1 — Find the determinant of Adet(A) = (2)(3) − (1)(1) = 6 − 1 = 5. Since det(A) ≠ 0, the inverse exists.
2
Step 2 — Compute A⁻¹For a 2×2 matrix [[a, b], [c, d]], the inverse is (1/det) × [[d, −b], [−c, a]]. So A⁻¹ = (1/5) × [[3, −1], [−1, 2]] = [[0.6, −0.2], [−0.2, 0.4]].
3
Step 3 — Multiply A⁻¹ × bx = A⁻¹b = [[0.6 × 5 + (−0.2) × 7], [(−0.2) × 5 + 0.4 × 7]] = [[3 − 1.4], [−1 + 2.8]] = [[1.6], [1.8]].
x = 1.6, y = 1.8 ✓
Method C: LU Decomposition
1
Step 1 — Factor A into L and UWe want A = LU where L is lower triangular and U is upper triangular. Start with U as the result of elimination: U = [[2, 1], [0, 2.5]]. The multiplier we used was ½, so L = [[1, 0], [0.5, 1]].
2
Step 2 — Solve Ly = b (forward substitution)[[1, 0], [0.5, 1]] × [[y₁], [y₂]] = [[5], [7]]. From row 1: y₁ = 5. From row 2: 0.5(5) + y₂ = 7, so y₂ = 4.5.
3
Step 3 — Solve Ux = y (back-substitution)[[2, 1], [0, 2.5]] × [[x], [y]] = [[5], [4.5]]. From row 2: 2.5y = 4.5, so y = 1.8. From row 1: 2x + 1.8 = 5, so x = 1.6.
x = 1.6, y = 1.8 ✓
💡 Notice
All three methods give the same answer! For this small 2×2 system, elimination was the quickest to carry out by hand. If we had ten different b vectors to solve, the inverse or LU methods would save us time because the setup work is reused.

Strengths & Limitations

Each method has clear strengths and weaknesses. Understanding these trade-offs is the key to making smart choices. The table below summarizes what each method does well and where it struggles.

Strengths and limitations of each method
MethodStrengthsLimitations
EliminationSimple to learn and apply by hand. Works for any size system. No setup required — just start solving.Must redo all work if b changes. Round-off errors can accumulate in large systems without careful pivoting.
Matrix InverseOnce computed, any new b is solved instantly (just a matrix-vector multiplication). The inverse itself may be useful for analysis.Computing A⁻¹ is expensive (~2n³ operations). Not all matrices have inverses. Numerically less stable than elimination for large systems.
Decomposition (LU)Best of both worlds: setup cost similar to elimination, and each new b is cheap (n² operations). Standard in professional software.Slightly more complex to learn. Requires the matrix to be decomposable (some matrices need row swapping, handled by a 'permutation matrix' P).
KEY TAKEAWAY
Think of it like choosing tools in a workshop. Elimination is your trusty hand saw — reliable for small jobs. The inverse is like a custom jig — it takes time to build, but then you can cut the same shape perfectly every time. LU decomposition is a power tool — a bit of setup, but once it's running, it handles big jobs fast.

Connections to Advanced Topics

The three methods you've learned are the foundation for much more advanced techniques. As systems grow to thousands or millions of equations (common in engineering, data science, and physics simulations), mathematicians and computer scientists have developed specialized variations.

How today's methods connect to advanced linear algebra
What You LearnedAdvanced VersionWhere It's Used
Gaussian eliminationGauss-Jordan elimination (reduces to identity matrix, not just triangular)Finding inverses, solving augmented systems
LU decompositionCholesky decomposition (for symmetric positive-definite matrices, twice as fast)Statistics, machine learning, physics simulations
Direct methods (all three)Iterative methods (approximate answers that improve with each step)Huge sparse systems (millions of equations)
Matrix inversePseudoinverse (handles non-square or singular matrices)Least-squares fitting, data regression

Don't worry about mastering these advanced topics right now. The important thing is that the decision-making skills you're building — asking 'How big is the system? How many times do I solve it? What structure does the matrix have?' — are exactly the same questions professionals ask when choosing algorithms for real-world problems.

Practice Problems

PROBLEM 1CONCEPTUAL
A classmate says, 'The inverse method is always the best because once you have A⁻¹, solving is super fast.' Explain why this reasoning is incomplete. When would the inverse method not be the best choice?
PROBLEM 2BASIC CALCULATION
Use Gaussian elimination to solve the system: 3x + 2y = 12 and x − y = 1.
PROBLEM 3INTERMEDIATE
You have a 4×4 system Ax = b. You need to solve it for 20 different b vectors, but the matrix A stays the same. Compare the approximate total operation counts for (a) using elimination 20 times and (b) using LU decomposition once and then solving 20 times. Which is more efficient?
PROBLEM 4APPLIED
A weather simulation models temperature at 500 grid points. The physics produces a 500×500 system of equations that must be solved at every time step (there are 1,000 time steps). The coefficient matrix A stays the same across all time steps, but the right-hand side b changes each step. Which solution method would you recommend and why?
PROBLEM 5CRITICAL THINKING
Imagine you're designing a calculator app. A user enters a 3×3 system and wants the solution displayed instantly. Later, they might change just the right-hand side (the constants) and solve again, or they might change the entire system. Describe a strategy that handles both cases efficiently. Which method(s) would your app use internally, and when would it switch between them?

Lesson Summary

When faced with a system Ax = b, you now have three powerful tools to choose from. Gaussian elimination is your go-to for small, one-time problems — it's simple, reliable, and easy to do by hand. The matrix inverse method (x = A⁻¹b) shines when you specifically need A⁻¹ for other purposes or when you have many right-hand sides and the system is small enough that the higher setup cost is worth it. LU decomposition is the professional's choice for large systems or situations where the same coefficient matrix is reused with different right-hand sides — it offers elimination-level setup cost with the reuse benefits of the inverse.

The key decision factors are: system size (how many equations?), number of solves (one b or many?), and whether you need the inverse itself. Mastering this decision process is just as important as mastering the methods themselves — it's what separates someone who can solve problems from someone who can solve them efficiently.

Varsity Tutors • Linear Algebra • Choosing Solution Methods — Choosing Efficient Methods (Elimination vs Inverse vs Decomposition)