Solving Linear Systems of Equations

ECE35 - Summer 2025

Lecture Materials

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} \]

Add the first and second equations:

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

From the third equation, isolate \( z \): \( z = x + 4y - 2 \). Substitute this into the first equation:

\[ x + y + (x + 4y - 2) = 6 \Rightarrow 2x + 5y = 8 \quad (B) \]

Now, let's use elimination with equations (A) and (B) after expressing one variable in terms of others from (B):

From (B): \( y = \frac{8 - 2x}{5} \)

Substitute \( y \) and \( z = 2 - x + y \) into the original equations or use the derived equations (A) and (B).

Alternatively, from \( x + y + z = 6 \) (1) and \( x + 4y - z = 2 \) (3), add them:

\[ (x + y + z) + (x + 4y - z) = 6 + 2 \Rightarrow 2x + 5y = 8 \quad (B) \]

From \( x + y + z = 6 \) (1) and \( 2x - y + 3z = 14 \) (2), add them:

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

Let's use a simpler path to solve: Add (1) and (3): \( (x+y+z) + (x+4y-z) = 6+2 \Rightarrow 2x + 5y = 8 \quad (Eq. 4) \) Multiply (1) by 2: \( 2x + 2y + 2z = 12 \) Subtract (2) from this: \( (2x + 2y + 2z) - (2x - y + 3z) = 12 - 14 \Rightarrow 3y - z = -2 \quad (Eq. 5) \) From Eq. 5: \( z = 3y + 2 \). Substitute \( z \) into Eq. 1: \( x + y + (3y + 2) = 6 \Rightarrow x + 4y = 4 \quad (Eq. 6) \) Now we have a system for \( x \) and \( y \): \( 2x + 5y = 8 \quad (Eq. 4) \) \( x + 4y = 4 \quad (Eq. 6) \) From Eq. 6: \( x = 4 - 4y \). Substitute into Eq. 4: \( 2(4 - 4y) + 5y = 8 \Rightarrow 8 - 8y + 5y = 8 \Rightarrow -3y = 0 \Rightarrow y = 0 \). Then \( x = 4 - 4(0) = 4 \). Finally, \( z = 3y + 2 = 3(0) + 2 = 2 \).

Final solution: \( \boxed{x = 4, y = 0, 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} \]

Using elimination or matrix method:

(1) \( 3x + 2y - z = 1 \)

(2) \( x - y + 2z = 3 \)

(3) \( 2x + y + z = 4 \)

Add (2) and (3): \( (x - y + 2z) + (2x + y + z) = 3 + 4 \Rightarrow 3x + 3z = 7 \quad (A) \)

From (3), \( y = 4 - 2x - z \). Substitute into (1):

\[ 3x + 2(4 - 2x - z) - z = 1 \] \[ 3x + 8 - 4x - 2z - z = 1 \] \[ -x - 3z = -7 \Rightarrow x + 3z = 7 \quad (B) \]

Now solve the system for \( x \) and \( z \):

\[ 3x + 3z = 7 \quad (A) \] \[ x + 3z = 7 \quad (B) \]

Subtract (B) from (A): \( (3x + 3z) - (x + 3z) = 7 - 7 \Rightarrow 2x = 0 \Rightarrow x = 0 \).

Substitute \( x = 0 \) into (B): \( 0 + 3z = 7 \Rightarrow z = \frac{7}{3} \).

Substitute \( x = 0 \) and \( z = \frac{7}{3} \) into (3):

\[ 2(0) + y + \frac{7}{3} = 4 \] \[ y = 4 - \frac{7}{3} = \frac{12 - 7}{3} = \frac{5}{3} \]

Final solution: \( \boxed{x = 0, y = \frac{5}{3}, z = \frac{7}{3}} \)

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} \]

Using elimination or matrix method:

(1) \( x + 2y + 3z = 10 \)

(2) \( 2x + 3y + z = 8 \)

(3) \( 3x + y + z = 7 \)

Subtract (2) from (3): \( (3x + y + z) - (2x + 3y + z) = 7 - 8 \Rightarrow x - 2y = -1 \quad (A) \)

Multiply (2) by 3: \( 6x + 9y + 3z = 24 \). Subtract (1) from this:

\[ (6x + 9y + 3z) - (x + 2y + 3z) = 24 - 10 \] \[ 5x + 7y = 14 \quad (B) \]

From (A): \( x = 2y - 1 \). Substitute into (B):

\[ 5(2y - 1) + 7y = 14 \] \[ 10y - 5 + 7y = 14 \] \[ 17y = 19 \Rightarrow y = \frac{19}{17} \]

Substitute \( y = \frac{19}{17} \) into \( x = 2y - 1 \):

\[ x = 2\left(\frac{19}{17}\right) - 1 = \frac{38}{17} - \frac{17}{17} = \frac{21}{17} \]

Substitute \( x = \frac{21}{17} \) and \( y = \frac{19}{17} \) into (3):

