Week 5 · Intermediate Algebra

5. Systems of Linear Equations (2 Variables)

120 min

Before you start

  • Solve single-variable linear equations using inverse operations
  • Substitute numerical values into multi-term expressions accurately
  • Read a slope-intercept line and identify slope and y-intercept
  • Apply distribution and combine like terms when scaling an equation

By the end you'll be able to

  • Solve a 2-variable system using substitution with one variable already isolated
  • Solve a 2-variable system using elimination by aligning opposite coefficients
  • Classify a system as one solution, no solution, or infinitely many from its row-reduced form
  • Compute the determinant of a 2x2 coefficient matrix and interpret its sign
  • Translate a 2-equation system into matrix form A x = b
Week 5 video coming soon
Read the lesson body below in the meantime.

Systems of Linear Equations

A system is two or more equations with the same variables, true simultaneously. Solving a system means finding the variable values that satisfy all equations at once. Geometrically: finding where the lines (or planes, or hyperplanes) intersect.

Two methods, one outcome

The two algebraic methods you’ll use most are substitution and elimination. Both arrive at the same answer; elimination is faster when both equations are in standard form ($ax + by = c$). Substitution is faster when one equation is already solved for a variable.

For the example below, we’ll use elimination because the equations are in standard form.

Worked example

Step 1 — choose a variable to eliminate. We’ll eliminate . The -coefficients are and . Their least common multiple is .

Step 2 — scale each equation so the -coefficients become .

  • Multiply equation 1 by :
  • Multiply equation 2 by :

Critical detail: when you multiply an equation by a constant, you must multiply every term — including the right-hand-side constant. Forgetting to scale the constant is the most common mistake at this step.

Step 3 — add the equations. The -terms cancel:

Step 4 — substitute back into either original equation. Using equation 1:

Solution: .

Three possible outcomes

Every linear system has exactly one of three outcomes:

  1. Unique solution. Lines intersect at one point. Most systems are like this.
  2. No solution. Lines are parallel — they never intersect. Algebraically, you’ll arrive at a contradiction like .
  3. Infinitely many solutions. Lines are the same — every point on the line satisfies both equations. Algebraically, you’ll arrive at .

Determinant of a 2×2 matrix

For a 2×2 matrix , the determinant is

A 2×2 system has a unique solution exactly when this determinant is nonzero. If , the two equations are either parallel (no solution) or identical (infinitely many solutions) — the same three-outcome trichotomy you just saw, read off in one number.

Connection to linear algebra

Solving a system of equations in variables is exactly the operation that matrix inversion performs. The system

has solution (when is invertible). Gaussian elimination generalizes the elimination method you just used to systems of any size.

Connection to machine learning

The closed-form solution to linear regression is a system of linear equations solved with matrices:

The matrix encodes the system; encodes the right-hand side; is the vector of coefficients you’re solving for. A numerical computing library’s linear-solve routine does this in one line — but conceptually, it’s the same operation as eliminating variables one at a time.

When you see a “singular matrix” error from such a routine, it means your system has no unique solution — the design matrix is rank-deficient, equivalent to the “no solution” or “infinitely many solutions” cases above.

Common mistakes

These are the traps learners hit most often on this topic. Knowing them in advance is half the fix.

  • Forgetting to scale the right-hand-side constant

    When you multiply Equation 1 by 3 to align coefficients, multiply EVERY term — including the constant. 3x + 4y = 10 becomes 9x + 12y = 30, not 9x + 12y = 10.

  • Adding equations when subtraction was needed

    To eliminate a variable, the coefficients must be opposite signs. If both equations have , subtract one from the other (or scale one to first).

  • Solving for one variable and stopping

    A 2-variable system needs both AND . After finding , substitute back into either original equation to find . Don’t deliver half an answer.

Practice problems

Try each on paper first. Click Show solution only after you've made a real attempt.

  1. Problem 1
    Solve by substitution: and .
    Show solution

    Substitute: . Then .

    Answer: (3, 6).

  2. Problem 2
    Solve by elimination: and .
    Show solution

    Eliminate y: scale to plus-or-minus 12.

    1. 9x + 12y = 30.
    2. 8x - 12y = 4.
    3. Add: 17x = 34 so x = 2; then y = 1.

    Answer: (2, 1).

  3. Problem 3
    Solve: and .
    Show solution

    vs. give . No solution — parallel lines.

  4. Problem 4
    What does it mean if elimination yields ?
    Show solution

    The two equations are equivalent. Infinitely many solutions, often written .

  5. Problem 5
    Solve: and .
    Show solution

    From Eq1, . Sub: , .

    Answer: (1, 3).

  6. Problem 6
    Compute the determinant of .
    Show solution

    .

  7. Problem 7
    Translate this system to matrix form: , .
    Show solution

Practice quiz

  1. Question 1
    Solve by substitution: y = 2x and x + y = 9
  2. Question 2
    Solve by elimination: x + y = 5; x − y = 1
  3. Question 3
    If a system has parallel lines, the system has:
  4. Question 4
    If two equations describe the same line, the system has:
  5. Question 5
    Solve: 3x + y = 7 and 2x - y = 3. Give as (x, y).
  6. Question 6
    Solve: 2x + 3y = 12; x = y + 1. Give as (x, y).
  7. Question 7
    What’s the determinant of the matrix [[3, 4], [2, -3]]? (Just the number.)
  8. Question 8
    Geometrically, the solution to a 2-variable system is:
  9. Question 9
    Closed-form linear regression is essentially:
  10. Reflection 10
    What does a zero determinant tell you about a 2x2 system?

Week 5 recap

You solved 2-variable systems by substitution and elimination, classified the three possible outcomes (one solution, none, or infinitely many), and previewed how matrix determinants encode that classification numerically. Three trap families fell: the scale-the-constant trap (forgetting to multiply the right-hand side when scaling an equation), the wrong-operation trap (adding when subtraction was needed because coefficients had the same sign), and the half-solution trap (stopping after one variable). Each outcome supports later coursework: substitution generalizes to back-substitution in upper-triangular form; elimination generalizes to row reduction; classification by determinant becomes the singular-matrix test that protects numerical code from divide-by-zero failures. Closed-form linear regression is the same operation scaled to many features.

Coming next: Week 6 — Systems of 3 Variables & Intro to Matrices

Next week scales to three variables and introduces matrices as the compact bookkeeping device. You will execute Gaussian elimination by hand on a 3-variable system, recognize the three legal row operations (swap, scale, add multiple), and meet the identity matrix as the multiplicative identity for matrix algebra. The pattern generalizes directly to the algorithm that every linear-algebra library uses internally for solving systems of any size.

Saved in your browser only — no account, no server.