Cramer's Rule

Cramer's Rule states that for a system of simultaneous equations written in matrix form  
\[A \mathbf{x} = \mathbf{b}\]
, the solutions are  
\[x_i = \frac{det(A_i)}{det(A)}\]
  where  
\[A_i\]
 is the matrix  
\[A\]
  with the ith column replaced by  
\[\mathbf{b}\]
.
Example: Consider the system of equations
\[-2x_1+3x_-x_3=1\]

\[x_1+2x_2-x_3=4\]

\[-2x_1-x_2+x_3=-3\]

TIn vector form we have  
\[\left( \begin{array}{ccc} -2 & 3 & -1 \\ 1 & 2 & -1 \\ -2 & -1 & 1 \end{array} \right) \begin{pmatrix}x_1\\x_2\\x_3 \end{pmatrix} = \begin{pmatrix}1\\4\\-3\end{pmatrix}\]

Then  
\[x_1 =\frac{\left| \begin{array}{ccc} 1 & 3 & -1 \\ 4 & 2 & -1 \\ -3 & -1 & 1 \end{array} \right|}{\left| \begin{array}{ccc} -2 & 3 & -1 \\ 1 & 2 & -1 \\ -2 & -1 & 1 \end{array} \right|}=\frac{-4}{-2}=2\]

\[x_2 =\frac{\left| \begin{array}{ccc} -2 & 1 & -1 \\ 1 & 4 & -1 \\ -2 & -3 & 1 \end{array} \right|}{\left| \begin{array}{ccc} -2 & 3 & -1 \\ 1 & 2 & -1 \\ -2 & -1 & 1 \end{array} \right|}=\frac{-6}{-2}=3\]

\[x_3 =\frac{\left| \begin{array}{ccc} -2 & 3 & 1 \\ 2 & 2 & 4 \\ -2 & -1 & -3 \end{array} \right|}{\left| \begin{array}{ccc} -2 & 3 & -1 \\ 1 & 2 & -1 \\ -2 & -1 & 1 \end{array} \right|}=\frac{-8}{-2}=4\]