# System of Linear Equations

See how to solve a system of linear equations

and graph a system of linear inequalities.

16 examples and their solutions.

## System of Linear Equations: Using Graph

### Example

x - y = 4

2x + y = 5

Solution 2x + y = 5

x - y = 4

-y = -x + 4

y = x - 4- [1]

2x + y = 5

y = -2x + 5- [1]

[2]

(3, 1)

-y = -x + 4

y = x - 4- [1]

2x + y = 5

y = -2x + 5- [1]

(3, 1)

[1]

To graph the linear equations,

change the linear equations to [y = ...].

change the linear equations to [y = ...].

[2]

Graph y = x - 4 and y = -2x + 5.

The intersecting point is (3, 1).

The intersecting point is (3, 1).

Close

### Example

x - y = 4

2x - 2y = 8

Solution 2x - 2y = 8

x - y = 4

-y = -x + 4

y = x - 4

2x - 2y = 8

x - y = 4

-y = -x + 4

y = x - 4

Infinitely many solutions- [1]

-y = -x + 4

y = x - 4

2x - 2y = 8

x - y = 4

-y = -x + 4

y = x - 4

Infinitely many solutions- [1]

[1]

x - y = 4 → y = x - 4

2x - 2y = 8 → y = x - 4

Both graphs are the same.

So there are infinitely many intersecting points.

So this system has

infinitely many solutions.

2x - 2y = 8 → y = x - 4

Both graphs are the same.

So there are infinitely many intersecting points.

So this system has

infinitely many solutions.

Close

### Example

x - y = 4

x - y = -3

Solution x - y = -3

x - y = 4

-y = -x + 4

y = x - 4

x - y = -3

-y = -x - 3

y = x + 3

No solution- [1]

-y = -x + 4

y = x - 4

x - y = -3

-y = -x - 3

y = x + 3

No solution- [1]

[1]

x - y = 4 → y = x - 4

x - y = -3 → y = x + 3

These two lines are parallel.

So these two lines don't meet.

(= no intersecting points)

So this system has

no solution.

x - y = -3 → y = x + 3

These two lines are parallel.

So these two lines don't meet.

(= no intersecting points)

So this system has

no solution.

Close

## Substitution Method

### Example

x - y = 4

2x + y = 5

Solution 2x + y = 5

x - y = 4

x = y + 4

2(y + 4) + y = 5- [1]

2y + 8 + y = 5

3y = -3

y = -1

x = -1 + 4- [2]

= 3

x = 3, y = -1

x = y + 4

2(y + 4) + y = 5- [1]

2y + 8 + y = 5

3y = -3

y = -1

x = -1 + 4- [2]

= 3

x = 3, y = -1

[1]

x = y + 4 → 2x + y = 5

[2]

y = -1 → x = y + 4

Close

### Example

x - y = 4

2x - 2y = 8

Solution 2x - 2y = 8

x - y = 4

x = y + 4

2(y + 4) - 2y = 8- [1]

2y + 8 - 2y = 8

0 = 0

Infinitely many solutions- [2]

x = y + 4

2(y + 4) - 2y = 8- [1]

2y + 8 - 2y = 8

0 = 0

Infinitely many solutions- [2]

[1]

x = y + 4 → 2x - 2y = 8

[2]

0 = 0

This is always true.

If you get an equation that is always true,

then the system has

infinitely many solutions.

This is always true.

If you get an equation that is always true,

then the system has

infinitely many solutions.

Close

### Example

x - y = 4

x - y = -3

Solution x - y = -3

x - y = 4

x = y + 4

y + 4 - y = -3- [1]

4 = -3

No solution- [2]

x = y + 4

y + 4 - y = -3- [1]

4 = -3

No solution- [2]

[1]

x = y + 4 → x - y = -3

[2]

4 = -3

This is always false.

If you get an equation that is always false,

then the system has

no solution.

This is always false.

If you get an equation that is always false,

then the system has

no solution.

Close

## Elimination Method

### Example

x - y = 4

2x + y = 5

Solution 2x + y = 5

x - y = 4

+2x + y = 5

3x = 9- [1]

x = 3

3 - y = 4- [2]

-y = 1

y = -1

x = 3, y = -1

+2x + y = 5

3x = 9- [1]

x = 3

