Courses / Computer Science I
Algebra

Systems of Linear Equations

Computer Science I 312 words Free to read

Many Equations at Once

A linear equation relates variables with only addition and scalar multiples — no powers, products, or functions of the variables, like 2x+3y=62x + 3y = 6. A system is several such equations that must hold simultaneously. Solving them is one of the most common tasks in all of computing — from graphics to economics to machine learning.

Geometrically, each linear equation in two variables is a line; a solution to the system is a point lying on all the lines at once. This reveals the three possible outcomes for a linear system:

The systematic solving method is Gaussian elimination: use row operations (scale a row, swap two rows, add a multiple of one row to another) to eliminate variables one at a time until the system is in a simple triangular form, then back-substitute. This is exactly what computers do, and it generalizes to any number of variables. The same operations can also reveal which of the three cases you are in.

The number of solutions connects to the earlier idea of independence: a system with as many independent equations as unknowns has a unique solution; fewer independent equations leave free variables (infinitely many solutions), and contradictory equations give none.

Common pitfall: assuming every linear system has exactly one solution. A system can have one, none, or infinitely many solutions depending on whether the lines cross, are parallel, or coincide. Parallel-but-distinct equations are inconsistent (no solution), and duplicate equations are dependent (infinitely many) — jumping straight to "one solution" misses these cases.

Practise this lesson

The explanation above is free to read. The graded practice for this lesson lives in the Tryals app.

10practice questions
2interactive scenes
Start Computer Science I free

Algebra