Difference between revisions of "Cramer's Rule"
(→General Form for n variables) |
(Tag: Undo) |
||
(6 intermediate revisions by 5 users not shown) | |||
Line 8: | Line 8: | ||
Let <math>M_j</math> be the matrix formed by replacing the jth column of <math>A</math> with <math>\mathbf{b}</math>. | Let <math>M_j</math> be the matrix formed by replacing the jth column of <math>A</math> with <math>\mathbf{b}</math>. | ||
− | Then, Cramer's Rule states that the general solution is <math>x_j = \frac{|M_j|}{A} \; \; \; \forall j \in \mathbb{N}^{\leq n}</math> | + | Then, Cramer's Rule states that the general solution is <math>x_j = \frac{|M_j|}{|A|} \; \; \; \forall j \in \mathbb{N}^{\leq n}</math> |
== General Solution for 2 Variables == | == General Solution for 2 Variables == | ||
− | + | Consider the following system of linear equations in <math>x</math> and <math>y</math>, with constants <math>a, b, c, d, r, s</math>: | |
<cmath>\begin{eqnarray*} | <cmath>\begin{eqnarray*} | ||
− | + | ax + cy &=& r\\ | |
− | + | bx + dy &=& s | |
\end{eqnarray*}</cmath> | \end{eqnarray*}</cmath> | ||
− | Cramer's Rule | + | By Cramer's Rule, the solution to this system is: |
<math>x = \frac{\begin{vmatrix} | <math>x = \frac{\begin{vmatrix} | ||
− | + | r & c \\ | |
− | + | s & d \end{vmatrix}} | |
{\begin{vmatrix} | {\begin{vmatrix} | ||
− | + | a & c \\ | |
− | + | b & d \end{vmatrix}} = \frac{rd - sc}{ad - bc} \qquad y = \frac{\begin{vmatrix} | |
− | + | a & r \\ | |
− | + | b & s \end{vmatrix}} | |
{\begin{vmatrix} | {\begin{vmatrix} | ||
− | + | a & c \\ | |
− | + | b & d \end{vmatrix}} = \frac{sa - rb}{ad - cb}</math> | |
== Example in 3 Variables == | == Example in 3 Variables == | ||
Line 40: | Line 40: | ||
\end{eqnarray*}</cmath> | \end{eqnarray*}</cmath> | ||
− | Here, <math>A = \left( \begin{array}{ccc} 1 & 2 & 3 | + | Here, <math>A = \left( \begin{array}{ccc} 1 & 2 & 3\\ 3 & 1 & 2\\ 2 & 3 & 1 \end{array} \right) \qquad \mathbf{b} = \left( \begin{array}{c} 14\\ 11\\ 11 \end{array} \right)</math> |
− | Thus, <cmath>M_1 = \left( \begin{array}{ccc} 14 & 2 & 3 | + | Thus, <cmath>M_1 = \left( \begin{array}{ccc} 14 & 2 & 3\\ 11 & 1 & 2\\ 11 & 3 & 1 \end{array} \right) \qquad M_2 = \left( \begin{array}{ccc} 1 & 14 & 3\\ 3 & 11 & 2\\ 2 & 11 & 1 \end{array} \right) \qquad M_3 = \left( \begin{array}{ccc} 1 & 2 & 14\\ 3 & 1 & 11\\ 2 & 3 & 11 \end{array} \right)</cmath> |
We calculate the determinants: | We calculate the determinants: | ||
Line 50: | Line 50: | ||
<cmath>x_1 = \frac{|M_1|}{|A|} = \frac{18}{18}=1 \qquad x_2 = \frac{|M_2|}{|A|} = \frac{36}{18} = 2 \qquad x_3 = \frac{|M_3|}{|A|} = \frac{54}{18} = 3</cmath> | <cmath>x_1 = \frac{|M_1|}{|A|} = \frac{18}{18}=1 \qquad x_2 = \frac{|M_2|}{|A|} = \frac{36}{18} = 2 \qquad x_3 = \frac{|M_3|}{|A|} = \frac{54}{18} = 3</cmath> | ||
− | + | [[Category:Algebra]] | |
− | + | [[Category:Linear algebra]] | |
− | [[Category: | ||
[[Category:Theorems]] | [[Category:Theorems]] |
Latest revision as of 17:22, 11 October 2023
Cramer's Rule is a method of solving systems of equations using matrices.
General Form for n variables
Cramer's Rule employs the matrix determinant to solve a system of n linear equations in n variables.
We wish to solve the general linear system for the vector . Here, is the coefficient matrix, is a column vector.
Let be the matrix formed by replacing the jth column of with .
Then, Cramer's Rule states that the general solution is
General Solution for 2 Variables
Consider the following system of linear equations in and , with constants :
By Cramer's Rule, the solution to this system is:
Example in 3 Variables
Here,
Thus,
We calculate the determinants:
Finally, we solve the system: