[go: up one dir, main page]

0% found this document useful (0 votes)
36 views2 pages

9 Cramer

Uploaded by

230237
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
36 views2 pages

9 Cramer

Uploaded by

230237
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Cramer’s Rule

Description: Cramer's Rule is a mathematical theorem used to solve a system of linear equations
with as many equations as unknowns. It is particularly effective for small systems of equations. It uses
determinants to find the unique solution to the system. For a system of three linear equations:

a1x+b1y+c1z=d1
a2x+b12y+c2z=d2
a3x+b3y+c3z=d3
Dx Dy Dz
The solution is given by: x= : y= : x=
D D D

 D is the determinant of the coefficient matrix.


 Dx, Dy and Dz are the determinants of matrices formed by replacing the respective
columns with the constants on the right-hand side of the equations (d1,d2,d3).

Algorithm for Cramer’s rule:

o Read the coefficients a1,b1,c1,d1,a2,b2,c2,d2,a3,b3,c3,d3.


o Calculate D=a1(b2c3−c2b3)−b1(a2c3−c2a3)+c1(a2b3-b2a3)
o If D=0 the system has no unique solution (either inconsistent or dependent). Stop.
o Else replace the respective column in the coefficient matrix with the constants
(d1,d2,d3):
o Dx=d1(b2c3−c2b3)−b1(d2c3−c2d3)+c1(d2b3−b2d3)
o Dy=a1(d2c3−c2d3)−d1(a2c3−c2a3)+c1(a2d3−d2a3)
Dz=a1(b2d3−d2b3)−b1(a2d3−d2a3)+d1(a2b3−b2a3)
Dx Dy Dz
o Solve for x,y,z: Using x= : y= : x=
D D D
o Display the values of x ,y, z.

Input:
Output:

You might also like