\[ 3\left(\frac{21}{17}\right) + \frac{19}{17} + z = 7 \] \[ \frac{63}{17} + \frac{19}{17} + z = 7 \] \[ \frac{82}{17} + z = 7 \] \[ z = 7 - \frac{82}{17} = \frac{119 - 82}{17} = \frac{37}{17} \]

Final solution: \( \boxed{x = \frac{21}{17}, y = \frac{19}{17}, z = \frac{37}{17}} \)

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 + 2) + 1 \Rightarrow x = z + 3 \). This is identical to the third equation.

This system has infinitely many solutions. We can express them in terms of a parameter, say \( t \).

Let \( z = t \).

From \( y - z = 2 \Rightarrow y - t = 2 \Rightarrow y = t + 2 \).

From \( x - y = 1 \Rightarrow x - (t + 2) = 1 \Rightarrow x - t - 2 = 1 \Rightarrow x = t + 3 \).

Parametric solution: \( \boxed{x = t + 3,\ y = t + 2,\ z = t} \) for any real number \( t \).

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 of the first equation \( \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} \]

Using elimination or matrix method:

(1) \( 2x + 3y + z = 9 \)

(2) \( x - y + 2z = 8 \)

(3) \( 3x + 2y - z = 3 \)

Add (1) and (3): \( (2x + 3y + z) + (3x + 2y - z) = 9 + 3 \Rightarrow 5x + 5y = 12 \quad (A) \)

Multiply (3) by 2: \( 6x + 4y - 2z = 6 \). Add this to (2):

\[ (x - y + 2z) + (6x + 4y - 2z) = 8 + 6 \] \[ 7x + 3y = 14 \quad (B) \]

From (A): \( y = \frac{12 - 5x}{5} \). Substitute into (B):

\[ 7x + 3\left(\frac{12 - 5x}{5}\right) = 14 \] Multiply by 5 to clear denominator: \[ 35x + 3(12 - 5x) = 70 \] \[ 35x + 36 - 15x = 70 \] \[ 20x = 34 \Rightarrow x = \frac{34}{20} = \frac{17}{10} \]

Substitute \( x = \frac{17}{10} \) into \( y = \frac{12 - 5x}{5} \):

\[ y = \frac{12 - 5\left(\frac{17}{10}\right)}{5} = \frac{12 - \frac{17}{2}}{5} = \frac{\frac{24 - 17}{2}}{5} = \frac{\frac{7}{2}}{5} = \frac{7}{10} \]

Substitute \( x = \frac{17}{10} \) and \( y = \frac{7}{10} \) into (1):

\[ 2\left(\frac{17}{10}\right) + 3\left(\frac{7}{10}\right) + z = 9 \] \[ \frac{34}{10} + \frac{21}{10} + z = 9 \] \[ \frac{55}{10} + z = 9 \] \[ z = 9 - \frac{55}{10} = \frac{90 - 55}{10} = \frac{35}{10} = \frac{7}{2} \]

Final solution: \( \boxed{x = \frac{17}{10}, y = \frac{7}{10}, z = \frac{7}{2}} \)

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} \]

Using elimination or matrix method:

(1) \( x + y + z = 0 \)

(2) \( x - y + z = 2 \)

(3) \( 2x + 3y + z = 1 \)

Add (1) and (2): \( (x + y + z) + (x - y + z) = 0 + 2 \Rightarrow 2x + 2z = 2 \Rightarrow x + z = 1 \quad (A) \)

Subtract (2) from (1): \( (x + y + z) - (x - y + z) = 0 - 2 \Rightarrow 2y = -2 \Rightarrow y = -1 \).

Substitute \( y = -1 \) into (3):

\[ 2x + 3(-1) + z = 1 \] \[ 2x - 3 + z = 1 \] \[ 2x + z = 4 \quad (B) \]

Now solve the system for \( x \) and \( z \):

\[ x + z = 1 \quad (A) \] \[ 2x + z = 4 \quad (B) \]

Subtract (A) from (B): \( (2x + z) - (x + z) = 4 - 1 \Rightarrow x = 3 \).

Substitute \( x = 3 \) into (A): \( 3 + z = 1 \Rightarrow z = -2 \).

Final solution: \( \boxed{x = 3, y = -1, z = -2} \)

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} \]

Using elimination or matrix method:

(1) \( x + y + z = 3 \)

(2) \( x - y + z = 1 \)

(3) \( x + 2y - z = 4 \)

Subtract (2) from (1): \( (x + y + z) - (x - y + z) = 3 - 1 \Rightarrow 2y = 2 \Rightarrow y = 1 \).

Substitute \( y = 1 \) into (1): \( x + 1 + z = 3 \Rightarrow x + z = 2 \quad (A) \)

Substitute \( y = 1 \) into (3): \( x + 2(1) - z = 4 \Rightarrow x + 2 - z = 4 \Rightarrow x - z = 2 \quad (B) \)

