Cramer's rule is a method for solving systems of linear equations using determinants. This method provides a direct way to calculate solutions of linear equation systems when the coefficient matrix is invertible.
This method is very useful for understanding the relationship between determinants and solutions of linear systems, although it is computationally less efficient compared to Gaussian elimination for large systems.
Now we can formulate Cramer's rule for solving systems of linear equations.
Let A∈Rn×n be an invertible matrix and a1,a2,…,an∈Rn be the columns of A. For vector b∈Rn, the solution x∈Rn of the linear equation system A⋅x=b is given by:
xj=detAdet(a1…aj−1baj+1…an)
for j=1,2,…,n.
To calculate the j-th component of solution x, we replace the j-th column of matrix A with vector b, then calculate the determinant of this modified matrix and divide it by the determinant of the original matrix A.
If A∈Zn×n is an invertible matrix with integer elements and b∈Zn is a vector with integer elements, then the elements of the inverse A−1 and solution x of the system A⋅x=b are rational numbers with denominator that (if not reduced) equals ∣detA∣.
This occurs because determinant calculation only involves addition, subtraction, and multiplication operations, so the determinant of an integer matrix is always an integer. In the inverse formula and Cramer's rule, the only division operation is division by detA.