# Solving systems of linear equations using matrices, 3 equations, 4 variables

I understand how to solve systems of linear equations when they have the same number of variables as equations. But what about when there are only three equations and 4 variables? For example, when i was looking through an exam paper, i came across this question-

w + x + y + z = 1
2w + x + 3y + z =7
2w + 2x + y + 2z =7

The question does not implicitly ask for us to solve using matrices, but it is in a question about matrices...

Any help would be appreciated!

You can use Gaussian elimination on non-square matrix (similar to square matrix).

Hint: $0w + 0x + 0y + 0z = 0$

• how is it possible to get upper triangular form on a non square matrix? – Ryman May 6 '13 at 9:57
• The important thing when trying to solve a system of linear equations is to make row echelon form. – JiminP May 6 '13 at 10:03
• And there can be some 0s on the diagonal of a triangular matrix. You might encountered some system of linear equations which has no solutions or infinite solutions. – JiminP May 6 '13 at 10:03

when you have $n$ equations and $m$ variables that $n<m$ you must consider $m-n$ variables free and fixed (they can take arbitrary value) then you try to solve your equation with $n$ equations and $n$ variables

as at this problem you can do it:

$w+x+y+z=1$

$2w+x+3y+z=7$

$2w+2x+y+2z=7$

consider $z$ fixed:

1)$w+x+y=1-z$

2)$2w+x+3y=7-z$

3)$2w+2x+y=7-2z$

with substract $2$ from $1$ we will have :$w+2y=6$

with substract $3$ from $-2(2)$ we will have : $-2w-5y=-7$

and so $w=16$ and $y=-5$

and with attention to (1) we will have

$x=1-z-16+5$

that $z$ is free variable (can take any value)

There are a couple of things you have to pay attention to when solving a system of equations.

The first thing you want to pay attention to is the rank of the corresponding matrix, defined as the number of pivot rows in the Reduced Row Echelon form of your matrix (that you get at via Gaussian elimination). You can think of the rank as the number of independent equations. For example, if you have

$a + b = 3$

and

$2a + 2b = 6$,

those equations are not independent. The second one does not tell you anything that the first one doesn't tell you already.

So instead of characterizing a system as "m equations with n unknowns", treat it as "m independent equations with n unkowns".

The next thing you have to know is how to identify the solution space. Linear algebra tells you that if you have a matrix of rank r and n columns (unkowns), you will have n - r free variables that can take any value. Linear algebra also tells you that the complete solution space consists of any particular solution plus the null space of the matrix. To find both a particular solution and a basis for the null space, you will want to use the Reduced Row Echelon form.