x-y-z=6
2x-y-4z=-15
5x-3y+z=-10
Your equations, as written, had typos in them. I've assumed that some of the equal-signs should have been minus-signs and altered then appropriately.
In matrix form the equations would be
AX = b
Where A is the matrix
1 -1 -1
2 -1 -4
5 -3 1
X is your unknown column vector [x y z] and b is a scalar column vector [ 6 -15 -10].
The solution is given by X = A^(-1)b, where A^(-1) is the inverse matrix of A.
We now do Gauss-Jordan elimination on A to get its inverse. We write this out as,
1 -1 -1 | 1 0 0 --- [Row 1]
2 -1 -4 | 0 1 0 --- [Row 2]
5 -3 1 | 0 0 1 --- [Row 3]
R2 - 2*R1, R3 - 5*R1,
1 -1 -1 | 1 0 0 --- [Row 1]
0 1 -2 | -2 1 0 --- [Row 2]
0 2 6 | -5 0 1 --- [Row 3]
R1 + R2, R3 - 2*R2
1 0 -3 | -1 1 0 --- [Row 1]
0 1 -2 | -2 1 0 --- [Row 2]
0 0 10 | -1 -2 1 --- [Row 3]
R3/10,
1 0 -3 | -1 1 0 --- [Row 1]
0 1 -2 | -2 1 0 --- [Row 2]
0 0 1 | -0.1 -0.2 0.1 --- [Row 3]
R1 + 3*R3, R2 + 2*R3,
1 0 0 | -1.3 0.4 0.3 --- [Row 1]
0 1 0 | -2.2 0.6 0.2 --- [Row 2]
0 0 1 | -0.1 -0.2 0.1 --- [Row 3]
Now that we have an identity marix on the lhs, then the rhs is the inverse matrix, so
A^(-1) = | -1.3 0.4 0.3 |
| -2.2 0.6 0.2 |
| -0.1 -0.2 0.1 |
And X = A^(-1)b
X = | -1.3 0.4 0.3 | | 6 | = |-1.3*6 +0.4*(-15) + 0.3*(-10) |
| -2.2 0.6 0.2 | | -15 | |-2.2*6 +0.6*(-15) + 0.2*(-10) |
| -0.1 -0.2 0.1 | | -10 | |-0.1*6 -0.2*(-15) + 0.1*(-10) |
X = | -7.8 - 6 - 3 |
| -13.2 - 9 - 2 |
| -0.6 + 3 - 1 |
X = | -16.8 |
| -24.2 |
| 1.4 |
The solution is: x = -16.8, y = -24.2, z = 1.4