<?xml version="1.0" encoding="UTF-8"?>

<record version="4" id="3169">
 <title>example of Cramer's rule</title>
 <name>ExampleOfCramersRule</name>
 <created>2002-07-15 22:56:38</created>
 <modified>2005-05-23 22:46:49</modified>
 <type>Example</type>
<parent id="626">Cramer's rule</parent>
 <creator id="3" name="drini"/>
 <author id="3" name="drini"/>
 <classification>
	<category scheme="msc" code="15A15"/>
 </classification>
 <preamble>\usepackage{graphicx}
%\usepackage{xypic} 
\usepackage{amsmath}
\usepackage{bbm}
\newcommand{\Z}{\mathbbmss{Z}}
\newcommand{\C}{\mathbbmss{C}}
\newcommand{\R}{\mathbbmss{R}}
\newcommand{\Q}{\mathbbmss{Q}}
\newcommand{\mathbb}[1]{\mathbbmss{#1}}
\newcommand{\figura}[1]{\begin{center}\includegraphics{#1}\end{center}}
\newcommand{\figuraex}[2]{\begin{center}\includegraphics[#2]{#1}\end{center}}</preamble>
 <content>Say we want to solve the system
\begin{eqnarray*}
3x + 2y + z -2w&amp;=&amp;4\\
2x - y + 2z - 5w &amp;=&amp; 15\\
4x + 2y \phantom{+ 2x} - 5w&amp;=&amp;1\\
3x \phantom{+ 2y} - 2z -4w &amp;=&amp; 1.
\end{eqnarray*}

The associated matrix is 
$$\begin{pmatrix}
3 &amp; 2 &amp; 1 &amp; -2\\
2 &amp; -1 &amp; 2 &amp; -5\\
4 &amp; 2 &amp; 0 &amp; -1 \\
3 &amp; 0 &amp; -2 &amp; -4
\end{pmatrix}$$

whose determinant is $\Delta=-65$. Since the determinant is non-zero, we can use Cramer's rule. To obtain the value of the $k$-th variable, we replace the $k$-th column of the matrix above by the column vector 
$$\begin{pmatrix} 4\\ 15\\ 1\\ 1\end{pmatrix},$$ 
the determinant of the obtained matrix is divided by $\Delta$ and the resulting value is the wanted solution.

So
$$
x=\frac{\Delta_1}{\Delta}=
\frac{
\begin{vmatrix}
4 &amp; 2 &amp; 1 &amp; -2\\
15 &amp; -1 &amp; 2 &amp; -5\\
1 &amp; 2 &amp; 0 &amp; -1\\
1 &amp; 0 &amp; -2 &amp; -4
\end{vmatrix}
}{-65}=\frac{-65}{-65}=1
$$

$$
y=\frac{\Delta_2}{\Delta}=
\frac{
\begin{vmatrix}
3 &amp; 4 &amp;  1 &amp; -2\\
2 &amp; 15 &amp; 2 &amp; -5\\
4 &amp; 1 &amp;  0 &amp; -1\\
3 &amp; 1 &amp;  -2 &amp; -4
\end{vmatrix}
}{-65}=\frac{130}{-65}=2
$$

$$
z=\frac{\Delta_3}{\Delta}=
\frac{
\begin{vmatrix}
3 &amp; 2 &amp; 4 &amp;  -2\\
2 &amp; -1 &amp; 15 &amp; -5\\
4 &amp; 2 &amp; 1 &amp;  1\\
3 &amp; 0 &amp; 1 &amp;  -4
\end{vmatrix}
}{-65}=\frac{-195}{-65}=3
$$

$$
w=\frac{\Delta_4}{\Delta}=
\frac{
\begin{vmatrix}
3 &amp; 2 &amp; 1&amp; 4 \\
2 &amp; -1 &amp; 2 &amp; 15\\
4 &amp; 2 &amp; 0 &amp; 1 \\
3 &amp; 0 &amp;  -2 &amp; 1
\end{vmatrix}
}{-65}=\frac{65}{-65}=-1
$$</content>
</record>
