# How To Solve The Following Equation By Cramer's Rule X1+x2+x3=10;5x1-2x2+x3=3;3x1+x2-4x3=-1?

Write the equations in matrix form. We will use the descriptors "coefficient matrix", "variable vector", and "constant vector" to describe the parts of this equation from left to right.
`| 1  1  1| |x1|   |10|| 5 -2  1|*|x2| = | 3|| 3  1 -4| |x3|   |-1|`

Compute the determinant of the coefficient matrix. For this coefficient matrix, the determinant will be
((1*-2*-4)+(1*1*3)+(1*5*1)) - ((1*1*1)+(1*5*-4)+(1*-2*3))
= (8 + 3 + 5) - (1 - 20 - 6) = 16 - (-25) = 41

Create a new matrix (call it "c1") which is the coefficient matrix with the first column replaced by the constant vector:
`|10  1  1|| 3 -2  1| = c1|-1  1 -4|`

Find the determinant of this c1 matrix. It will be ...
((10*-2*-4)+(1*1*-1)+(1*3*1)) - ((10*1*1)+(1*3*-4)+(1*-2*-1))
= (80 - 1 + 3) - (10 - 12 + 2) = 82 - 0 = 82

The solution for x1 is the determinant of the c1 matrix divided by the determinant of the coefficient matrix.
x1 = 82/41 = 2

To find x2, we do the same thing, only replacing the second column of the coefficient matrix by the constant vector.
`| 1 10  1|| 5  3  1| = c2| 3 -1 -4|`

The determinant of c2 is
((1*3*-4)+(10*1*3)+(1*5*-1) - (1*1*-1)+(10*5*-4)+(1*3*3))
= (-12 + 30 - 5) - (-1 - 200 + 9) = 13 + 192 = 205
The solution for x2 is the determinant of the c2 matrix divided by the determinant of the coefficient matrix.
x2 = 205/41 = 5

To find x3, we do the same thing, only replacing the second column of the coefficient matrix by the constant vector.
`| 1  1 10|| 5 -2  3| = c3| 3  1 -1|`

The determinant of c3 is
((1*-2*-1)+(1*3*3)+(10*5*1)) - ((1*3*1)+(1*5*-1)+(10*-2*3))
= (2 + 9 + 50) - (3 - 5 - 60) = 61 + 62 = 123
The solution for x3 is the determinant of the c3 matrix divided by the determinant of the coefficient matrix.
x3 = 123/41 = 3

Thus, x1=2, x2=5, x3=3.
thanked the writer.