Now solve the system for \( x \) and \( z \):

\[ x + z = 2 \quad (A) \] \[ x - z = 2 \quad (B) \]

Add (A) and (B): \( (x + z) + (x - z) = 2 + 2 \Rightarrow 2x = 4 \Rightarrow x = 2 \).

Substitute \( x = 2 \) into (A): \( 2 + z = 2 \Rightarrow z = 0 \).

Final solution: \( \boxed{x = 2, y = 1, z = 0} \)

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} \]

Using elimination or matrix method:

(1) \( x - 2y + 3z = 9 \)

(2) \( 2x + y - z = 4 \)

(3) \( -x + y + z = -2 \)

Add (2) and (3): \( (2x + y - z) + (-x + y + z) = 4 + (-2) \Rightarrow x + 2y = 2 \quad (A) \)

Multiply (2) by 3: \( 6x + 3y - 3z = 12 \). Add this to (1):

\[ (x - 2y + 3z) + (6x + 3y - 3z) = 9 + 12 \] \[ 7x + y = 21 \quad (B) \]

From (B): \( y = 21 - 7x \). Substitute into (A):

\[ x + 2(21 - 7x) = 2 \] \[ x + 42 - 14x = 2 \] \[ -13x = -40 \Rightarrow x = \frac{40}{13} \]

Substitute \( x = \frac{40}{13} \) into \( y = 21 - 7x \):

\[ y = 21 - 7\left(\frac{40}{13}\right) = \frac{273 - 280}{13} = -\frac{7}{13} \]

Substitute \( x = \frac{40}{13} \) and \( y = -\frac{7}{13} \) into (3):

\[ -\frac{40}{13} - \frac{7}{13} + z = -2 \] \[ -\frac{47}{13} + z = -2 \] \[ z = -2 + \frac{47}{13} = \frac{-26 + 47}{13} = \frac{21}{13} \]

Final solution: \( \boxed{x = \frac{40}{13}, y = -\frac{7}{13}, z = \frac{21}{13}} \)

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} \]

Observe the first two equations:

(1) \( x + 2y + z = 6 \)

(2) \( 2x + 4y + 2z = 12 \)

Equation (2) is simply 2 times Equation (1) (\( 2(x + 2y + z) = 2(6) \Rightarrow 2x + 4y + 2z = 12 \)). This means the first two equations are dependent and represent the same plane.

Now consider the system formed by equation (1) and (3):

(1) \( x + 2y + z = 6 \)

(3) \( x + y + z = 5 \)

Subtract (3) from (1): \( (x + 2y + z) - (x + y + z) = 6 - 5 \Rightarrow y = 1 \).

Substitute \( y = 1 \) back into (1) and (3):

From (1): \( x + 2(1) + z = 6 \Rightarrow x + z = 4 \).

From (3): \( x + 1 + z = 5 \Rightarrow x + z = 4 \).

Since \( x + z = 4 \) holds for both equations (after substituting \( y=1 \)), the system is consistent and has infinitely many solutions. We can express them in terms of a parameter, say \( t \).

Let \( z = t \).

From \( x + z = 4 \Rightarrow x + t = 4 \Rightarrow x = 4 - t \).

The solution is \( \boxed{x = 4 - t,\ y = 1,\ z = t} \) for any real number \( t \).

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): \( (2x + y) - (x + y) = 3 - 1 \Rightarrow x = 2 \), then \( y = -1 \). Plug into (3): \( 2 + 2(-1) = 0 \). Since \( 0 \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} \]

Using elimination or matrix method:

(1) \( 3x + 4y + 2z = 18 \)

(2) \( x - y + z = 2 \)

(3) \( 2x + y - z = 5 \)

Add (2) and (3): \( (x - y + z) + (2x + y - z) = 2 + 5 \Rightarrow 3x = 7 \Rightarrow x = \frac{7}{3} \).

From (2), \( z = 2 - x + y \). Substitute into (1):

\[ 3x + 4y + 2(2 - x + y) = 18 \] \[ 3x + 4y + 4 - 2x + 2y = 18 \] \[ x + 6y = 14 \]

Substitute \( x = \frac{7}{3} \) into \( x + 6y = 14 \):

\[ \frac{7}{3} + 6y = 14 \] \[ 6y = 14 - \frac{7}{3} = \frac{42 - 7}{3} = \frac{35}{3} \] \[ y = \frac{35}{18} \]

Substitute \( x = \frac{7}{3} \) and \( y = \frac{35}{18} \) into \( z = 2 - x + y \):

\[ z = 2 - \frac{7}{3} + \frac{35}{18} = \frac{36}{18} - \frac{42}{18} + \frac{35}{18} = \frac{36 - 42 + 35}{18} = \frac{29}{18} \]

Final solution: \( \boxed{x = \frac{7}{3}, y = \frac{35}{18}, z = \frac{29}{18}} \)

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 = 9 - 3x = 9 - 6 = 3 \]