Linear Algebra I · Linear systems and Gaussian elimination
Prerequisites: signed arithmetic, fractions, solving one equation, and coordinate graphs. Calculus is not needed for this unit. Learn to encode a system, eliminate variables with reversible operations, classify the solution set, and check a proposed solution in every original equation.
Equations, coefficients, and solution sets
A linear equation has the form a₁x₁+⋯+aₙxₙ=b, with known coefficients aⱼ and right-hand side b. A solution of a system satisfies every row at once. The coefficient matrix A collects the coefficients, the vector x collects unknowns, and b collects the right-hand sides: Ax=b. The augmented matrix [A|b] retains both sides for row operations. Each equation in two unknowns usually describes a line. Independent lines meet once; coincident lines share infinitely many points; distinct parallel lines have no common point.
Elimination preserves the solution set
Three row operations are allowed: swap two rows, multiply a row by a nonzero scalar, or add a multiple of another row. Apply the operation to the right-hand side too. Each operation has an inverse, so it preserves exactly the original solutions. Choose a nonzero pivot, swap rows if needed, and subtract multiples to clear entries below it. Repeat to form row-echelon form: nonzero rows above zero rows, each leading nonzero entry to the right of the one above, and zeros below each pivot. Back-substitute from the last pivot row upward.
A row [0 ⋯ 0 | d] with d≠0 states 0=d and proves inconsistency. Otherwise every column with a pivot determines its variable in terms of any free variables. If every variable column has a pivot the solution is unique. If the system is consistent with a free variable, it has infinitely many real solutions. The augmented right-hand-side column is not a variable column.
Worked examples
- For 2x+y=5 and x−y=1, write [2 1 | 5; 1 −1 | 1]. Replace row 2 by row 2 minus half of row 1: [0 −3/2 | −3/2]. Thus y=1 and x=(5−1)/2=2. Substitution gives 2·2+1=5 and 2−1=1.
- Solve x+y+z=6, 2x+3y+z=11, −x+y+2z=7. Subtract twice row 1 from row 2 to obtain y−z=−1. Add row 1 to row 3 to obtain 2y+3z=13. Subtract twice the new row 2 from the new row 3: 5z=15. Then z=3, y=2, x=1. Verify all three original equations.
- For x+y=3 and 2x+2y=6, elimination gives 0=0. Set y=t freely, so x=3−t. Changing the second right-hand side to 7 instead gives 0=1 and no solution. A missing pivot alone does not distinguish these cases; inspect the right-hand side.
Common mistakes
Never divide by a zero pivot: swap in a row with a nonzero entry, or move to the next variable column. Keep variable order fixed and include the augmented column in every operation. A small numerical residual checks a computed solution, but it cannot by itself prove uniqueness. With measured coefficients, small perturbations can strongly affect some systems.
Practice
- Solve 3x+y=7 and x−y=1; check both residuals.
- Classify x+y=2, 3x+3y=6 and write every solution. Then replace 6 with 7.
- Explain a safe first step for 0x+y=2 and x+y=5.
Worked solutions
- Add the equations to get 4x=8, so x=2 and y=1. Residuals are 3·2+1−7=0 and 2−1−1=0.
- Subtract three times row 1: the zero row permits y=t and x=2−t. With 7 on the right, the row becomes 0=1, so no solution exists.
- Swap the equations so the first pivot is 1. Alternatively solve y=2 directly and substitute to get x=3. Both methods avoid dividing by zero.
Assessment · Open book · 16 points
Open book: use books, lesson notes, cited readings, calculators, and relevant free software. Explain your own reasoning, assumptions, units, and checks; identify references or software you use. Attempt the questions before opening the answer key. Suggested study time: 40–60 minutes; this is a self-study guide, not a timed restriction.
- Use elimination to solve x+y+z=4, 2x+3y+z=7, −x+y+2z=4. Verify the result. (6)
- For x+2y=4 and 2x+4y=k, state which k values give zero, one, or infinitely many solutions. Parametrize any infinite family. (4)
Application and reasoning · 6 points
For x+y=1 and 2x+ky=b, classify all parameter cases (2). Give every solution when solutions exist (2). For k≠2, quantify how a change δ in b changes y; illustrate with k=2.001, δ=0.01 (2).
Complete answer key and scoring rubric
- Row 2 minus twice row 1 gives y−z=−1; row 3 plus row 1 gives 2y+3z=8 (2). Eliminate y to get 5z=10 (1), so z=2, y=1, x=1 (2). Substitution gives 4,7,4 on the three left-hand sides (1).
- Elimination gives 0=k−8 (1). At k=8 there are infinitely many solutions (x,y)=(4−2t,t) (2). At every other k there is no solution; no value gives a unique solution (1).
Application and reasoning · 6 points
Elimination gives (k−2)y=b−2: unique if k≠2; infinite if k=2,b=2; none if k=2,b≠2 (2 for all cases). In the unique case y=(b−2)/(k−2), x=1−y; in the infinite case (1−t,t), t real (1 each). Δy=δ/(k−2), so the example changes y by 10 (1 each).
Scoring: existing questions 10 + application problem 6 = 16 points. Award the stated method and reasoning marks, not only final answers.
Download the elimination lab
Download the exact-arithmetic Python lab
Install free Python 3 on Windows, macOS, or Linux. Run the commands in the download folder; on Windows try py -3 if python3 is unavailable. No account or extra packages are needed. The two integer arguments are k and b in x+y=2, 2x+ky=b. The script performs row 2 minus twice row 1 and uses standard-library fractions to avoid rounding. Predict each classification before running.
python3 ee-linear-systems.py 3 5
python3 ee-linear-systems.py 2 4
python3 ee-linear-systems.py 2 5
python3 ee-linear-systems.py -1 5
Free readings and software
- MIT 18.06SC · Geometry of linear equations, lecture and exercises
- MIT 18.06SC · Elimination with matrices
- Python documentation · Exact rational arithmetic
- Python Software Foundation · Python 3
Elimination lab · Inspect the pivot
Classify x+y=2, 2x+ky=b by eliminating x.
Free tool built into this page. Use it in your browser without an account or download.
Procedure
Try (k,b)=(3,5), (2,4), (2,5), and (−1,5). Predict the reduced row and classification. For a unique solution substitute into both original equations. Why does setting k=2 require checking b as well?
Expected results and answer check
The reduced equation is (k−2)y=b−4. The first case gives x=y=1. The next has 0=0 and the free parameter y=t. The third has 0=1 and no solution. The last gives y=−1/3 and x=7/3. Substituting gives 2 and 5 for the original left-hand sides.
The browser lab uses small integer coefficients and rounds displayed answers. The downloadable Python version uses exact rational arithmetic. This model checks algebraic constraints; measuring a real electrical system requires instruments and uncertainty analysis.