Cramer's rule is a theorem in linear algebra , which gives the solution of a system of linear equations in terms of determinants .
Computationally, it is generally inefficient and thus not used in practical applications which may involve many equations. However, it is of theoretical importance in that it gives an explicit expression for the solution of the system.
It is named after Gabriel Cramer (1704 - 1752).
The system of equations is represented in matrix multiplication form as:
A
x
=
c
{\displaystyle Ax=c}
where the square matrix
A
{\displaystyle A}
is invertible and the vector
x
{\displaystyle x}
is the column vector of the variables:
(
x
i
)
{\displaystyle (x_{i})}
.
The theorem then states that:
x
i
=
det
(
A
i
)
det
(
A
)
{\displaystyle x_{i}={\det(A_{i}) \over \det(A)}}
where
A
i
{\displaystyle A_{i}}
is the matrix formed by replacing the i th column of
A
{\displaystyle A}
by the column vector
c
{\displaystyle c}
.
Example
Applications to Differential Geometry
Cramer's Rule is also extremely useful for solving problems in differential geometry. Consider the two equations
F
(
x
,
y
,
u
,
v
)
=
0
{\displaystyle F(x,y,u,v)=0\,}
and
G
(
x
,
y
,
u
,
v
)
=
0
{\displaystyle G(x,y,u,v)=0\,}
. When u and v are independent variables, we can define
x
=
X
(
u
,
v
)
{\displaystyle x=X(u,v)\,}
and
y
=
Y
(
u
,
v
)
{\displaystyle y=Y(u,v)\,}
.
Finding an equation for
∂
x
∂
u
{\displaystyle {\frac {\partial x}{\partial u}}}
is a trivial application of Cramer's Rule.
First, calculate the first derivatives of F, G, x and y.
d
F
=
∂
F
∂
x
d
x
+
∂
F
∂
y
d
y
+
∂
F
∂
u
d
u
+
∂
F
∂
v
d
v
=
0
{\displaystyle dF={\frac {\partial F}{\partial x}}dx+{\frac {\partial F}{\partial y}}dy+{\frac {\partial F}{\partial u}}du+{\frac {\partial F}{\partial v}}dv=0}
d
G
=
∂
G
∂
x
d
x
+
∂
G
∂
y
d
y
+
∂
G
∂
u
d
u
+
∂
G
∂
v
d
v
=
0
{\displaystyle dG={\frac {\partial G}{\partial x}}dx+{\frac {\partial G}{\partial y}}dy+{\frac {\partial G}{\partial u}}du+{\frac {\partial G}{\partial v}}dv=0}
d
x
=
∂
X
∂
u
d
u
+
∂
X
∂
v
d
v
{\displaystyle dx={\frac {\partial X}{\partial u}}du+{\frac {\partial X}{\partial v}}dv}
d
y
=
∂
Y
∂
u
d
u
+
∂
Y
∂
v
d
v
{\displaystyle dy={\frac {\partial Y}{\partial u}}du+{\frac {\partial Y}{\partial v}}dv}
Substituting dx, dy into dF and dG, we have:
d
F
=
(
∂
F
∂
x
∂
x
∂
u
+
∂
F
∂
y
∂
y
∂
u
+
∂
F
∂
u
)
d
u
+
(
∂
F
∂
x
∂
x
∂
v
+
∂
F
∂
y
∂
y
∂
v
+
∂
F
∂
v
)
d
v
=
0
{\displaystyle dF=\left({\frac {\partial F}{\partial x}}{\frac {\partial x}{\partial u}}+{\frac {\partial F}{\partial y}}{\frac {\partial y}{\partial u}}+{\frac {\partial F}{\partial u}}\right)du+\left({\frac {\partial F}{\partial x}}{\frac {\partial x}{\partial v}}+{\frac {\partial F}{\partial y}}{\frac {\partial y}{\partial v}}+{\frac {\partial F}{\partial v}}\right)dv=0}
d
G
=
(
∂
G
∂
x
∂
x
∂
u
+
∂
G
∂
y
∂
y
∂
u
+
∂
G
∂
u
)
d
u
+
(
∂
G
∂
x
∂
x
∂
v
+
∂
G
∂
y
∂
y
∂
v
+
∂
G
∂
v
)
d
v
=
0
{\displaystyle dG=\left({\frac {\partial G}{\partial x}}{\frac {\partial x}{\partial u}}+{\frac {\partial G}{\partial y}}{\frac {\partial y}{\partial u}}+{\frac {\partial G}{\partial u}}\right)du+\left({\frac {\partial G}{\partial x}}{\frac {\partial x}{\partial v}}+{\frac {\partial G}{\partial y}}{\frac {\partial y}{\partial v}}+{\frac {\partial G}{\partial v}}\right)dv=0}
Since u, v are both independent, the coefficients of du, dv must be zero. So we can write out equations for the coefficients:
∂
F
∂
x
∂
x
∂
u
+
∂
F
∂
y
∂
y
∂
u
=
−
∂
F
∂
u
{\displaystyle {\frac {\partial F}{\partial x}}{\frac {\partial x}{\partial u}}+{\frac {\partial F}{\partial y}}{\frac {\partial y}{\partial u}}=-{\frac {\partial F}{\partial u}}}
∂
G
∂
x
∂
x
∂
u
+
∂
G
∂
y
∂
y
∂
u
=
−
∂
G
∂
u
{\displaystyle {\frac {\partial G}{\partial x}}{\frac {\partial x}{\partial u}}+{\frac {\partial G}{\partial y}}{\frac {\partial y}{\partial u}}=-{\frac {\partial G}{\partial u}}}
∂
F
∂
x
∂
x
∂
v
+
∂
F
∂
y
∂
y
∂
v
=
−
∂
F
∂
v
{\displaystyle {\frac {\partial F}{\partial x}}{\frac {\partial x}{\partial v}}+{\frac {\partial F}{\partial y}}{\frac {\partial y}{\partial v}}=-{\frac {\partial F}{\partial v}}}
∂
G
∂
x
∂
x
∂
v
+
∂
G
∂
y
∂
y
∂
v
=
−
∂
G
∂
v
{\displaystyle {\frac {\partial G}{\partial x}}{\frac {\partial x}{\partial v}}+{\frac {\partial G}{\partial y}}{\frac {\partial y}{\partial v}}=-{\frac {\partial G}{\partial v}}}
Now, by Cramer's rule, we see that:
∂
x
∂
u
=
|
−
∂
F
∂
u
∂
F
∂
y
−
∂
G
∂
u
∂
G
∂
y
|
|
∂
F
∂
x
∂
F
∂
y
∂
G
∂
x
∂
G
∂
y
|
{\displaystyle {\frac {\partial x}{\partial u}}={\frac {\begin{vmatrix}-{\frac {\partial F}{\partial u}}&{\frac {\partial F}{\partial y}}\\-{\frac {\partial G}{\partial u}}&{\frac {\partial G}{\partial y}}\end{vmatrix}}{\begin{vmatrix}{\frac {\partial F}{\partial x}}&{\frac {\partial F}{\partial y}}\\{\frac {\partial G}{\partial x}}&{\frac {\partial G}{\partial y}}\end{vmatrix}}}}
This is now a formula in terms of two Jacobians:
∂
x
∂
u
=
−
(
∂
(
F
,
G
)
∂
(
y
,
u
)
)
(
∂
(
F
,
G
)
∂
(
x
,
y
)
)
{\displaystyle {\frac {\partial x}{\partial u}}=-{\frac {\left({\frac {\partial \left(F,G\right)}{\partial \left(y,u\right)}}\right)}{\left({\frac {\partial \left(F,G\right)}{\partial \left(x,y\right)}}\right)}}}
Similar formulae can be derived for
∂
x
∂
v
{\displaystyle {\frac {\partial x}{\partial v}}}
,
∂
y
∂
u
{\displaystyle {\frac {\partial y}{\partial u}}}
,
∂
y
∂
v
{\displaystyle {\frac {\partial y}{\partial v}}}
.