Example of Solving a System of Linear Equations by Cramer's Rule.
This solution has been made using the calculator presented on the site.
It is necessary to solve the system of linear equations using Cramer's rule.
  2  x_{1}  +  x_{2}  +  x_{3}  =  13  
  x_{1}  +  x_{2}  +  2  x_{3}  =  9  
3  x_{1}  +  x_{2}  +  x_{3}  =  12 
Let's write the Cramer's rule:
x_{1} = det A_{1} / det A
x_{2} = det A_{2} / det A
x_{3} = det A_{3} / det A
It is impossible to divide by zero. Therefore, if the determinant of A is zero, then it is impossible to use Cramer's rule.
Let's calculate the determinant A. more info
The determinant A consists of the coefficients of the left side of the system.
  2  x_{1}  +  x_{2}  +  x_{3}  =  13  
  x_{1}  +  x_{2}  +  2  x_{3}  =  9  
3  x_{1}  +  x_{2}  +  x_{3}  =  12 
det A =  2  1  1  =  
1  1  2  
3  1  1 
The elements of row 1 multiplied by 1 are added to the corresponding elements of row 3. more info
2  1  1  
1  1  2  
3 + ( 2) * ( 1)  1 + 1 * ( 1)  1 + 1 * ( 1) 
This elementary transformation does not change the value of the determinant.
=  2  1  1  =  
1  1  2  
5  0  0 
Expand the determinant along the row 3. more info

Row number 3 Column number 1 
Element  Row 3 and column 1 have been deleted 

( 1) ^{3 + 1}  *  5  * 


Row number 3 Column number 2 
Element  Row 3 and column 2 have been deleted 

( 1) ^{3 + 2}  *  0  * 


Row number 3 Column number 3 
Element  Row 3 and column 3 have been deleted 

( 1) ^{3 + 3}  *  0  * 

Products are summed. If the element is zero than product is zero too.
= ( 1) ^{3 + 1} * 5 *  1  1  =  
1  2 
= 5 *  1  1  =  
1  2 
= 5 * ( 1 * 2  1 * 1 ) =
= 5 * ( 2  1 ) =
= 5
The determinant A is not zero. It is possible to use the Cramer's rule.
Let's calculate the determinant A_{1}. more info
It is necessary to change column 1 in determinant A to the column of the right side of the system.
System  det A  det A_{1}  



det A_{1} =  13  1  1  =  
9  1  2  
12  1  1 
The elements of row 1 multiplied by 1 are added to the corresponding elements of row 3. more info
13  1  1  
9  1  2  
12 + ( 13) * ( 1)  1 + 1 * ( 1)  1 + 1 * ( 1) 
This elementary transformation does not change the value of the determinant.
=  13  1  1  =  
9  1  2  
25  0  0 
Expand the determinant along the row 3. more info

Row number 3 Column number 1 
Element  Row 3 and column 1 have been deleted 

( 1) ^{3 + 1}  *  25  * 


Row number 3 Column number 2 
Element  Row 3 and column 2 have been deleted 

( 1) ^{3 + 2}  *  0  * 


Row number 3 Column number 3 
Element  Row 3 and column 3 have been deleted 

( 1) ^{3 + 3}  *  0  * 

Products are summed. If the element is zero than product is zero too.
= ( 1) ^{3 + 1} * 25 *  1  1  =  
1  2 
= 25 *  1  1  =  
1  2 
= 25 * ( 1 * 2  1 * 1 ) =
= 25 * ( 2  1 ) =
= 25
Let's calculate the determinant A_{2}. more info
It is necessary to change column 2 in determinant A to the column of the right side of the system.
System  det A  det A_{2}  



det A_{2} =  2  13  1  =  
1  9  2  
3  12  1 
The elements of row 1 are added to the corresponding elements of row 3. more info
2  13  1  
1  9  2  
3 + ( 2)  12 + ( 13)  1 + 1 
This elementary transformation does not change the value of the determinant.
=  2  13  1  =  
1  9  2  
1  1  2 
The elements of row 3 multiplied by 2 are added to the corresponding elements of row 1. more info
2 + 1 * 2  13 + ( 1) * 2  1 + 2 * 2  
1  9  2  
1  1  2 
This elementary transformation does not change the value of the determinant.
=  0  15  5  =  
1  9  2  
1  1  2 
The elements of row 3 are added to the corresponding elements of row 2. more info
0  15  5  
1 + 1  9 + ( 1)  2 + 2  
1  1  2 
This elementary transformation does not change the value of the determinant.
=  0  15  5  =  
0  10  4  
1  1  2 
Expand the determinant along the column 1. more info

Row number 1 Column number 1 
Element  Row 1 and column 1 have been deleted 

( 1) ^{1 + 1}  *  0  * 


Row number 2 Column number 1 
Element  Row 2 and column 1 have been deleted 

( 1) ^{2 + 1}  *  0  * 


Row number 3 Column number 1 
Element  Row 3 and column 1 have been deleted 

( 1) ^{3 + 1}  *  1  * 

Products are summed. If the element is zero than product is zero too.
= ( 1) ^{3 + 1} * 1 *  15  5  =  
10  4 
=  15  5  =  
10  4 
= 15 * 4  5 * ( 10) =
= 60 + 50 =
= 10
Let's calculate the determinant A_{3}. more info
It is necessary to change column 3 in determinant A to the column of the right side of the system.
System  det A  det A_{3}  



det A_{3} =  2  1  13  =  
1  1  9  
3  1  12 
The elements of row 2 multiplied by 1 are added to the corresponding elements of row 1. more info
2 + ( 1) * ( 1)  1 + 1 * ( 1)  13 + ( 9) * ( 1)  
1  1  9  
3  1  12 
This elementary transformation does not change the value of the determinant.
=  1  0  4  =  
1  1  9  
3  1  12 
The elements of row 2 multiplied by 1 are added to the corresponding elements of row 3. more info
1  0  4  
1  1  9  
3 + ( 1) * ( 1)  1 + 1 * ( 1)  12 + ( 9) * ( 1) 
This elementary transformation does not change the value of the determinant.
=  1  0  4  =  
1  1  9  
4  0  21 
Expand the determinant along the column 2. more info

Row number 1 Column number 2 
Element  Row 1 and column 2 have been deleted 

( 1) ^{1 + 2}  *  0  * 


Row number 2 Column number 2 
Element  Row 2 and column 2 have been deleted 

( 1) ^{2 + 2}  *  1  * 


Row number 3 Column number 2 
Element  Row 3 and column 2 have been deleted 

( 1) ^{3 + 2}  *  0  * 

Products are summed. If the element is zero than product is zero too.
= ( 1) ^{2 + 2} * 1 *  1  4  =  
4  21 
=  1  4  =  
4  21 
= 1 * 21  ( 4) * 4 =
= 21 + 16 =
= 5
Result:
x_{1} = det A_{1} / det A = 25/5 = 5
x_{2} = det A_{2} / det A = 10/5 = 2
x_{3} = det A_{3} / det A = 5/5 = 1