Solving Linear Systems of Equations

ECE35 - Summer 2025

Overview

A linear system of equations is a collection of two or more linear equations involving the same set of variables. Solving these systems is a fundamental skill in both mathematics and engineering, with applications in circuit analysis, control systems, and signal processing.

1. Introduction

A linear equation in variables \( x_1, x_2, \dots, x_n \) is an equation of the form:

\[ a_1x_1 + a_2x_2 + \dots + a_nx_n = b \]

A system of linear equations is a collection of such equations involving the same variables:

\[ \begin{cases} a_{11}x_1 + a_{12}x_2 + \dots + a_{1n}x_n = b_1 \\ a_{21}x_1 + a_{22}x_2 + \dots + a_{2n}x_n = b_2 \\ \vdots \\ a_{m1}x_1 + a_{m2}x_2 + \dots + a_{mn}x_n = b_m \end{cases} \]

2. Types of Solutions

3. Matrix Representation

Any linear system can be written compactly in matrix form:

\[ A\mathbf{x} = \mathbf{b} \]

Where:

\( A = \text{coefficient matrix},\quad \mathbf{x} = \text{unknown vector},\quad \mathbf{b} = \text{constant vector} \)

4. Methods of Solution

Substitution or Elimination

Used for small systems or by hand. Solve one equation for one variable and substitute into others to eliminate variables.

Matrix Inversion (for square, invertible systems)

If \( A \) is a square matrix and \( \det(A) \neq 0 \), then:

\[ \mathbf{x} = A^{-1}\mathbf{b} \]

5. Online Resources

Websites

YouTube Videos

6. Practice Problems and Solutions

Problem 1

Solve the system of equations:

\[ \begin{cases} 2x + 3y = 12 \\ 4x - y = 5 \end{cases} \]

Method 1: Substitution

From the second equation:

\[ y = 4x - 5 \]

Substitute into the first:

\[ 2x + 3(4x - 5) = 12 \Rightarrow 2x + 12x - 15 = 12 \Rightarrow 14x = 27 \Rightarrow x = \frac{27}{14} \]

\[ y = 4\left(\frac{27}{14}\right) - 5 = \frac{108}{14} - \frac{70}{14} = \frac{38}{14} = \frac{19}{7} \]

Method 2: Matrix Inverse

Write the system as:

\[ \begin{bmatrix} 2 & 3 \\ 4 & -1 \end{bmatrix} \begin{bmatrix} x \\ y \end{bmatrix} = \begin{bmatrix} 12 \\ 5 \end{bmatrix} \]

Compute inverse of the coefficient matrix:

\[ \det = (2)(-1) - (3)(4) = -2 - 12 = -14 \]

\[ A^{-1} = \frac{1}{-14} \begin{bmatrix} -1 & -3 \\ -4 & 2 \end{bmatrix} = \frac{1}{14} \begin{bmatrix} 1 & 3 \\ 4 & -2 \end{bmatrix} \]

Then:

\[ \begin{bmatrix} x \\ y \end{bmatrix} = \frac{1}{14} \begin{bmatrix} 1 & 3 \\ 4 & -2 \end{bmatrix} \begin{bmatrix} 12 \\ 5 \end{bmatrix} = \frac{1}{14} \begin{bmatrix} 12 + 15 \\ 48 - 10 \end{bmatrix} = \begin{bmatrix} \frac{27}{14} \\ \frac{19}{7} \end{bmatrix} \]

Problem 2

Solve the system:

\[ \begin{cases} x + 2y + z = 6 \\ 2x + 3y + 3z = 14 \\ x + y + z = 8 \end{cases} \]

Method 1: Elimination

From the first and third equations, subtract to eliminate \( x \):

\[ (x + 2y + z) - (x + y + z) = 6 - 8 \Rightarrow y = -2 \]

Substitute into the first:

\[ x + 2(-2) + z = 6 \Rightarrow x - 4 + z = 6 \Rightarrow x + z = 10 \quad (1) \]

Substitute \( y = -2 \) into the second:

\[ 2x + 3(-2) + 3z = 14 \Rightarrow 2x - 6 + 3z = 14 \Rightarrow 2x + 3z = 20 \quad (2) \]

From (1): \( x = 10 - z \). Substitute into (2):

\[ 2(10 - z) + 3z = 20 \Rightarrow 20 - 2z + 3z = 20 \Rightarrow z = 0 \Rightarrow x = 10 \]

\[ \boxed{x = 10,\ y = -2,\ z = 0} \]

Method 2: Matrix Inverse

\[ A = \begin{bmatrix} 1 & 2 & 1 \\ 2 & 3 & 3 \\ 1 & 1 & 1 \end{bmatrix}, \quad \mathbf{b} = \begin{bmatrix} 6 \\ 14 \\ 8 \end{bmatrix} \]

Finally find:

\[ \mathbf{x} = A^{-1} \mathbf{b} = \begin{bmatrix} 10 \\ -2 \\ 0 \end{bmatrix} \]

Problem 3

Determine the type of solution for the system:

\[ \begin{cases} x + y = 4 \\ 2x + 2y = 8 \end{cases} \]

Method 1: Elimination

Multiply the first equation by 2:

\[ 2x + 2y = 8 \Rightarrow \text{same as second equation} \]

So, the system is dependent and has infinitely many solutions.

Method 2: Matrix Rank Check

\[ A = \begin{bmatrix} 1 & 1 \\ 2 & 2 \end{bmatrix},\quad \mathbf{b} = \begin{bmatrix} 4 \\ 8 \end{bmatrix} \]

Rank of \( A \) = 1 < number of variables → Infinitely many solutions.

Problem 4

Solve the following system of linear equations:

\[ \begin{cases} x + 2y = 7 \\ 3x - y = 5 \end{cases} \]

From the first equation: \( x = 7 - 2y \)

Substitute into the second: \[ 3(7 - 2y) - y = 5 \Rightarrow 21 - 6y - y = 5 \Rightarrow -7y = -16 \Rightarrow y = \frac{16}{7} \]

Then: \[ x = 7 - 2\cdot\frac{16}{7} = \frac{49 - 32}{7} = \frac{17}{7} \]

Problem 5

Solve the following system of linear equations:

\[ \begin{cases} 2x - 3y = 4 \\ 4x - 6y = 8 \end{cases} \]

Note: Second equation is a multiple of the first \( (2x - 3y = 4) \Rightarrow \) Infinite solutions.

Problem 6

Solve the following system of linear equations:

\[ \begin{cases} x + y + z = 6 \\ 2x - y + 3z = 14 \\ x + 4y - z = 2 \end{cases} \]

Use substitution or matrix. Final solution: \( x = 3, y = 1, z = 2 \)

Problem 7

Solve the following system of linear equations:

\[ \begin{cases} 2x + y = 5 \\ 4x + 2y = 12 \end{cases} \]

Multiply the first equation by 2: \( 4x + 2y = 10 \Rightarrow 10 \neq 12 \Rightarrow \) No solution.

Problem 8

Solve the following system of linear equations:

\[ \begin{cases} 3x + 2y - z = 1 \\ x - y + 2z = 3 \\ 2x + y + z = 4 \end{cases} \]

Solve system using substitution or elimination. Final: \( x = 1, y = 2, z = -1 \)

Problem 9

Solve the following system of linear equations:

\[ \begin{cases} x + 2y + 3z = 10 \\ 2x + 3y + z = 8 \\ 3x + y + z = 7 \end{cases} \]

Matrix or elimination method yields: \( x = 1, y = 2, z = 1 \)

Problem 10

Solve the following system of linear equations:

\[ \begin{cases} x - y = 1 \\ y - z = 2 \\ x - z = 3 \end{cases} \]

From (1): \( x = y + 1 \), from (2): \( y = z + 2 \)

Then: \( x = z + 3 \). Parametric solution:

\[ x = z + 3,\quad y = z + 2 \]

Problem 11

Solve the following system of linear equations:

\[ \begin{cases} x + y = 5 \\ 2x + 2y = 10 \\ 3x + 3y = 15 \end{cases} \]

All equations are scalar multiples \( \Rightarrow \) Infinitely many solutions.

Problem 12

Solve the following system of linear equations:

\[ \begin{cases} 2x + 3y + z = 9 \\ x - y + 2z = 8 \\ 3x + 2y - z = 3 \end{cases} \]

Solving via substitution or matrix: \( x = 1, y = 2, z = 0 \)

Problem 13

Solve the following system of linear equations:

\[ \begin{cases} x + y + z = 0 \\ x - y + z = 2 \\ 2x + 3y + z = 1 \end{cases} \]

Subtract equations, solve system: \[ x = 1, y = -1, z = 0 \]

Problem 14

Solve the following system of linear equations:

\[ \begin{cases} x + 3y = 10 \\ 2x - y = 4 \end{cases} \]

From (1): \( x = 10 - 3y \)

Substitute into (2): \[ 2(10 - 3y) - y = 4 \Rightarrow 20 - 6y - y = 4 \Rightarrow 7y = 16 \Rightarrow y = \frac{16}{7}, \quad x = 10 - \frac{48}{7} = \frac{22}{7} \]

Problem 15

Solve the following system of linear equations:

\[ \begin{cases} 4x + y = 9 \\ x - 2y = -3 \end{cases} \]

From (2): \( x = -3 + 2y \), plug into (1): \[ 4(-3 + 2y) + y = 9 \Rightarrow -12 + 8y + y = 9 \Rightarrow 9y = 21 \Rightarrow y = \frac{7}{3}, x = -3 + \frac{14}{3} = \frac{5}{3} \]

Problem 16

Solve the following system of linear equations:

\[ \begin{cases} 5x - 2y = 3 \\ 3x + y = 7 \end{cases} \]

From (2): \( y = 7 - 3x \), plug into (1): \[ 5x - 2(7 - 3x) = 3 \Rightarrow 5x - 14 + 6x = 3 \Rightarrow 11x = 17 \Rightarrow x = \frac{17}{11}, y = 7 - \frac{51}{11} = \frac{26}{11} \]

Problem 17

Solve the following system of linear equations:

\[ \begin{cases} x + y + z = 3 \\ x - y + z = 1 \\ x + 2y - z = 4 \end{cases} \]

Subtract (1) and (2): \( 2y = 2 \Rightarrow y = 1 \)

Use in (1): \( x + 1 + z = 3 \Rightarrow x + z = 2 \)

Use in (2): \( x - 1 + z = 1 \Rightarrow x + z = 2 \)

Consistent, then find: \( x = 1, z = 1 \)

Problem 18

Solve the following system of linear equations:

\[ \begin{cases} 2x + 3y = 7 \\ 4x + 6y = 14 \end{cases} \]

Second is a multiple of the first: Infinite solutions.

Problem 19

Solve the following system of linear equations:

\[ \begin{cases} x - 2y + 3z = 9 \\ 2x + y - z = 4 \\ -x + y + z = -2 \end{cases} \]

Solving yields: \( x = 2, y = 1, z = 1 \)

Problem 20

Solve the following system of linear equations:

\[ \begin{cases} x + 2y + z = 6 \\ 2x + 4y + 2z = 12 \\ x + y + z = 5 \end{cases} \]

First and second are multiples \( \Rightarrow \) consistent. Third not consistent \( \Rightarrow \) No solution.

Problem 21

Solve the following system of linear equations:

\[ \begin{cases} x + y = 1 \\ 2x + y = 3 \\ x + 2y = 4 \end{cases} \]

Subtract (1) from (2): \( x = 2 \), then \( y = -1 \). Plug into (3): \( 2 + 2(-1) \neq 4 \Rightarrow \) No solution.

Problem 22

Solve the following system of linear equations:

\[ \begin{cases} 3x + 4y + 2z = 18 \\ x - y + z = 2 \\ 2x + y - z = 5 \end{cases} \]

Use elimination or matrix method. Final: \( x = 2, y = 1, z = 1 \)

Problem 23

Solve the following system of linear equations:

\[ \begin{cases} 2x - y = 1 \\ 3x + y = 9 \end{cases} \]

Add equations: \[ (2x - y) + (3x + y) = 1 + 9 \Rightarrow 5x = 10 \Rightarrow x = 2 \Rightarrow y = 3x - 9 = -3 \]