# Solve the following system of linear equations using Cramer’s rule (not theshortcut) x+y-z = 5 x-y+2z = -3 2x+y+z = 3Show step by step solution to explain the answer

Posted on

write the  given equations in matrix form` `` `

`[[1 ,1 ,-1],[1,-1,2],[2,1,1]]``((x),(y),(z)) ``='((5),(-3),(3))`

which is of the form AX = B,

matrix A = `[[1,1,-1],[1,-1,2],[2,1,1]]` , matrix X = ` ``((x),(y),(z))` , and B = `((5),(-3),(3))` ,

let us find detA = |A| = 1(-1-2) -1(1-4) -1(1+2) = 1(-3)-1(-3)-1(3) = -3+3-3 = -3 , thus |A| = -3

In Cramer's Rule we create three matrices B1,B2,B3, by combining the columns of matrix A and matrix B

In B1 the first column corresponds to matrix B and the other two columns are of matrix A , that is

B1 = ` ``[[5,1,-1],[-3,-1,2],[3,1,1]]` , now we find detB1= |B1| = 5(-1-2) -1(-3-6)-1(-3+3) = 5(-3) -1(-9) -1(0)= -15+9 = -6

thus |B1| = -6

By Cramer's Rule we have x = |B1|/ |A| = -6/-3 = 2 , thus x = 2

similarly we find y = |B2|/ |A|,and z= |B3|/|A|

matrix B2 has the second colum as the column of matrix B, and the remaining columns of the matrix A, that is

B2 = `[[1,5,-1],[1,-3,2],[2,3,1]]`

|B2| = 1(-3-6)-5(1-4) -1(3+6)= 1(-9) -5(-3) -1(9) = -9 +15-9 = 15-18 = -3, thus |B2| = -3

such that y= |B2|/|A| = -3/-3 = 1, thus y= 1

In B3 the last column corresponds to matrix B and the remaining columns to matrix A, such that,

B3 = `[[1,1,5],[1,-1,-3],[2,1,3]]`

|B3| = 1(-3+3)-1(3+6)+5(1+2) = 1(0)-1(9)+5(3) = 0 -9 +15 = 6

thus |B3| = 6 , such that z= |B3|/|A| = 6/-3 = -2

thus x= 2, y= 1 and z= -2 .

Posted on

We can write the above three equations in matrix format.

|1 1 -1| |x|     |5|

|1 -1 2| |y| =  |-3|

|2 1 1 | |z|      | 3|

We have to find the determinant of the following,

|1 1 -1|

|1 -1 2|

|2 1 1 |

D = -3

Then find Dx from the following.

|5 1 -1|

|-3 -1 2|

|3 1 1 |

Dx = -6

Dy,

|1 5 -1|

|1 -3 2|

|2 3 1 |

Dy = -3

Dz,

|1 1 5|

|1 -1 -3|

|2 1 3 |

Dz = 6

Therefore according to Cramer's Rule,

`x = (Dx)/D = -6/(-3) = 2`

`y = (Dy)/D = (-3)/(-3) = 1`

`z = (Dz)/D = 6/(-3) = -2.`

The solutions are x = 2, y = 1 and z =-2

Sources: