|
|
|
|
|
Cramer's Rule
How to Examples Exercise How to: Cramer's Rule is a tool in helping solve linear systems, A*x = b, where we are given A, an NxN invertible (non-zero determinant) matrix, and b, an Nx1 column vector. To calculate each component of x, that is, x[i, 1], we need to create a special matrix Ai. Ai is the same as A with its i-th column replaced by b: Ai = A Ai[:, i] = b Now we can compute x[i, 1] using our original matrix A and this new matrix Ai: x[i, 1] = det(Ai) / det(A) Examples: Exercise: |