Linear Algebra/Cramer's Rule

From testwiki
Revision as of 09:36, 25 May 2013 by 111.93.166.126 (talk) (Cramer's Rule)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Template:Wikipedia

Cramer's Rule

Let's try to solve the systems of linear equations:
a11x1+a12x2+a13x3+...+a1nxn=b1
a21x1+a22x2+a23x3+...+a2nxn=b2
a31x1+a32x2+a33x3+...+a3nxn=b3
...
an1x1+an2x2+an3x3+...+annxn=bn

Which is the special case when the number of equations and the number of variables are the same.

Consider the matrix

[a11a12a13a1na21a22a23a2na31a32a33a3nan1an2an3ann]

to be denoted D.

First, we multiply the nth equation by the cofactor Co(anj) for the jth column, and add it all up. This gets us

Co(a1j)a11x1+Co(a1j)a12x2+Co(a1j)a13x3+...+Co(a1j)a1nxn+
Co(a2j)a21x1+Co(a2j)a22x2+Co(a2j)a23x3+...+Co(a2j)a2nxn+
Co(a3j)a31x1+Co(a3j)a32x2+Co(a3j)a33x3+...+Co(a3j)a3nxn+
+...+
Co(anj)an1x1+Co(anj)an2x2+Co(anj)an3x3+...+Co(anj)annxn
=
Co(a1j)b1+Co(a2j)b2+Co(a3j)b3+...+Co(anj)bn.

The left side cancels out except for Co(a1j)a1jxj+Co(a2j)a2jxj+Co(a3j)a3jxj+...+Co(anj)anjxj

which is equal to xj[a11a12a13a1na21a22a23a2na31a32a33a3nan1an2an3ann]=D

and the right side is equal to

[a11a12a13b1a1na21a22a23b2a2na31a32a33b3a3nan1an2an3bnann], to be denoted D(j), which is the same thing as D but with the jth column replaced by bk.

Dividing by D gets xj=DjD.

This formula is called Cramer's Rule, and this solution exists when D is not equal to 0.

In particular, in the process of finding the solution, we also find that this is the only solution, so this solution is unique.

Example

Consider the system of linear equations below.
3x1+2x25x3=15
5x1+x3=23
x2+x3=12

If we only want the solution for, say, x2, we can apply Cramer's Rule to find that its solution is D2D, and since we know
D2=[315552310121],
x2=det[315552310121]det[325501011]=9.

Template:BookCat