3 - y = 4- [2]

-y = 1

y = -1

x = 3, y = -1

[1]

To remove -y and +y,

add the equations.

add the equations.

[2]

x = 3 → x - y = 4

Close

### Example

3x + 2y = 7

2x - 3y = -4

Solution 2x - 3y = -4

6x + 4y = 14

-6x - 9y = -12- [1]

13y = 26- [2]

y = 2

3x + 2⋅2 = 7- [3]

3x + 4 = 7

3x = 3

x = 1

x = 1, y = 2

-6x - 9y = -12- [1]

13y = 26- [2]

y = 2

3x + 2⋅2 = 7- [3]

3x + 4 = 7

3x = 3

x = 1

x = 1, y = 2

[1]

First make 3x and 2x

the same (or the opposites).

3x + 2y = 7 [×2]→ 6x + 4y = 14

2x - 3y = -4 [×3]→ 6x - 9y = -12

the same (or the opposites).

3x + 2y = 7 [×2]→ 6x + 4y = 14

2x - 3y = -4 [×3]→ 6x - 9y = -12

[2]

To remove 6x and 6x,

subtract the equations.

subtract the equations.

[3]

y = 2 → 3x + 2y = 7

Close

### Example

x - y = 4

2x - 2y = 8

Solution 2x - 2y = 8

2x - 2y = 8- [1]

-2x - 2y = 8

0 = 0- [2]

Infinitely many solutions- [3]

-2x - 2y = 8

0 = 0- [2]

Infinitely many solutions- [3]

[1]

First make x and 2x

the same (or the opposites).

x - y = 4 [×2]→ 2x - 2y = 8

2x - 2y = 8

the same (or the opposites).

x - y = 4 [×2]→ 2x - 2y = 8

2x - 2y = 8

[2]

To remove 2x and 2x,

subtract the equations.

subtract the equations.

[3]

0 = 0

This is always true.

If you get an equation that is always true,

then the system has

infinitely many solutions.

This is always true.

If you get an equation that is always true,

then the system has

infinitely many solutions.

Close

### Example

x - y = 4

x - y = -3

Solution x - y = -3

x - y = 4

-x - y = -3

0 = 7- [1]

No solution- [2]

-x - y = -3

0 = 7- [1]

No solution- [2]

[1]

To remove x and x,

subtract the equations.

subtract the equations.

[2]

0 = 7

This is always false.

If you get an equation that is always false,

then the system has

no solution.

This is always false.

If you get an equation that is always false,

then the system has

no solution.

Close

## System of Linear Inequalities

### Example

x + y > 2

2x - y ≥ 3

Solution 2x - y ≥ 3

x + y > 2

y > -x + 2

2x - y ≥ 3

-y ≥ -2x + 3

y ≤ 2x - 3 - [1]

y > -x + 2

2x - y ≥ 3

-y ≥ -2x + 3

y ≤ 2x - 3 - [1]

[1]

To graph the linear inequalities,

change the linear inequalities to [y = ...].

change the linear inequalities to [y = ...].

↓

↓

The intersecting region is the answer.

Close

### Example

2x - y > -3

2x - y ≥ 1

Solution 2x - y ≥ 1

2x - y > -3

-y > -2x - 3

y < 2x + 3

2x - y ≥ 1

-y ≥ -2x + 1

y ≤ 2x - 1

-y > -2x - 3

y < 2x + 3

2x - y ≥ 1

-y ≥ -2x + 1

y ≤ 2x - 1

↓

↓

The intersecting region is y ≤ 2x - 1.

Close

### Example

3x + y ≥ 4

3x + y < -2

Solution 3x + y < -2

3x + y ≥ 4

y ≥ -3x + 4

3x + y < -2

y < -3x -2

y ≥ -3x + 4

3x + y < -2

y < -3x -2

↓

↓

No solution- [1]

[1]

No intersecting region → no solution

Close

## Linear Programming

### Example

For the given system of linear inequalities,

find the maximum value of x + y.

x ≥ 0

y ≥ 0

3x + y ≤ 9

x + 2y ≤ 8

Solution find the maximum value of x + y.

x ≥ 0

y ≥ 0

3x + y ≤ 9

x + 2y ≤ 8

x ≥ 0

y ≥ 0

3x + y ≤ 9

