To use Cramer’s Rule we need to construct a 4×4 matrix based on the coefficients of the 4 variables. But we can simplify this to a 3×3 matrix by noting that z=-y because y+z=0. So z+w=-2 can be replaced by -y+w=-2. We work out the determinant associated with the new coefficient matrix for (w x y):
| 0 1 1 |
| 1 0 -1 |
| 1 -1 0 | which has the value ∆=(0(0-1)-1(0-(-1))+1(-1))=(0-1-1)=-2.
We use this value to find the variables as the common divisor.
w=
| 4 1 1 |
| -2 0 -1 | × -½
| 2 -1 0 |
Note that we omit the constant for the second equation because we already included y+z=0 when we reduced the problem to the new matrix.
Evaluating the determinant we get w=-½(4(-1)-2+2)=2.
x=
| 0 4 1 |
| 1 -2 -1 | × -½
| 1 2 0 |
x=-½(-4+4)=0.
y=
| 0 1 4 |
| 1 0 -2 | × -½
| 1 -1 2 |
y=-½(-4-4)=4
z=-4.
So the solution is (w,x,y,z)=(2,0,4,-4).