Practice Maths

Solutions — Solving Systems with Matrices

  1. Q1 — Writing a System as AX = B

    System: 4x − y = 10 and 2x + 3y = 8.

    Read off the coefficients of x and y from each equation to form the coefficient matrix A:

    A = [[4, −1], [2, 3]]

    The unknowns form the column vector:

    X = [[x], [y]]

    The right-hand sides form the constant vector:

    B = [[10], [8]]

    Verify by expanding AX: row 1 gives 4x + (−1)y = 4x − y = 10 ✓; row 2 gives 2x + 3y = 8 ✓.

    This compact notation AX = B is the foundation for both the inverse method and Gaussian elimination.

  2. Q2 — Solving by Inverse Matrix (2×2)

    System: 2x + y = 5, x − y = 1. Write as AX = B:

    A = [[2,1],[1,−1]], X = [[x],[y]], B = [[5],[1]].

    Step 1: Compute det(A).

    det(A) = 2(−1) − 1(1) = −2 − 1 = −3

    Since det(A) = −3 ≠ 0, a unique solution exists.

    Step 2: Compute A−1.

    For A = [[a,b],[c,d]], A−1 = (1/det(A))[[d,−b],[−c,a]]

    A−1 = (1/−3)[[−1,−1],[−1,2]] = [[1/3, 1/3],[1/3, −2/3]]

    Step 3: Compute X = A−1B.

    X = [[1/3, 1/3],[1/3, −2/3]] [[5],[1]]

    Row 1: (1/3)(5) + (1/3)(1) = 5/3 + 1/3 = 6/3 = 2

    Row 2: (1/3)(5) + (−2/3)(1) = 5/3 − 2/3 = 3/3 = 1

    x = 2, y = 1

    Check in original equations: 2(2) + 1 = 5 ✓; 2 − 1 = 1 ✓

  3. Q3 — Gaussian Elimination (2×2)

    System: x + 3y = 7, 2x − y = 4.

    Step 1: Write the augmented matrix.

    [[1, 3 | 7], [2, −1 | 4]]

    Step 2: Eliminate the x-term from row 2.

    R2 ← R2 − 2R1: [2−2(1), −1−2(3) | 4−2(7)] = [0, −7 | −10]

    Augmented matrix: [[1, 3 | 7], [0, −7 | −10]]

    Step 3: Back-substitute.

    From row 2: −7y = −10 → y = 10/7

    From row 1: x + 3(10/7) = 7 → x = 7 − 30/7 = 49/7 − 30/7 = 19/7

    x = 19/7, y = 10/7

    Check: 19/7 + 3(10/7) = 19/7 + 30/7 = 49/7 = 7 ✓; 2(19/7) − 10/7 = 38/7 − 10/7 = 28/7 = 4 ✓

  4. Q4 — Solving a 3×3 System by Back-Substitution

    Augmented matrix already in echelon form: [[1, 2, −1 | 4], [0, 1, 3 | 5], [0, 0, 2 | 6]]

    Step 1: Solve from the bottom row.

    Row 3: 2z = 6 → z = 3

    Step 2: Substitute z into row 2.

    y + 3(3) = 5 → y + 9 = 5 → y = −4

    Step 3: Substitute y and z into row 1.

    x + 2(−4) − 3 = 4 → x − 8 − 3 = 4 → x = 4 + 11 = x = 15

    Solution: x = 15, y = −4, z = 3

    Check (original system would be needed to fully verify; check row equations): 15 + 2(−4) −(3) = 15−8−3=4 ✓

  5. Q5 — Full Gaussian Elimination (3×3)

    System: x + 2y − z = 3, 2x − y + z = 6, 3x + y + 2z = 13.

    Step 1: Augmented matrix.

    [[1, 2, −1 | 3], [2, −1, 1 | 6], [3, 1, 2 | 13]]

    Step 2: Eliminate below pivot in column 1.

    R2 ← R2 − 2R1: [0, −5, 3 | 0]

    R3 ← R3 − 3R1: [0, −5, 5 | 4]

    Step 3: Eliminate below pivot in column 2.

    R3 ← R3 − R2: [0, 0, 2 | 4]

    Echelon form: [[1, 2, −1 | 3], [0, −5, 3 | 0], [0, 0, 2 | 4]]

    Step 4: Back-substitute.

    From row 3: 2z = 4 → z = 2

    From row 2: −5y + 3(2) = 0 → −5y = −6 → y = 6/5

    From row 1: x + 2(6/5) − 2 = 3 → x + 12/5 = 5 → x = 25/5 − 12/5 = 13/5

    Solution: x = 13/5, y = 6/5, z = 2

    Check eq.1: 13/5 + 12/5 − 2 = 25/5 − 2 = 5 − 2 = 3 ✓

  6. Q6 — Identifying an Inconsistent System

    System: 2x + 4y = 6, x + 2y = 5.

    Step 1: Check the determinant.

    A = [[2,4],[1,2]]. det(A) = 2(2) − 4(1) = 4 − 4 = 0.

    Since det(A) = 0, the inverse does not exist. We must row-reduce the augmented matrix to determine the nature of the system.

    Step 2: Row-reduce the augmented matrix.

    [[2,4|6],[1,2|5]] → swap: [[1,2|5],[2,4|6]] → R2 ← R2 − 2R1: [[1,2|5],[0,0|−4]]

    Step 3: Interpret row 2.

    Row 2 reads: 0·x + 0·y = −4, i.e. 0 = −4. This is a contradiction.

    Conclusion: No solution (inconsistent system).

    Geometrically: dividing the first equation by 2 gives x + 2y = 3. The second equation is x + 2y = 5. These are parallel lines (same left-hand side, different right-hand sides) that never intersect.

  7. Q7 — Identifying a System with Infinite Solutions

    System: 3x − y = 6, 6x − 2y = 12.

    Step 1: Row-reduce the augmented matrix.

    [[3, −1 | 6], [6, −2 | 12]] → R2 ← R2 − 2R1: [[3, −1 | 6], [0, 0 | 0]]

    Step 2: Interpret.

    Row 2 is all zeros: 0 = 0, which is always true. The system is dependent with infinitely many solutions.

    Step 3: Express the general solution.

    From row 1: 3x − y = 6 → y = 3x − 6. Let x = t (free parameter, t ∈ ℜ).

    General solution: x = t, y = 3t − 6 for any real t.

    Geometrically: the second equation is exactly twice the first. Both represent the same line y = 3x − 6. Every point on this line is a solution.

    E.g., t = 2: (2, 0); t = 3: (3, 3); t = 0: (0, −6). All satisfy both equations.

  8. Q8 — Finding k for a Special System

    System: kx + 2y = 4, 3x + ky = 6. Coefficient matrix A = [[k,2],[3,k]].

    Part (a): When does the system fail to have a unique solution?

    det(A) = k(k) − 2(3) = k² − 6 = 0 → k = √6 or k = −√6.

    Case k = √6:

    Equations: √6 x + 2y = 4 and 3x + √6 y = 6.

    Multiply the first equation by √6/2: 3x + √6 y = 2√6. Compare with second equation: 3x + √6 y = 6. These are the same only if 2√6 = 6, i.e. √6 = 3. Since √6 ≈ 2.449 ≠ 3, the equations are inconsistent.

    Wait — let us re-examine. Multiplying equation 1 by √6: √6 · (√6 x + 2y) = 6x + 2√6 y = 4√6. Multiplying equation 2 by 2: 6x + 2√6 y = 12. We need 4√6 = 12, i.e. √6 = 3 — false. So k = √6 gives no solution.

    Case k = −√6:

    Equations: −√6 x + 2y = 4 and 3x − √6 y = 6. Multiply eq.1 by √6: −6x + 2√6 y = 4√6. Multiply eq.2 by 2: 6x − 2√6 y = 12. Adding: 0 = 4√6 + 12 ≠ 0. No solution.

    Summary: For k = √6 or k = −√6, the system has no solution. There are no values of k for which infinite solutions exist.

  9. Q9 — Modelling a Real Situation (3×3 System)

    Let a, b, c = volumes (mL) of solutions A (10%), B (20%), C (50%).

    Setting up the equations:

    Equation 1 (total volume): a + b + c = 100

    Equation 2 (acid content): 0.1a + 0.2b + 0.5c = 30. Multiply by 10: a + 2b + 5c = 300

    Equation 3 (B = twice A): b = 2a → −2a + b + 0c = 0

    Augmented matrix:

    [[1, 1, 1 | 100], [1, 2, 5 | 300], [−2, 1, 0 | 0]]

    Row reduction:

    R2 ← R2 − R1: [0, 1, 4 | 200]

    R3 ← R3 + 2R1: [0, 3, 2 | 200]

    R3 ← R3 − 3R2: [0, 0, 2−12 | 200−600] = [0, 0, −10 | −400]

    Back-substitution:

    Row 3: −10c = −400 → c = 40 mL

    Row 2: b + 4(40) = 200 → b + 160 = 200 → b = 40 mL

    Row 1: a + 40 + 40 = 100 → a = 20 mL

    Solution A: 20 mL, Solution B: 40 mL, Solution C: 40 mL.

    Verify: Total = 20+40+40 = 100 ✓; Acid = 0.1(20)+0.2(40)+0.5(40) = 2+8+20 = 30 mL ✓; b = 40 = 2×20 = 2a ✓

  10. Q10 — Analysing Solution Types for a Parameter

    System: x + 2y + z = 4, 2x + 3y + z = 6, x + y + (k−1)z = k.

    Step 1: Augmented matrix and row reduction.

    [[1, 2, 1 | 4], [2, 3, 1 | 6], [1, 1, k−1 | k]]

    R2 ← R2 − 2R1: [0, −1, −1 | −2]

    R3 ← R3 − R1: [0, −1, k−2 | k−4]

    R3 ← R3 − R2: [0, 0, (k−2)−(−1) | (k−4)−(−2)] = [0, 0, k−1 | k−2]

    Echelon form: [[1,2,1|4],[0,−1,−1|−2],[0,0,k−1|k−2]]

    (a) Unique solution:

    The pivot in column 3 is (k−1). If k ≠ 1, then k−1 ≠ 0 and we can solve for z = (k−2)/(k−1), then back-substitute for y and x. Unique solution exists for all k ≠ 1.

    (b) Infinitely many solutions:

    We need the last row to be [0,0,0|0], requiring k−1 = 0 AND k−2 = 0 simultaneously. This means k = 1 and k = 2 simultaneously — impossible. There are no values of k giving infinitely many solutions.

    (c) No solution:

    When k = 1: last row is [0, 0, 0 | −1], representing 0 = −1 — a contradiction. No solution when k = 1.

    Summary: unique solution for k ≠ 1; no solution for k = 1; no parameter value gives infinitely many solutions.