y ≤ -3x + 9

x + 2y ≤ 8

2y ≤ -x + 8

y ≤ -12x + 4- [1]

x + y = k

y = -x + k- [2]

[3]

y ≥ 0

3x + y ≤ 9

y ≤ -3x + 9

x + 2y ≤ 8

2y ≤ -x + 8

y ≤ -12x + 4- [1]

x + y = k

y = -x + k- [2]

[1]

To graph the linear inequalities,

change the linear inequalities to [y = ...].

change the linear inequalities to [y = ...].

[2]

Set x + y = k.

→ y = -x + k

→ y = -x + k

[3]

Graph the linear inequalities

on a coordinate plane.

Color the intersecting region.

Draw y = -x + k.

k is the y-intercept of the line.

So k is maximum

when the line passes through the green point.

(slope: -3 < -1 < -1/2)

on a coordinate plane.

Color the intersecting region.

Draw y = -x + k.

k is the y-intercept of the line.

So k is maximum

when the line passes through the green point.

(slope: -3 < -1 < -1/2)

↓

-3x + 9 = -12x + 4- [4]

-6x + 18 = -x + 8

-5x = -10

x = 2

y = -3⋅2 + 9- [5]

= -6 + 9

= 3

(x, y) = (2, 3)

[4]

The green point is the intersecting point of

y = -3x + 9 and y = [-1/2]x + 4.

So, to find the green point,

set -3x + 9 = [-1/2]x + 4.

y = -3x + 9 and y = [-1/2]x + 4.

So, to find the green point,

set -3x + 9 = [-1/2]x + 4.

[5]

x = 2 → y = -3x + 9

↓

k = 2 + 3- [6]

= 5

[6]

Green point: (2, 3)

→ k = x + y

(x + y = k)

→ k = x + y

(x + y = k)

Close

## System of Equations (Three Variables)

### Example

x + y + z = 3

2x - y + z = 6

x + 2y - z = -4

Solution 2x - y + z = 6

x + 2y - z = -4

2x - y + z = 6

-x + y + z = 3

x - 2y = 3- [1]

x + y + z = 3

+x + 2y - z = -4

2x + 3y = -1- [2]

2x - 4y = 6

-2x + 3y = -1- [3]

7y = -7- [4]

y = -1

x - 2⋅(-1) = 3- [5]

x + 2 = 3

x = 1

1 + (-1) + z = 3- [6]

z = 3

x = 1, y = -1, z = 3

-x + y + z = 3

x - 2y = 3- [1]

x + y + z = 3

+x + 2y - z = -4

2x + 3y = -1- [2]

2x - 4y = 6

-2x + 3y = -1- [3]

7y = -7- [4]

y = -1

x - 2⋅(-1) = 3- [5]

x + 2 = 3

x = 1

1 + (-1) + z = 3- [6]

z = 3

x = 1, y = -1, z = 3

[1]

Pick 2x - y + z = 6 and x + y + z = 3.

To remove +z and +z,

subtract the equations.

To remove +z and +z,

subtract the equations.

[2]

Pick x + y + z = 3 and x + 2y - z = -4.

To remove +z and -z,

add the equations.

To remove +z and -z,

add the equations.

[3]

x - 2y = 3

2x + 3y = -1

Solve this system of linear equations.

First make x and 2x

the same (or the opposites).

x - 2y = 3 [×2]→ 2x - 6y = 9

2x + 3y = -1

2x + 3y = -1

Solve this system of linear equations.

First make x and 2x

the same (or the opposites).

x - 2y = 3 [×2]→ 2x - 6y = 9

2x + 3y = -1

[4]

To remove 2x and 2x,

subtract the equations.

subtract the equations.

[5]

y = -1 → x - 2y = 3

[6]

x = 1, y = -1 → x + y + z = 3

Close

### Example

x + 4y = 5

y + 4z = 7

z + 4x = 8

x + y + z = ?

Solution y + 4z = 7

z + 4x = 8

x + y + z = ?

x + 4y = 5

y + 4z = 7

+4x + z = 8

5x + 5y + 5z = 20

5(x + y + z) = 20

x + y + z = 4

y + 4z = 7

+4x + z = 8

5x + 5y + 5z = 20

5(x + y + z) = 20

x + y + z = 4