# solving systems of equations: college algebra?

Solve the system of equations:

x-y+4z=20

2x+z=4

x+2y+z= -4

Relevance

In this case, there's an easy way. Take the second equation:

2x + z = 4

and transform it to:

z = 4 - 2x

Substitute that into the first and third equations, and you have two equations in two unknowns. Solve using any method you like.

However, there's a more general approach which might help.

Write the system of equations as an augmented matrix:

r1: [ 1 -1 4 | 20 ]

r2: [ 2 0 1 | 4 ]

r3: [ 1 2 1 | -4 ]

Now, the operations which you are allowed to perform are:

- Interchanging rows.

- Multiplying a row by a constant.

- Adding or subtracting some multiple of one row from another.

So, for example, r3 <- r3 - r1:

r1: [ 1 -1 4 | 20 ]

r2: [ 2 0 1 | 4 ]

r3: [ 0 3 -3 | -24 ]

r2 <- r2 - 2r1:

r1: [ 1 -1 4 | 20 ]

r2: [ 0 2 -7 | -36 ]

r3: [ 0 3 -3 | -24 ]

r3 <- r3 - r2:

r1: [ 1 -1 4 | 20 ]

r2: [ 0 2 -7 | -36 ]

r3: [ 0 1 4 | 12 ]

r2 <- r2 - 2r3

r1: [ 1 -1 4 | 20 ]

r2: [ 0 0 -15 | -60 ]

r3: [ 0 1 4 | 12 ]

r2 <- -r2/15:

r1: [ 1 -1 4 | 20 ]

r2: [ 0 0 1 | 4 ]

r3: [ 0 1 4 | 12 ]

r3 <- r3 - 4r2:

r1: [ 1 -1 4 | 20 ]

r2: [ 0 0 1 | 4 ]

r3: [ 0 1 0 | -4 ]

r1 <- r1 + r3:

r1: [ 1 0 4 | 16 ]

r2: [ 0 0 1 | 4 ]

r3: [ 0 1 0 | -4 ]

r1 <- r1 - 4r2:

r1: [ 1 0 0 | 0 ]

r2: [ 0 0 1 | 4 ]

r3: [ 0 1 0 | -4 ]