# Cramer's rule

(Redirected from Cramer's Rule)
Jump to: navigation, search

In linear algebra, Cramer's rule is an explicit formula for the solution of a system of linear equations with as many equations as unknowns, valid whenever the system has a unique solution. It expresses the solution in terms of the determinants of the (square) coefficient matrix and of matrices obtained from it by replacing one column by the vector of right hand sides of the equations. It is named after Gabriel Cramer (1704–1752), who published the rule for an arbitrary number of unknowns in 1750,[1] although Colin Maclaurin also published special cases of the rule in 1748[2] (and possibly knew of it as early as 1729).[3][4][5]

## General case

Consider a system of n linear equations for n unknowns, represented in matrix multiplication form as follows:

 $Ax = b\,$ $(1)\,$

where the n by n matrix $A$ has a nonzero determinant, and the vector $x = (x_1, \ldots, x_n)^\mathrm{T}$ is the column vector of the variables.

Then the theorem states that in this case the system has a unique solution, whose individual values for the unknowns are given by:

$x_i = \frac{\det(A_i)}{\det(A)} \qquad i = 1, \ldots, n \,$

where $A_i$ is the matrix formed by replacing the ith column of $A$ by the column vector $b$.

The rule holds for systems of equations with coefficients and unknowns in any field, not just in the real numbers. It has recently been shown that Cramer's rule can be implemented in O(n3) time,[6] which is comparable to more common methods of solving systems of linear equations, such as Gaussian elimination (consistently requiring 2.5 times as many arithmetic operations for all matrix sizes, while exhibiting comparable numeric stability in most cases).

## Proof

The proof for Cramer's rule uses just two properties of determinants: linearity with respect to any given column (taking for that column a linear combination of column vectors produces as determinant the corresponding linear combination of their determinants), and the fact that the determinant is zero whenever two columns are equal (which is implied by the basic property that the determinant is alternating in the columns).

Fix the index j of a column. Linearity means that if we consider only column j as variable (fixing the others arbitrarily), the resulting function RnR (assuming matrix entries are in R) can be given by a matrix, with one row and n columns, that acts on column j. In fact this is precisely what Laplace expansion does, writing det(A) = C1a1,j + … + Cnan,j for certain coefficients C1,…,Cn that depend on the columns of A other than column j (the precise expression for these cofactors is not important here). The value det(A) is then the result of applying the one-line matrix L(j) = (C1 C2 … Cn) to column j of A. If L(j) is applied to any other column k of A, then the result is the determinant of the matrix obtained from A by replacing column j by a copy of column k, so the resulting determinant is 0 (the case of two equal columns).

Now consider a system of n linear equations in n unknowns $x_1, x_2,\ldots,x_n$, whose coefficient matrix is A, with det(A) assumed to be nonzero:

$\begin{matrix}a_{11}x_1+a_{12}x_2+\cdots+a_{1n}x_n&=&b_1\\a_{21}x_1+a_{22}x_2+\cdots+a_{2n}x_n&=&b_2\\\vdots&\vdots&\vdots\\a_{n1}x_1+a_{n2}x_2+\cdots+a_{nn}x_n&=&b_n.\end{matrix}$

If one combines these equations by taking C1 times the first equation, plus C2 times the second, and so forth until Cn times the last, then the coefficient of xj will become C1a1,j + … + Cnan,j = det(A), while the coefficients of all other unknowns become 0; the left hand side becomes simply det(A)xj. The right hand side is C1b1 + … + Cnbn, which is L(j) applied to the column vector b of the right hand sides bi. In fact what has been done here is multiply the matrix equation Ax = b on the left by L(j). Dividing by the nonzero number det(A) one finds the following equation, necessary to satisfy the system:

$x_j=\frac{L_{(j)}\cdot\mathbf{b}}{\det(A)}.$

But by construction the numerator is the determinant of the matrix obtained from A by replacing column j by b, so we get the expression of Cramer's rule as a necessary condition for a solution. The same procedure can be repeated for other values of j to find values for the other unknowns.

The only point that remains to prove is that these values for the unknowns, the only possible ones, do indeed together form a solution. But if the matrix A is invertible with inverse A−1, then x = A−1b will be a solution, thus showing its existence. To see that A is invertible when det(A) is nonzero, consider the n by n matrix M obtained by stacking the one-line matrices L(j) on top of each other for j = 1, 2, …, n (this gives the adjugate matrix for A). It was shown that L(j)A = (0 … 0 det(A) 0 … 0) where det(A) appears at the position j; from this it follows that MA = det(A)In. Therefore

$\frac1{\det(A)}M=A^{-1},$

completing the proof.

## Finding inverse matrix

Let A be an n×n matrix. Then

$\mathrm{Adj}(A)A = \mathrm{det}(A)I\,$

where Adj(A) denotes the adjugate matrix of A, det(A) is the determinant, and I is the identity matrix. If det(A) is invertible in R, then the inverse matrix of A is

$A^{-1} = \frac{1}{\operatorname{det}(A)} \operatorname{Adj}(A).$

If R is a field (such as the field of real numbers), then this gives a formula for the inverse of A, provided det(A) ≠ 0. In fact, this formula will work whenever R is a commutative ring, provided that det(A) is a unit. If det(A) is not a unit, then A is not invertible.

## Applications

### Explicit formulas for small systems

Consider the linear system $\left\{\begin{matrix}a_1x+b_1y&={\color{red}c_1}\\ a_2x + b_2y&= {\color{red}c_2}\end{matrix}\right.\$ which in matrix format is $\begin{bmatrix} a_1 & b_1 \\ a_2 & b_2 \end{bmatrix}\begin{bmatrix} x \\ y \end{bmatrix}=\begin{bmatrix} {\color{red}c_1} \\ {\color{red}c_2} \end{bmatrix}.$

Assume a1b2b1a2 nonzero. Then, with help of determinants x and y can be found with Cramer's rule as

$x = \begin{vmatrix} {\color{red}{c_1}} & b_1 \\ {\color{red}{c_2}} & b_2 \end{vmatrix}/\begin{vmatrix} a_1 & b_1 \\ a_2 & b_2 \end{vmatrix} = { {\color{red}c_1}b_2 - b_1{\color{red}c_2} \over a_1b_2 - b_1a_2}$

and

$y = \begin{vmatrix} a_1 & {\color{red}{c_1}} \\ a_2 & {\color{red}{c_2}} \end{vmatrix}/\begin{vmatrix} a_1 & b_1 \\ a_2 & b_2 \end{vmatrix} = { a_1{\color{red}c_2} - {\color{red}c_1}a_2 \over a_1b_2 - b_1a_2}.$

The rules for 3 × 3 matrices are similar. Given $\left\{\begin{matrix}a_1x + b_1y + c_1z&= {\color{red}d_1}\\a_2x + b_2y + c_2z&= {\color{red}d_2}\\a_3x + b_3y + c_3z&= {\color{red}d_3}\end{matrix}\right.$ which in matrix format is $\begin{bmatrix} a_1 & b_1 & c_1 \\ a_2 & b_2 & c_2 \\ a_3 & b_3 & c_3 \end{bmatrix}\begin{bmatrix} x \\ y \\ z \end{bmatrix}=\begin{bmatrix} {\color{red}d_1} \\ {\color{red}d_2} \\ {\color{red}d_3} \end{bmatrix}.$

Then the values of x, y and z can be found as follows:

$x = \frac { \begin{vmatrix} {\color{red}d_1} & b_1 & c_1 \\ {\color{red}d_2} & b_2 & c_2 \\ {\color{red}d_3} & b_3 & c_3 \end{vmatrix} } { \begin{vmatrix} a_1 & b_1 & c_1 \\ a_2 & b_2 & c_2 \\ a_3 & b_3 & c_3 \end{vmatrix} }, \quad y = \frac { \begin{vmatrix} a_1 & {\color{red}d_1} & c_1 \\ a_2 & {\color{red}d_2} & c_2 \\ a_3 & {\color{red}d_3} & c_3 \end{vmatrix} } { \begin{vmatrix} a_1 & b_1 & c_1 \\ a_2 & b_2 & c_2 \\ a_3 & b_3 & c_3 \end{vmatrix} },\text{ and }z = \frac { \begin{vmatrix} a_1 & b_1 & {\color{red}d_1} \\ a_2 & b_2 & {\color{red}d_2} \\ a_3 & b_3 & {\color{red}d_3} \end{vmatrix} } { \begin{vmatrix} a_1 & b_1 & c_1 \\ a_2 & b_2 & c_2 \\ a_3 & b_3 & c_3 \end{vmatrix} }.$

### 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\,$ and $G(x, y, u, v) = 0\,$. When u and v are independent variables, we can define $x = X(u, v)\,$ and $y = Y(u, v).\,$

Finding an equation for $\dfrac{\partial x}{\partial u}$ is a trivial application of Cramer's rule.

First, calculate the first derivatives of F, G, x, and y:

\begin{align} 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 \\[6pt] 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 \\[6pt] dx & = \frac{\partial X}{\partial u} \, du + \frac{\partial X}{\partial v} \, dv \\[6pt] dy & = \frac{\partial Y}{\partial u} \, du + \frac{\partial Y}{\partial v} \, dv. \end{align}

Substituting dx, dy into dF and dG, we have:

\begin{align} 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 \\[6pt] 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. \end{align}

Since u, v are both independent, the coefficients of du, dv must be zero. So we can write out equations for the coefficients:

\begin{align} \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} \\[6pt] \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} \\[6pt] \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} \\[6pt] \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}. \end{align}

Now, by Cramer's rule, we see that:

$\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:

$\frac{\partial x}{\partial u} = - \frac{\left(\frac{\partial\left(F, G\right)}{\partial\left(u, y\right)}\right)}{\left(\frac{\partial\left(F, G\right)}{\partial\left(x, y\right)}\right)}.$

Similar formulae can be derived for $\frac{\partial x}{\partial v}$, $\frac{\partial y}{\partial u}$, $\frac{\partial y}{\partial v}.$

### Integer programming

Cramer's rule can be used to prove that an integer programming problem whose constraint matrix is totally unimodular and whose right-hand side is integer, has integer basic solutions. This makes the integer program substantially easier to solve.

### Ordinary differential equations

Cramer's rule is used to derive the general solution to an inhomogeneous linear differential equation by the method of variation of parameters.

## Geometric interpretation

Geometric interpretation of Cramer's rule. The areas of the second and third shaded parallelograms are the same and the second is $x_1$ times the first. From this equality Cramer's rule follows.

Cramer's rule has a geometric interpretation that can be considered also a proof or simply giving insight about its geometric nature. These geometric arguments work in general and not only in the case of two equations with two unknowns presented here.

Given the system of equations

$\begin{matrix}a_{11}x_1+a_{12}x_2&=b_1\\a_{21}x_1+a_{22}x_2&=b_2\end{matrix}$

it can be considered as an equation between vectors

$x_1\binom{a_{11}}{a_{21}}+x_2\binom{a_{12}}{a_{22}}=\binom{b_1}{b_2}.$

The area of the parallelogram determined by $\binom{a_{11}}{a_{21}}$ and $\binom{a_{12}}{a_{22}}$ is given by the determinant of the system of equations:

$\left|\begin{matrix}a_{11}&a_{12}\\a_{21}&a_{22}\end{matrix}\right|.$

In general, when there are more variables and equations, the determinant of $n$ vectors of length $n$ will give the volume of the parallelepiped determined by those vectors in the $n$-th dimensional Euclidean space.

Therefore the area of the parallelogram determined by $x_1\binom{a_{11}}{a_{21}}$ and $\binom{a_{12}}{a_{22}}$ has to be $x_1$ times the area of the first one since one of the sides has been multiplied by this factor. Now, this last parallelogram, by Cavalieri's principle, has the same area as the parallelogram determined by $\binom{b_1}{b_2}=x_1\binom{a_{11}}{a_{21}}+x_2\binom{a_{12}}{a_{22}}$ and $\binom{a_{12}}{a_{22}}$.

Equating the areas of this last and the second parallelogram gives the equation

$\left|\begin{matrix}b_1&a_{12}\\b_2&a_{22}\end{matrix}\right|=\left|\begin{matrix}a_{11}x_1&a_{12}\\a_{21}x_1&a_{22}\end{matrix}\right|=x_1\left|\begin{matrix}a_{11}&a_{12}\\a_{21}&a_{22}\end{matrix}\right|$

from which Cramer's rule follows.

## A short proof

A short proof of Cramer's rule [7] can be given by noticing that $x_1$ is the determinant of the matrix

$X_1=\begin{bmatrix} x_1 & 0 & 0 & \dots & 0\\ x_2 & 1 & 0 & \dots & 0\\ x_3 & 0 & 1 & \dots & 0\\ \vdots & \vdots & \vdots & \ddots &\vdots \\ x_n & 0 & 0 & \dots & 1 \end{bmatrix}$

On the other hand, assuming that our original matrix $A$ is invertible, this matrix $X_1$ has columns $A^{-1} b , A^{-1} v_2 , \ldots, A^{-1} v_n$, where $v_k$ is the $k$ th column of the matrix $A$. Recall that the matrix $A_1$ has columns $b , v_2, \ldots, v_n$. Hence we have $x_1= \det (X_1) = \det (A^{-1}) \det (A_1)= \frac{\det (A_1)}{\det (A)}$, as wanted. The proof for other $x_j$ is similar.

### Proof using Clifford algebra

Consider the system of three scalar equations in three unknown scalars $x_{1} ,x_{2} ,x_{3}$

$\begin{array}{rcl} a_{11} x_{1} +a_{12} x_{2} +a_{13} x_{3} & = & c_{1}\\ a_{21} x_{1} +a_{22} x_{2} +a_{23} x_{3} & = & c_{2}\\ a_{31} x_{1} +a_{32} x_{2} +a_{33} x_{3} & = & c_{3}\end{array}$

and assign an orthonormal vector basis $\mathbf{e}_{1} ,\mathbf{e}_{2} ,\mathbf{e}_{3}$ for $\mathcal{G}_{3}$ as

$\begin{array}{rcl} a_{11} \mathbf{e}_{1} x_{1} +a_{12} \mathbf{e}_{1} x_{2} +a_{13} \mathbf{e}_{1} x_{3} & = & c_{1} \mathbf{e}_{1}\\ a_{21} \mathbf{e}_{2} x_{1} +a_{22} \mathbf{e}_{2} x_{2} +a_{23} \mathbf{e}_{2} x_{3} & = & c_{2} \mathbf{e}_{2}\\ a_{31} \mathbf{e}_{3} x_{1} +a_{32} \mathbf{e}_{3} x_{2} +a_{33} \mathbf{e}_{3} x_{3} & = & c_{3} \mathbf{e}_{3} .\end{array}$

Let the vectors

$\begin{array}{rcl} \mathbf{a}_{1} & = & a_{11} \mathbf{e}_{1} +a_{21} \mathbf{e}_{2} +a_{31} \mathbf{e}_{3}\\ \mathbf{a}_{2} & = & a_{12} \mathbf{e}_{1} +a_{22} \mathbf{e}_{2} +a_{32} \mathbf{e}_{3}\\ \mathbf{a}_{3} & = & a_{13} \mathbf{e}_{1} +a_{23} \mathbf{e}_{2} +a_{33} \mathbf{e}_{3} .\end{array}$

Adding the system of equations, it is seen that

$\begin{array}{rcl} \mathbf{c} & = & c_{1} \mathbf{e}_{1} +c_{2} \mathbf{e}_{2} +c_{3} \mathbf{e}_{3}\\ & = & x_{1} \mathbf{a}_{1} +x_{2} \mathbf{a}_{2} +x_{3} \mathbf{a}_{3} .\end{array}$

Using the exterior product, each unknown scalar $x_{k}$ can be solved as

$\begin{array}{rcl} \mathbf{c} \wedge \mathbf{a}_{2} \wedge \mathbf{a}_{3} & = & x_{1} \mathbf{a}_{1} \wedge \mathbf{a}_{2} \wedge \mathbf{a}_{3}\\ \mathbf{c} \wedge \mathbf{a}_{1} \wedge \mathbf{a}_{3} & = & x_{2} \mathbf{a}_{2} \wedge \mathbf{a}_{1} \wedge \mathbf{a}_{3}\\ \mathbf{c} \wedge \mathbf{a}_{1} \wedge \mathbf{a}_{2} & = & x_{3} \mathbf{a}_{3} \wedge \mathbf{a}_{1} \wedge \mathbf{a}_{2}\\ x_{1} & = & \frac{\mathbf{c} \wedge \mathbf{a}_{2} \wedge \mathbf{a}_{3}}{\mathbf{a}_{1} \wedge \mathbf{a}_{2} \wedge \mathbf{a}_{3}}\\ x_{2} & = & \frac{\mathbf{c} \wedge \mathbf{a}_{1} \wedge \mathbf{a}_{3}}{\mathbf{a}_{2} \wedge \mathbf{a}_{1} \wedge \mathbf{a}_{3}} = \frac{\mathbf{a}_{1} \wedge \mathbf{c} \wedge \mathbf{a}_{3}}{\mathbf{a}_{1} \wedge \mathbf{a}_{2} \wedge \mathbf{a}_{3}}\\ x_{3} & = & \frac{\mathbf{c} \wedge \mathbf{a}_{1} \wedge \mathbf{a}_{2}}{\mathbf{a}_{3} \wedge \mathbf{a}_{1} \wedge \mathbf{a}_{2}} = \frac{\mathbf{a}_{1} \wedge \mathbf{a}_{2} \wedge \mathbf{c}}{\mathbf{a}_{1} \wedge \mathbf{a}_{2} \wedge \mathbf{a}_{3}} .\end{array}$

For $n$ equations in $n$ unknowns, the solution for the $k$th unknown $x_{k}$ generalizes to

$\begin{array}{rcl} x_{k} & = & \frac{\mathbf{a}_{1} \wedge \cdots \wedge ( \mathbf{c} )_{k} \wedge \cdots \wedge \mathbf{a}_{n}}{\mathbf{a}_{1} \wedge \cdots \wedge \mathbf{a}_{k} \wedge \cdots \wedge \mathbf{a}_{n}}\\ & = & ( \mathbf{a}_{1} \wedge \cdots \wedge ( \mathbf{c} )_{k} \wedge \cdots \wedge \mathbf{a}_{n} ) ( \mathbf{a}_{1} \wedge \cdots \wedge \mathbf{a}_{k} \wedge \cdots \wedge \mathbf{a}_{n} )^{-1}\\ & = & \frac{( \mathbf{a}_{1} \wedge \cdots \wedge ( \mathbf{c} )_{k} \wedge \cdots \wedge \mathbf{a}_{n} ) ( \mathbf{a}_{1} \wedge \cdots \wedge \mathbf{a}_{k} \wedge \cdots \wedge \mathbf{a}_{n} )}{( \mathbf{a}_{1} \wedge \cdots \wedge \mathbf{a}_{k} \wedge \cdots \wedge \mathbf{a}_{n} ) ( \mathbf{a}_{1} \wedge \cdots \wedge \mathbf{a}_{k} \wedge \cdots \wedge \mathbf{a}_{n} )}\\ & = & \frac{( \mathbf{a}_{1} \wedge \cdots \wedge ( \mathbf{c} )_{k} \wedge \cdots \wedge \mathbf{a}_{n} ) \cdot ( \mathbf{a}_{1} \wedge \cdots \wedge \mathbf{a}_{k} \wedge \cdots \wedge \mathbf{a}_{n} )}{( -1 )^{n ( n-1 ) /2} ( \mathbf{a}_{n} \wedge \cdots \wedge \mathbf{a}_{k} \wedge \cdots \wedge \mathbf{a}_{1} ) \cdot ( \mathbf{a}_{1} \wedge \cdots \wedge \mathbf{a}_{k} \wedge \cdots \wedge \mathbf{a}_{n} )}\\ & = & \frac{( \mathbf{a}_{n} \wedge \cdots \wedge ( \mathbf{c} )_{k} \wedge \cdots \wedge \mathbf{a}_{1} ) \cdot ( \mathbf{a}_{1} \wedge \cdots \wedge \mathbf{a}_{k} \wedge \cdots \wedge \mathbf{a}_{n} )}{( \mathbf{a}_{n} \wedge \cdots \wedge \mathbf{a}_{k} \wedge \cdots \wedge \mathbf{a}_{1} ) \cdot ( \mathbf{a}_{1} \wedge \cdots \wedge \mathbf{a}_{k} \wedge \cdots \wedge \mathbf{a}_{n} )} .\end{array}$

If the $\mathbf{a}_{k}$ are linearly independent, then the $x_{k}$ can be expressed in determinant form identical to Cramer’s Rule as

$\begin{array}{rcl} x_{k} & = & \frac{( \mathbf{a}_{n} \wedge \cdots \wedge ( \mathbf{c} )_{k} \wedge \cdots \wedge \mathbf{a}_{1} ) \cdot ( \mathbf{a}_{1} \wedge \cdots \wedge \mathbf{a}_{k} \wedge \cdots \wedge \mathbf{a}_{n} )}{( \mathbf{a}_{n} \wedge \cdots \wedge \mathbf{a}_{k} \wedge \cdots \wedge \mathbf{a}_{1} ) \cdot ( \mathbf{a}_{1} \wedge \cdots \wedge \mathbf{a}_{k} \wedge \cdots \wedge \mathbf{a}_{n} )}\\ & = & \frac{\left|\begin{array}{ccccc} \mathbf{a}_{1} \cdot \mathbf{a}_{1} & \cdots & \mathbf{a}_{1} \cdot ( \mathbf{c} )_{k} & \cdots & \mathbf{a}_{1} \cdot \mathbf{a}_{n}\\ \vdots & \ddots & \vdots & \ddots & \vdots\\ \mathbf{a}_{k} \cdot \mathbf{a}_{1} & \cdots & \mathbf{a}_{k} \cdot ( \mathbf{c} )_{k} & \cdots & \mathbf{a}_{k} \cdot \mathbf{a}_{n}\\ \vdots & \ddots & \vdots & \ddots & \vdots\\ \mathbf{a}_{n} \cdot \mathbf{a}_{1} & \cdots & \mathbf{a}_{n} \cdot ( \mathbf{c} )_{k} & \cdots & \mathbf{a}_{n} \cdot \mathbf{a}_{n} \end{array}\right|}{\left|\begin{array}{ccccc} \mathbf{a}_{1} \cdot \mathbf{a}_{1} & \cdots & \mathbf{a}_{1} \cdot \mathbf{a}_{k} & \cdots & \mathbf{a}_{1} \cdot \mathbf{a}_{n}\\ \vdots & \ddots & \vdots & \ddots & \vdots\\ \mathbf{a}_{k} \cdot \mathbf{a}_{1} & \cdots & \mathbf{a}_{k} \cdot \mathbf{a}_{k} & \cdots & \mathbf{a}_{k} \cdot \mathbf{a}_{n}\\ \vdots & \ddots & \vdots & \ddots & \vdots\\ \mathbf{a}_{n} \cdot \mathbf{a}_{1} & \cdots & \mathbf{a}_{n} \cdot \mathbf{a}_{k} & \cdots & \mathbf{a}_{n} \cdot \mathbf{a}_{n} \end{array}\right|} = \frac{\left|\begin{array}{c} \mathbf{a}_{1}\\ \vdots\\ \mathbf{a}_{k}\\ \vdots\\ \mathbf{a}_{n} \end{array}\right| \left|\begin{array}{ccccc} \mathbf{a}_{1} & \cdots & ( \mathbf{c} )_{k} & \cdots & \mathbf{a}_{n} \end{array}\right|}{\left|\begin{array}{c} \mathbf{a}_{1}\\ \vdots\\ \mathbf{a}_{k}\\ \vdots\\ \mathbf{a}_{n} \end{array}\right| \left|\begin{array}{ccccc} \mathbf{a}_{1} & \cdots & \mathbf{a}_{k} & \cdots & \mathbf{a}_{n} \end{array}\right|}\\ & = & \frac{\left|\begin{array}{ccccc} \mathbf{a}_{1} & \cdots & ( \mathbf{c} )_{k} & \cdots & \mathbf{a}_{n} \end{array}\right|}{\left|\begin{array}{ccccc} \mathbf{a}_{1} & \cdots & \mathbf{a}_{k} & \cdots & \mathbf{a}_{n} \end{array}\right|} = \frac{\left|\begin{array}{ccccc} a_{11} & \ldots & c_{1} & \cdots & a_{1n}\\ \vdots & \ddots & \vdots & \ddots & \vdots\\ a_{k1} & \cdots & c_{k} & \cdots & a_{k n}\\ \vdots & \ddots & \vdots & \ddots & \vdots\\ a_{n1} & \cdots & c_{n} & \cdots & a_{n n} \end{array}\right|}{\left|\begin{array}{ccccc} a_{11} & \ldots & a_{1k} & \cdots & a_{1n}\\ \vdots & \ddots & \vdots & \ddots & \vdots\\ a_{k1} & \cdots & a_{k k} & \cdots & a_{k n}\\ \vdots & \ddots & \vdots & \ddots & \vdots\\ a_{n1} & \cdots & a_{n k} & \cdots & a_{n n} \end{array}\right|}\end{array}$

where $( \mathbf{c} )_{k}$ denotes the substitution of vector $\mathbf{a}_{k}$ with vector $\mathbf{c}$ in the $k$th numerator position.

## Systems of vector equations: Cramer’s Rule extended

Consider the system of $n$ vector equations in $n$ unknown vectors $\mathbf{x}_{1} ,\mathbf{x}_{2} ,\mathbf{x}_{3} , \ldots ,\mathbf{x}_{k} , \ldots ,\mathbf{x}_{n}$

$\begin{array}{rcl} a_{11} \mathbf{x}_{1} +a_{12} \mathbf{x}_{2} +a_{13} \mathbf{x}_{3} + \cdots +a_{1k} \mathbf{x}_{k} + \cdots +a_{1n} \mathbf{x}_{n} & = & \mathbf{c}_{1}\\ a_{21} \mathbf{x}_{1} +a_{22} \mathbf{x}_{2} +a_{23} \mathbf{x}_{3} + \cdots +a_{2k} \mathbf{x}_{k} + \cdots +a_{2n} \mathbf{x}_{n} & = & \mathbf{c}_{2}\\ a_{31} \mathbf{x}_{1} +a_{32} \mathbf{x}_{2} +a_{33} \mathbf{x}_{3} + \cdots +a_{3k} \mathbf{x}_{k} + \cdots +a_{3n} \mathbf{x}_{n} & = & \mathbf{c}_{3}\\ & \vdots & \\ a_{k1} \mathbf{x}_{1} +a_{k2} \mathbf{x}_{2} +a_{k3} \mathbf{x}_{3} + \cdots +a_{k k} \mathbf{x}_{k} + \cdots +a_{k n} \mathbf{x}_{n} & = & \mathbf{c}_{k}\\ & \vdots & \\ a_{n1} \mathbf{x}_{1} +a_{n2} \mathbf{x}_{2} +a_{n3} \mathbf{x}_{3} + \cdots +a_{n k} \mathbf{x}_{k} + \cdots +a_{n n} \mathbf{x}_{n} & = & \mathbf{c}_{n}\end{array}$

where we want to solve for each unknown vector $\mathbf{x}_{k}$ in terms of the given scalar constants $a_{r c}$ and vector constants $\mathbf{c}_{k}$.

### Solving for unknown vectors

Using the Clifford algebra (or geometric algebra) of Euclidean vectors, the vectors $\mathbf{x}_{k}$ and $\mathbf{c}_{k}$ are in a vector space having d dimensions spanned by a basis of d orthonormal base vectors $\mathbf{e}_{1} ,\mathbf{e}_{2}, \mathbf{e}_{3}, \ldots, \mathbf{e}_{d}$. This d-dimensional space can be extended to be a subspace of a larger $( d+n )$-dimensional space spanned by $\mathbf{e}_1, \mathbf{e}_2, \mathbf{e}_3, \ldots, \mathbf{e}_{d}, \ldots, \mathbf{e}_{d+k}, \ldots, \mathbf{e}_{d+n}$.

Multiply the k-th equation by the $( d+k )$th orthonormal base unit $\mathbf{e}_{d+k}$, using the exterior product on the right, as

\begin{align} \left ( a_{11} \mathbf{x}_{1} +a_{12} \mathbf{x}_{2} +a_{13} \mathbf{x}_{3} + \cdots +a_{1k} \mathbf{x}_{k} + \cdots +a_{1n} \mathbf{x}_{n} \right ) \wedge \mathbf{e}_{d+1} &= \mathbf{c}_{1} \wedge \mathbf{e}_{d+1}\\ ( a_{21} \mathbf{x}_{1} +a_{22} \mathbf{x}_{2} +a_{23} \mathbf{x}_{3} + \cdots +a_{2k} \mathbf{x}_{k} + \cdots +a_{2n} \mathbf{x}_{n} ) \wedge \mathbf{e}_{d+2} & = \mathbf{c}_{2} \wedge \mathbf{e}_{d+2} \\ ( a_{31} \mathbf{x}_{1} +a_{32} \mathbf{x}_{2} +a_{33} \mathbf{x}_{3} + \cdots +a_{3k} \mathbf{x}_{k} + \cdots +a_{3n} \mathbf{x}_{n} ) \wedge \mathbf{e}_{d+3} & = \mathbf{c}_{3} \wedge \mathbf{e}_{d+3}\\ & \vdots \\ ( a_{k1} \mathbf{x}_{1} +a_{k2} \mathbf{x}_{2} +a_{k3} \mathbf{x}_{3} + \cdots +a_{k k} \mathbf{x}_{k} + \cdots +a_{k n} \mathbf{x}_{n} ) \wedge \mathbf{e}_{d+k} & = \mathbf{c}_{k} \wedge \mathbf{e}_{d+k}\\ & \vdots \\ ( a_{n1} \mathbf{x}_{1} +a_{n2} \mathbf{x}_{2} +a_{n3} \mathbf{x}_{3} + \cdots +a_{n k} \mathbf{x}_{k} + \cdots +a_{n n} \mathbf{x}_{n} ) \wedge \mathbf{e}_{d+n} & = \mathbf{c}_{n} \wedge \mathbf{e}_{d+n} \end{align}

The original system of equations in grade-1 vectors is now transformed into a system of equations in grade-2 vectors, and no parallel components have been deleted by the exterior products since they multiply on perpendicular extended base units.

Let the vectors

\begin{align} \mathbf{a}_1 &= a_{11} \mathbf{e}_{d+1} +a_{21} \mathbf{e}_{d+2} +a_{31} \mathbf{e}_{d+3} + \cdots +a_{k1} \mathbf{e}_{d+k} + \cdots +a_{n1} \mathbf{e}_{d+n}\\ \mathbf{a}_2 &= a_{12} \mathbf{e}_{d+1} +a_{22} \mathbf{e}_{d+2} +a_{32} \mathbf{e}_{d+3} + \cdots +a_{k2} \mathbf{e}_{d+k} + \cdots +a_{n2} \mathbf{e}_{d+n}\\ \mathbf{a}_3 &= a_{13} \mathbf{e}_{d+1} +a_{23} \mathbf{e}_{d+2} +a_{33} \mathbf{e}_{d+3} + \cdots +a_{k3} \mathbf{e}_{d+k} + \cdots +a_{n3} \mathbf{e}_{d+n}\\ & \vdots \\ \mathbf{a}_k &= a_{1k} \mathbf{e}_{d+1} +a_{2k} \mathbf{e}_{d+2} +a_{3k} \mathbf{e}_{d+3} + \cdots +a_{kk} \mathbf{e}_{d+k} + \cdots +a_{nk} \mathbf{e}_{d+n}\\ & \vdots \\ \mathbf{a}_n &= a_{1n} \mathbf{e}_{d+1} +a_{2n} \mathbf{e}_{d+2}+a_{3n} \mathbf{e}_{d+3} + \cdots +a_{k n} \mathbf{e}_{d+k} + \cdots +a_{nn} \mathbf{e}_{d+n} \end{align}

Adding the transformed system of equations gives

\begin{align} \mathbf{C} &= \mathbf{c}_{1} \wedge \mathbf{e}_{d+1} +\mathbf{c}_{2} \wedge \mathbf{e}_{d+2} +\mathbf{c}_{3} \wedge \mathbf{e}_{d+3} + \cdots +\mathbf{c}_{k} \wedge \mathbf{e}_{d+k} + \cdots +\mathbf{c}_{n} \wedge \mathbf{e}_{d+n}\\ &= \mathbf{C}_{1} +\mathbf{C}_{2} +\mathbf{C}_{3} + \cdots +\mathbf{C}_{k} + \cdots +\mathbf{C}_{n}\\ &= \mathbf{x}_{1} \wedge \mathbf{a}_{1} +\mathbf{x}_{2} \wedge \mathbf{a}_{2} +\mathbf{x}_{3} \wedge \mathbf{a}_{3} + \cdots +\mathbf{x}_{k} \wedge \mathbf{a}_{k} + \cdots +\mathbf{x}_{n} \wedge \mathbf{a}_{n} \end{align}

which is a 2-vector equation. These exterior (wedge) products are equal to Clifford products since the factors are perpendicular.

For $n=3, \mathbf{x}_{1}, \mathbf{x}_{2}$, and $\mathbf{x}_{3}$ are solved by multiplying $\mathbf{a}_{2} \wedge \mathbf{a}_{3}, \mathbf{a}_{1} \wedge \mathbf{a}_{3}$, and $\mathbf{a}_{1} \wedge \mathbf{a}_{2}$, respectively, on the right with exterior products

\begin{align} \mathbf{C} \wedge \mathbf{a}_{2} \wedge \mathbf{a}_{3} &= \mathbf{x}_{1}\wedge \mathbf{a}_{1} \wedge \mathbf{a}_{2} \wedge \mathbf{a}_{3} = \mathbf{x}_{1} (\mathbf{a}_{1} \wedge \mathbf{a}_{2} \wedge \mathbf{a}_{3} )\\ \mathbf{C} \wedge \mathbf{a}_{1} \wedge \mathbf{a}_{3} &= \mathbf{x}_{2} \wedge \mathbf{a}_{2} \wedge \mathbf{a}_{1} \wedge \mathbf{a}_{3} =\mathbf{x}_{2} (\mathbf{a}_{2} \wedge \mathbf{a}_{1} \wedge \mathbf{a}_{3} )\\ \mathbf{C} \wedge \mathbf{a}_{1} \wedge \mathbf{a}_{2} & = \mathbf{x}_{3} \wedge \mathbf{a}_{3} \wedge \mathbf{a}_{1} \wedge \mathbf{a}_{2} =\mathbf{x}_{3} (\mathbf{a}_{3} \wedge \mathbf{a}_{1} \wedge \mathbf{a}_{2})\\ [6pt] \mathbf{x}_{1} &= (\mathbf{C} \wedge \mathbf{a}_{2} \wedge \mathbf{a}_{3} ) ( \mathbf{a}_{1} \wedge \mathbf{a}_{2} \wedge \mathbf{a}_{3} )^{-1} = \frac{( \mathbf{C} \wedge \mathbf{a}_{2} \wedge \mathbf{a}_{3} ) \cdot ((-1)^{1-1} \mathbf{a}_{1} \wedge \mathbf{a}_{2} \wedge \mathbf{a}_{3})}{( \mathbf{a}_{1} \wedge \mathbf{a}_{2} \wedge \mathbf{a}_{3} )^{2}}\\ [6pt] \mathbf{x}_{2} &= (\mathbf{C} \wedge \mathbf{a}_{1} \wedge\mathbf{a}_{3} ) ( \mathbf{a}_{2} \wedge \mathbf{a}_{1} \wedge\mathbf{a}_{3} )^{-1} = \frac{( \mathbf{a}_{1} \wedge \mathbf{C} \wedge \mathbf{a}_{3} ) \cdot \left ((-1)^{2-1} \mathbf{a}_{1} \wedge \mathbf{a}_{2} \wedge \mathbf{a}_{3} \right )}{( \mathbf{a}_{1} \wedge \mathbf{a}_{2} \wedge \mathbf{a}_{3} )^{2}}\\ [6pt] \mathbf{x}_{3} & = ( \mathbf{C} \wedge \mathbf{a}_{1} \wedge \mathbf{a}_{2})(\mathbf{a}_{3} \wedge \mathbf{a}_{1} \wedge \mathbf{a}_{2} )^{-1} = \frac{( \mathbf{a}_{1} \wedge \mathbf{a}_{2} \wedge \mathbf{C} ) \cdot ((-1)^{3-1} \mathbf{a}_{1} \wedge \mathbf{a}_{2} \wedge \mathbf{a}_{3} )}{( \mathbf{a}_{1} \wedge \mathbf{a}_{2} \wedge \mathbf{a}_{3} )^{2}} \end{align}

In the solution of $\mathbf{x}_{1}$, and similarly for $\mathbf{x}_{2}$ and $\mathbf{x}_{3}$, $\mathbf{C} \wedge \mathbf{a}_{2} \wedge \mathbf{a}_{3}$ is a 4-blade having 3 of its 4 dimensions in the extended dimensions $\mathbf{e}_{d+k}$, and the remaining one dimension is in the solution space of the vectors $\mathbf{x}_{k}$ and $\mathbf{c}_{k}$. The 3-blade $\mathbf{a}_{1} \wedge \mathbf{a}_{2} \wedge \mathbf{a}_{3}$ is in the problem space, or the extended dimensions. The inner product $( \mathbf{C} \wedge \mathbf{a}_{2} \wedge \mathbf{a}_{3} ) \cdot ( \mathbf{a}_{1} \wedge \mathbf{a}_{2} \wedge \mathbf{a}_{3} )$ reduces, or contracts, to a 1-vector in the d-dimensional solution space. The divisor $( \mathbf{a}_{1} \wedge \mathbf{a}_{2} \wedge \mathbf{a}_{3} )^{2}$, the square of a blade, is a scalar product that can be computed by a determinant. Since $\mathbf{C}$ is a 2-vector, it commutes $\mathbf{C} \wedge \mathbf{a}_{k} =\mathbf{a}_{k} \wedge \mathbf{C}$ with the vectors $\mathbf{a}_{k}$ without sign change and is conveniently shifted into the vacant k-th spot. A sign change $( -1 )^{k-1}$ occurs in every even $( + )$ k-th solution $\mathbf{x}_{+}$, such as $\mathbf{x}_{2}$, due to commuting or shifting $\mathbf{a}_{k}$ right an odd number of times, in the dividend blade $\mathbf{a}_{1} \wedge \cdots \wedge \mathbf{a}_{k} \wedge \cdots \wedge \mathbf{a}_{n}$, into its k-th spot.

In general, $\mathbf{x}_{k}$ is solved as

\begin{align} \mathbf{x}_{k} &= (\mathbf{a}_{1} \wedge \cdots \wedge ( \mathbf{C})_{k} \wedge \cdots \wedge \mathbf{a}_{n}) \cdot ((-1)^{k-1} \mathbf{a}_{1} \wedge \cdots \wedge \mathbf{a}_{k} \wedge \cdots \wedge \mathbf{a}_{n} )^{-1}\\ [6pt] & =\frac{( \mathbf{a}_{1} \wedge \cdots \wedge ( \mathbf{C} )_{k} \wedge \cdots \wedge \mathbf{a}_{n} ) \cdot ( ( -1 )^{k-1} \mathbf{a}_{1} \wedge \cdots \wedge \mathbf{a}_{k} \wedge \cdots \wedge \mathbf{a}_{n})}{( \mathbf{a}_{1} \wedge \cdots \wedge \mathbf{a}_{k} \wedge \cdots \wedge \mathbf{a}_{n} )^{2}}\\ [6pt] &= \frac{(-1)^{k-1} (\mathbf{a}_{1} \wedge \cdots \wedge ( \mathbf{C})_{k} \wedge \cdots \wedge \mathbf{a}_{n} ) \cdot ( \mathbf{a}_{1} \wedge \cdots \wedge \mathbf{a}_{k} \wedge \cdots \wedge \mathbf{a}_{n} )}{(-1)^{\frac{n(n-1)}{2}} (\mathbf{a}_{n} \wedge \cdots \wedge \mathbf{a}_{k} \wedge \cdots \wedge \mathbf{a}_{1} ) \cdot ( \mathbf{a}_{1} \wedge \cdots \wedge \mathbf{a}_{k} \wedge \cdots \wedge \mathbf{a}_{n} )}\\ [6pt] & =\frac{( -1 )^{k-1} ( \mathbf{a}_{1} \wedge \cdots \wedge ( \mathbf{C})_{k} \wedge \cdots \wedge \mathbf{a}_{n} ) \cdot ( \mathbf{a}_{n} \wedge \cdots \wedge \mathbf{a}_{k} \wedge \cdots \wedge \mathbf{a}_{1} )}{( \mathbf{a}_{n} \wedge \cdots \wedge \mathbf{a}_{k} \wedge \cdots \wedge \mathbf{a}_{1} ) \cdot ( \mathbf{a}_{1} \wedge \cdots \wedge \mathbf{a}_{k} \wedge \cdots \wedge \mathbf{a}_{n} )}\\ [6pt] & =\frac{( \mathbf{a}_{1} \wedge \cdots \wedge ( \mathbf{C} )_{k} \wedge \cdots \wedge \mathbf{a}_{n} ) \cdot ( \mathbf{a}_{n} \wedge \cdots \wedge \mathbf{a}_{k} \wedge \cdots \wedge \mathbf{a}_{1} )}{( -1 )^{k-1} \left|\begin{matrix} \mathbf{a}_{1} \cdot \mathbf{a}_{1} & \cdots & \mathbf{a}_{1} \cdot \mathbf{a}_{k} & \cdots & \mathbf{a}_{1} \cdot \mathbf{a}_{n}\\ \vdots & \ddots & \vdots & \ddots & \vdots\\ \mathbf{a}_{k} \cdot \mathbf{a}_{1} & \cdots & \mathbf{a}_{k} \cdot \mathbf{a}_{k} & \cdots & \mathbf{a}_{k} \cdot \mathbf{a}_{n}\\ \vdots & \ddots & \vdots & \ddots & \vdots\\ \mathbf{a}_{n} \cdot \mathbf{a}_{1} & \cdots & \mathbf{a}_{n} \cdot \mathbf{a}_{k} & \cdots & \mathbf{a}_{n} \cdot \mathbf{a}_{n} \end{matrix}\right|}\\ [6pt] &= \frac{(\mathbf{a}_{1} \wedge \cdots \wedge ( \mathbf{C} )_{k} \wedge \cdots \wedge \mathbf{a}_{n} ) \cdot ( \mathbf{a}_{n} \wedge \cdots \wedge \mathbf{a}_{k} \wedge \cdots \wedge \mathbf{a}_{1} )}{( -1 )^{k-1} \left|\begin{matrix} \mathbf{a}_{1} & \cdots & \mathbf{a}_{k} & \cdots & \mathbf{a}_{n} \end{matrix}\right|^{2}} \end{align}

where $( \mathbf{C} )_{k}$ denotes replacing the k-th element $\mathbf{a}_{k}$ with $\mathbf{C}$. The factor $( -1 )^{k-1}$ accounts for shifting the k-th vector $\mathbf{a}_{k}$ by $k-1$ places. The $( n+1 )$-blade $\mathbf{a}_{1} \wedge \cdots \wedge ( \mathbf{C} )_{k} \wedge \cdots \wedge \mathbf{a}_{n}$ is multiplied by inner product with the reversed n-blade $\mathbf{a}_{n} \wedge \cdots \wedge \mathbf{a}_{k} \wedge \cdots \wedge \mathbf{a}_{1}$, producing a 1-vector in the d-dimensional solution space.

Using this formula, for solving a system of n vector equations having n unknown vectors $\mathbf{x}_1, \ldots, \mathbf{x}_{k}, \ldots, \mathbf{x}_{n}$ in a d-dimensional space, requires extending the space to $( d+n )$ dimensions. The extended n dimensions are essentially used to hold the system of n equations represented by the scalar constants 1-vectors $\mathbf{a}_{k}$ and the vector constants 1-vectors $\mathbf{c}_{k}$. The n vector constants $\mathbf{c}_{k}$ are grade-increased to 2-vectors or grade-2 vectors $\mathbf{c}_{k} \wedge \mathbf{e}_{d+k} =\mathbf{C}_{k}$ that are partly in the extended space. Notice the similarity of form to Cramer’s Rule for systems of scalar equations; a basis is added in both cases. The advantage of this formula is that it avoids scalar coordinates and the results are directly in terms of vectors.

The system of vector equations can also be solved in terms of coordinates, without using the geometric algebra formula above, by the usual process of expanding all the vectors in the system into their coordinate vector components. In each expanded equation, the parallel (like) components are summed into d groups that form d independent systems of n unknown coordinates in n equations. Each system solves for one dimension of coordinates. After solving the d systems, the solved vectors can be reassembled from the solved coordinates. It seems that few books explicitly discuss this process for systems of vector equations. This process is the application of the abstract concept of linear independence as it applies to linearly independent dimensions of vector components or unit vectors. The linear independence concept extends to multivectors in geometric algebra, where each unique unit blade is linearly independent of the others for the purpose of solving equations or systems of equations. An equation containing a sum of d linearly independent terms can be rewritten as d separate independent equations, each in the terms of one dimension.

### Solving for unknown scalars

It is also noticed that, instead of solving for unknown vectors $\mathbf{x}_{k}$, the $\mathbf{x}_{k}$ may be known vectors and the vectors $\mathbf{a}_{k}$ may be unknown. The vectors $\mathbf{a}_{1}$, $\mathbf{a}_{2}$, and $\mathbf{a}_{3}$ could be solved as

$\begin{array}{rcl} -\mathbf{C} \wedge \mathbf{x}_{2} \wedge \mathbf{x}_{3} & = & \mathbf{a}_{1} \wedge \mathbf{x}_{1} \wedge \mathbf{x}_{2} \wedge \mathbf{x}_{3} =\mathbf{a}_{1} ( \mathbf{x}_{1} \wedge \mathbf{x}_{2} \wedge \mathbf{x}_{3} )\\ -\mathbf{C} \wedge \mathbf{x}_{1} \wedge \mathbf{x}_{3} & = & \mathbf{a}_{2} \wedge \mathbf{x}_{2} \wedge \mathbf{x}_{1} \wedge \mathbf{x}_{3} =\mathbf{a}_{2} ( \mathbf{x}_{2} \wedge \mathbf{x}_{1} \wedge \mathbf{x}_{3} )\\ -\mathbf{C} \wedge \mathbf{x}_{1} \wedge \mathbf{x}_{2} & = & \mathbf{a}_{3} \wedge \mathbf{x}_{3} \wedge \mathbf{x}_{1} \wedge \mathbf{x}_{2} =\mathbf{a}_{3} ( \mathbf{x}_{3} \wedge \mathbf{x}_{1} \wedge \mathbf{x}_{2} )\\ \mathbf{a}_{1} & = & ( -\mathbf{C} \wedge \mathbf{x}_{2} \wedge \mathbf{x}_{3} ) ( \mathbf{x}_{1} \wedge \mathbf{x}_{2} \wedge \mathbf{x}_{3} )^{-1}\\ & = & \frac{( -\mathbf{C} \wedge \mathbf{x}_{2} \wedge \mathbf{x}_{3} ) \cdot ( ( -1 )^{1-1} \mathbf{x}_{1} \wedge \mathbf{x}_{2} \wedge \mathbf{x}_{3} )^{}}{( \mathbf{x}_{1} \wedge \mathbf{x}_{2} \wedge \mathbf{x}_{3} )^{2}}\\ \mathbf{a}_{2} & = & ( -\mathbf{C} \wedge \mathbf{x}_{1} \wedge \mathbf{x}_{3} ) ( \mathbf{x}_{2} \wedge \mathbf{x}_{1} \wedge \mathbf{x}_{3} )^{-1}\\ & = & \frac{( -\mathbf{x}_{1} \wedge \mathbf{C} \wedge \mathbf{x}_{3} ) \cdot ( ( -1 )^{2-1} \mathbf{x}_{1} \wedge \mathbf{x}_{2} \wedge \mathbf{x}_{3} )^{}}{( \mathbf{x}_{1} \wedge \mathbf{x}_{2} \wedge \mathbf{x}_{3} )^{2}}\\ \mathbf{a}_{3} & = & ( -\mathbf{C} \wedge \mathbf{x}_{1} \wedge \mathbf{x}_{2} ) ( \mathbf{x}_{3} \wedge \mathbf{x}_{1} \wedge \mathbf{x}_{2} )^{-1}\\ & = & \frac{( -\mathbf{x}_{1} \wedge \mathbf{x}_{2} \wedge \mathbf{C} ) \cdot ( ( -1 )^{3-1} \mathbf{x}_{1} \wedge \mathbf{x}_{2} \wedge \mathbf{x}_{3} )^{}}{( \mathbf{x}_{1} \wedge \mathbf{x}_{2} \wedge \mathbf{x}_{3} )^{2} .}\end{array}$

In general, vector $\mathbf{a}_{k}$ may be solved as

$\begin{array}{rcl} \mathbf{a}_{k} & = & ( -\mathbf{x}_{1} \wedge \cdots \wedge ( \mathbf{C} )_{k} \wedge \cdots \wedge \mathbf{x}_{n} ) \cdot ( ( -1 )^{k-1} \mathbf{x}_{1} \wedge \cdots \wedge \mathbf{x}_{k} \wedge \cdots \wedge \mathbf{x}_{n} )^{-1}\\ & = & \frac{( -\mathbf{x}_{1} \wedge \cdots \wedge ( \mathbf{C} )_{k} \wedge \cdots \wedge \mathbf{x}_{n} ) \cdot ( ( -1 )^{k-1} \mathbf{x}_{1} \wedge \cdots \wedge \mathbf{x}_{k} \wedge \cdots \wedge \mathbf{x}_{n} )^{}}{( \mathbf{x}_{1} \wedge \cdots \wedge \mathbf{x}_{k} \wedge \cdots \wedge \mathbf{x}_{n} )^{2}}\\ & = & \frac{( -1 )^{k} ( \mathbf{x}_{1} \wedge \cdots \wedge ( \mathbf{C} )_{k} \wedge \cdots \wedge \mathbf{x}_{n} ) \cdot ( \mathbf{x}_{1} \wedge \cdots \wedge \mathbf{x}_{k} \wedge \cdots \wedge \mathbf{x}_{n} )^{}}{( -1 )^{n ( n-1 ) /2} ( \mathbf{x}_{n} \wedge \cdots \wedge \mathbf{x}_{k} \wedge \cdots \wedge \mathbf{x}_{1} ) \cdot ( \mathbf{x}_{1} \wedge \cdots \wedge \mathbf{x}_{k} \wedge \cdots \wedge \mathbf{x}_{n} )}\\ & = & \frac{( -1 )^{k} ( \mathbf{x}_{1} \wedge \cdots \wedge ( \mathbf{C} )_{k} \wedge \cdots \wedge \mathbf{x}_{n} ) \cdot ( \mathbf{x}_{n} \wedge \cdots \wedge \mathbf{x}_{k} \wedge \cdots \wedge \mathbf{x}_{1} )^{}}{( \mathbf{x}_{n} \wedge \cdots \wedge \mathbf{x}_{k} \wedge \cdots \wedge \mathbf{x}_{1} ) \cdot ( \mathbf{x}_{1} \wedge \cdots \wedge \mathbf{x}_{k} \wedge \cdots \wedge \mathbf{x}_{n} )}\\ & = & \frac{( \mathbf{x}_{1} \wedge \cdots \wedge ( \mathbf{C} )_{k} \wedge \cdots \wedge \mathbf{x}_{n} ) \cdot ( \mathbf{x}_{n} \wedge \cdots \wedge \mathbf{x}_{k} \wedge \cdots \wedge \mathbf{x}_{1} )^{}}{( -1 )^{k} \left|\begin{array}{ccccc} \mathbf{x}_{1} \cdot \mathbf{x}_{1} & \cdots & \mathbf{x}_{1} \cdot \mathbf{x}_{k} & \cdots & \mathbf{x}_{1} \cdot \mathbf{x}_{n}\\ \vdots & \ddots & \vdots & \ddots & \vdots\\ \mathbf{x}_{k} \cdot \mathbf{x}_{1} & \cdots & \mathbf{x}_{k} \cdot \mathbf{x}_{k} & \cdots & \mathbf{x}_{k} \cdot \mathbf{x}_{n}\\ \vdots & \ddots & \vdots & \ddots & \vdots\\ \mathbf{x}_{n} \cdot \mathbf{x}_{1} & \cdots & \mathbf{x}_{n} \cdot \mathbf{x}_{k} & \cdots & \mathbf{x}_{n} \cdot \mathbf{x}_{n} \end{array}\right|}\\ & = & \frac{( \mathbf{x}_{1} \wedge \cdots \wedge ( \mathbf{C} )_{k} \wedge \cdots \wedge \mathbf{x}_{n} ) \cdot ( \mathbf{x}_{n} \wedge \cdots \wedge \mathbf{x}_{k} \wedge \cdots \wedge \mathbf{x}_{1} )^{}}{( -1 )^{k} \left|\begin{array}{ccccc} \mathbf{x}_{1} & \cdots & \mathbf{x}_{k} & \cdots & \mathbf{x}_{n} \end{array}\right|^{2}}\end{array}$

and represents transforming or projecting the system, or each vector $\mathbf{c}_{k}$, onto the basis of vectors $\mathbf{x}_{1} , \ldots ,\mathbf{x}_{k} , \ldots ,\mathbf{x}_{n}$ which need not be orthonormal. However, solving for the vectors $\mathbf{a}_{k}$ by this formula is unnecessary, and unnecessarily requires $n$ vectors $\mathbf{c}_{1} , \ldots ,\mathbf{c}_{k} , \ldots ,\mathbf{c}_{n}$ at a time. Solving each equation is independent in this case. This has been shown to clarify the usage, as far as what not to do, unless one has an unusual need to solve a particular vector $\mathbf{a}_{k}$. Instead, the following can be done in the case of projecting vectors $\mathbf{c}_{k}$ onto a new arbitrary basis $\mathbf{x}_{k}$.

### Projecting a vector onto an arbitrary basis.

Projecting any vector $\mathbf{c}$ onto a new arbitrary basis $\mathbf{x}_1, \ldots, \mathbf{x}_k, \ldots, \mathbf{x}_n$ as

$\begin{array}{rcl} \mathbf{c} & = & c_1 \mathbf{e}_1 + \cdots + c_k \mathbf{e}_k + \cdots + c_n \mathbf{e}_n\\ & = & a_1 \mathbf{x}_1 + \cdots + a_k \mathbf{x}_k + \cdots + a_n \mathbf{x}_n\end{array}$

where each $\mathbf{x}_k$ is written in the form

$\begin{array}{rcl} \mathbf{x}_k & = & x_{k 1} \mathbf{e}_1 + x_{k 2} \mathbf{e}_2 + \cdots + x_{k k} \mathbf{e}_k + \cdots + x_{k n} \mathbf{e}_n\end{array}$

is a system of $n$ scalar equations in $n$ unknown coordinates $a_k$

$\begin{array}{rcl} a_1 x_{11} + \cdots + a_k x_{k 1} + \cdots + a_n x_{n 1} & = & c_1\\ & \vdots & \\ a_1 x_{1 k} + \cdots + a_k x_{k k} + \cdots + a_n x_{n k} & = & c_k\\ & \vdots & \\ a_1 x_{1 n} + \cdots + a_k x_{k n} + \cdots + a_n x_{n n} & = & c_n\end{array}$

and can be solved using the ordinary Cramer’s rule for systems of scalar equations, where the step of adding a basis can be considered as already done. For $n = 3$, the solutions for the scalars $a_k$ are

$\begin{array}{rcl} \mathbf{c} \wedge \mathbf{x}_2 \wedge \mathbf{x}_3 & = & a_1 \mathbf{x}_1 \wedge \mathbf{x}_2 \wedge \mathbf{x}_3\\ \mathbf{c} \wedge \mathbf{x}_1 \wedge \mathbf{x}_3 & = & a_2 \mathbf{x}_2 \wedge \mathbf{x}_1 \wedge \mathbf{x}_3\\ \mathbf{c} \wedge \mathbf{x}_1 \wedge \mathbf{x}_2 & = & a_3 \mathbf{x}_3 \wedge \mathbf{x}_1 \wedge \mathbf{x}_2\\ a_1 & = & \frac{\mathbf{c} \wedge \mathbf{x}_2 \wedge \mathbf{x}_3}{\mathbf{x}_1 \wedge \mathbf{x}_2 \wedge \mathbf{x}_3}\\ a_2 & = & \frac{\mathbf{c} \wedge \mathbf{x}_1 \wedge \mathbf{x}_3}{\mathbf{x}_2 \wedge \mathbf{x}_1 \wedge \mathbf{x}_3} = \frac{\mathbf{x}_1 \wedge \mathbf{c} \wedge \mathbf{x}_3}{\mathbf{x}_1 \wedge \mathbf{x}_2 \wedge \mathbf{x}_3}\\ a_3 & = & \frac{\mathbf{c} \wedge \mathbf{x}_1 \wedge \mathbf{x}_2}{\mathbf{x}_3 \wedge \mathbf{x}_1 \wedge \mathbf{x}_2} = \frac{\mathbf{x}_1 \wedge \mathbf{x}_2 \wedge \mathbf{c}}{\mathbf{x}_1 \wedge \mathbf{x}_2 \wedge \mathbf{x}_3} .\end{array}$

For $n$ basis vectors ($n$ equations in $n$ unknowns), the solution for the $k$th unknown scalar coordinate $a_k$ generalizes to

$\begin{array}{rcl} a_k & = & \frac{\mathbf{x}_1 \wedge \cdots \wedge (\mathbf{c})_k \wedge \cdots \wedge \mathbf{x}_n}{\mathbf{x}_1 \wedge \cdots \wedge \mathbf{x}_k \wedge \cdots \wedge \mathbf{x}_n}\\ & = & \frac{\left|\begin{array}{ccccc} x_{11} & \ldots & c_1 & \cdots & x_{n 1}\\ \vdots & \ddots & \vdots & \ddots & \vdots\\ x_{1 k} & \cdots & c_k & \cdots & x_{n k}\\ \vdots & \ddots & \vdots & \ddots & \vdots\\ x_{1 n} & \cdots & c_n & \cdots & x_{n n} \end{array}\right|}{\left|\begin{array}{ccccc} x_{11} & \ldots & x_{k 1} & \cdots & x_{n 1}\\ \vdots & \ddots & \vdots & \ddots & \vdots\\ x_{1 k} & \cdots & x_{k k} & \cdots & x_{n k}\\ \vdots & \ddots & \vdots & \ddots & \vdots\\ x_{1 n} & \cdots & x_{k n} & \cdots & x_{n n} \end{array}\right|}\end{array}$

the formula for Cramer’s rule.

The remainder of this subsection outlines some additional concepts or applications that may be important to consider when using arbitrary bases, but otherwise you may skip ahead to the next subsection.

The reciprocal basis $\mathbf{x}^{\prime}_1, \ldots, \mathbf{x}^{\prime}_k, \ldots, \mathbf{x}^{\prime}_n$ of the arbitrary basis $\mathbf{x}_1, \ldots, \mathbf{x}_k, \ldots, \mathbf{x}_n$ is such that $\mathbf{c} \cdot \mathbf{x}^{\prime}_k = a_k$, while in general $\mathbf{c} \cdot \mathbf{x}_k \neq a_k$. The $k$th reciprocal base $\mathbf{x}^{\prime}_k$ is

$\begin{array}{rcl} \mathbf{c} \cdot \mathbf{x}^{\prime}_k = a_k & = & (- 1)^{k - 1} (\mathbf{c} \wedge \mathbf{x}_1 \wedge \cdots \wedge ()_k \wedge \cdots \wedge \mathbf{x}_n) \cdot (\mathbf{x}_1 \wedge \cdots \wedge \mathbf{x}_k \wedge \cdots \wedge \mathbf{x}_n)^{- 1}\\ & = & (- 1)^{k - 1} \mathbf{c} \cdot ((\mathbf{x}_1 \wedge \cdots \wedge ()_k \wedge \cdots \wedge \mathbf{x}_n) \cdot (\mathbf{x}_1 \wedge \cdots \wedge \mathbf{x}_k \wedge \cdots \wedge \mathbf{x}_n)^{- 1})\\ \mathbf{x}^{\prime}_k & = & (- 1)^{k - 1} (\mathbf{x}_1 \wedge \cdots \wedge ()_k \wedge \cdots \wedge \mathbf{x}_n) \cdot (\mathbf{x}_1 \wedge \cdots \wedge \mathbf{x}_k \wedge \cdots \wedge \mathbf{x}_n)^{- 1}\end{array}$

where $()_k$ denotes that the $k$th vector $\mathbf{x}_k$ is removed from the blade. In mathematics literature, the reciprocal basis $\mathbf{x}^{\prime}_1, \ldots, \mathbf{x}^{\prime}_k, \ldots, \mathbf{x}^{\prime}_n$ is usually written using superscript indices as $\mathbf{x}^1, \ldots, \mathbf{x}^k, \ldots, \mathbf{x}^n$ which should not be confused as exponents or powers of the vectors. The reciprocal bases can be computed once and saved, and then any vector $\mathbf{c}$ can be projected onto the arbitrary basis as $\mathbf{c}= (\mathbf{c} \cdot \mathbf{x}^k) \mathbf{x}_k$ with implied summation over the range of $k \in \{ 1, \cdots, n \}$.

Note that

$\begin{array}{rcl} \mathbf{x}_k \cdot \mathbf{x}^k & = & (- 1)^{k - 1} \mathbf{x}_k \cdot ((\mathbf{x}_1 \wedge \cdots \wedge ()_k \wedge \cdots \wedge \mathbf{x}_n) \cdot (\mathbf{x}_1 \wedge \cdots \wedge \mathbf{x}_k \wedge \cdots \wedge \mathbf{x}_n)^{- 1})\\ & = & (- 1)^{k - 1} (\mathbf{x}_k \wedge \mathbf{x}_1 \wedge \cdots \wedge ()_k \wedge \cdots \wedge \mathbf{x}_n) \cdot (\mathbf{x}_1 \wedge \cdots \wedge \mathbf{x}_k \wedge \cdots \wedge \mathbf{x}_n)^{- 1}\\ & = & (\mathbf{x}_1 \wedge \cdots \wedge \mathbf{x}_k \wedge \cdots \wedge \mathbf{x}_n) \cdot (\mathbf{x}_1 \wedge \cdots \wedge \mathbf{x}_k \wedge \cdots \wedge \mathbf{x}_n)^{- 1} = 1 =\mathbf{x}^k \cdot \mathbf{x}_k\\ \mathbf{x}^k \cdot \mathbf{x}_k & = & (- 1)^{k - 1} \mathbf{x}^k \cdot ((\mathbf{x}^1 \wedge \cdots \wedge ()^k \wedge \cdots \wedge \mathbf{x}^n) \cdot (\mathbf{x}^1 \wedge \cdots \wedge \mathbf{x}^k \wedge \cdots \wedge \mathbf{x}^n)^{- 1})\end{array}$

and that for $j \neq k$

$\begin{array}{rcl} \mathbf{x}_j \cdot \mathbf{x}^k & = & (- 1)^{k - 1} \mathbf{x}_j \cdot ((\mathbf{x}_1 \wedge \cdots \wedge \mathbf{x}_j \wedge \cdots \wedge ()_k \wedge \cdots \wedge \mathbf{x}_n) \cdot (\mathbf{x}_1 \wedge \cdots \wedge \mathbf{x}_k \wedge \cdots \wedge \mathbf{x}_n)^{- 1})\\ & = & (- 1)^{k - 1} (\mathbf{x}_j \wedge \mathbf{x}_1 \wedge \cdots \wedge \mathbf{x}_j \wedge \cdots \wedge ()_k \wedge \cdots \wedge \mathbf{x}_n) \cdot (\mathbf{x}_1 \wedge \cdots \wedge \mathbf{x}_k \wedge \cdots \wedge \mathbf{x}_n)^{- 1}\\ & = & (\mathbf{x}_1 \wedge \cdots \wedge \mathbf{x}_j \wedge \cdots \wedge (\mathbf{x}_j)_k \wedge \cdots \wedge \mathbf{x}_n) \cdot (\mathbf{x}_1 \wedge \cdots \wedge \mathbf{x}_k \wedge \cdots \wedge \mathbf{x}_n)^{- 1} = 0 =\mathbf{x}^k \cdot \mathbf{x}_j\\ \mathbf{x}^k \cdot \mathbf{x}_j & = & (- 1)^{j - 1} \mathbf{x}^k \cdot ((\mathbf{x}^1 \wedge \cdots \wedge \mathbf{x}^k \wedge \cdots \wedge ()^j \wedge \cdots \wedge \mathbf{x}^n) \cdot (\mathbf{x}^1 \wedge \cdots \wedge \mathbf{x}^k \wedge \cdots \wedge \mathbf{x}^n)^{- 1})\end{array}$

therefore if the $\mathbf{x}^k$ are the new arbitrary bases, then the $\mathbf{x}_k$ are the reciprocal bases and we also have

$\begin{array}{rcl} \mathbf{c} & = & (\mathbf{c} \cdot \mathbf{x}_k) \mathbf{x}^k\end{array}$

with the summation convention over $k$.

If we abandon the old basis $\mathbf{e}_k$ and old coordinates $c_k$ and $a_k$ of $\mathbf{c}$ and refer $\mathbf{c}$ only to the new basis $\mathbf{x}_k$ and its reciprocal $\mathbf{x}^k$, then we can newly rename coordinates for $\mathbf{c}$ on the new bases as

$\begin{array}{rcl} \mathbf{c} & = & (\mathbf{c} \cdot \mathbf{x}^k) \mathbf{x}_k = c^k \mathbf{x}_k\\ \mathbf{c} & = & (\mathbf{c} \cdot \mathbf{x}_k) \mathbf{x}^k = c_k \mathbf{x}^k .\end{array}$

This is a coordinates naming convention that is often used implicitly such that $c^k =\mathbf{c} \cdot \mathbf{x}^k$ and $c_k =\mathbf{c} \cdot \mathbf{x}_k$ are understood as identities. Using this coordinates naming convention we can derive the expression

$\begin{array}{rcl} \mathbf{c} \cdot \mathbf{c} & = & c^k \mathbf{x}_k \cdot c_j \mathbf{x}^j = c^k c_j \mathbf{x}_k \cdot \mathbf{x}^j .\end{array}$

Since $\mathbf{x}_k \cdot \mathbf{x}^j = 1$ for $j = k$ and $\mathbf{x}_k \cdot \mathbf{x}^j = 0$ for $j \neq k$ (or $\mathbf{x}_k \cdot \mathbf{x}^j = \delta^j_k$ using Kronecker delta), this expression reduces to the identity

$\begin{array}{rcl} \mathbf{c} \cdot \mathbf{c} & = & c^k c_k = (\mathbf{c} \cdot \mathbf{x}^k) (\mathbf{c} \cdot \mathbf{x}_k) .\end{array}$

Since $\mathbf{c}$ is an arbitrary vector, we can choose any two vectors $\mathbf{u}$ and $\mathbf{v}$ and find the identities

$\begin{array}{rcl} \mathbf{u} \cdot \mathbf{v} & = & u^k v_k = u_k v^k\\ & = & (\mathbf{u} \cdot \mathbf{x}^k) (\mathbf{v} \cdot \mathbf{x}_k) = (\mathbf{u} \cdot \mathbf{x}_k) (\mathbf{v} \cdot \mathbf{x}^k) .\end{array}$
Reciprocal bases.

In terms of a basis $\mathbf{x}_k$ and its reciprocal basis $\mathbf{x}^k$, the inner or dot product $\mathbf{u} \cdot \mathbf{v}$ of two vectors can be written four ways

$\begin{array}{rcl} \mathbf{u} \cdot \mathbf{v} & = & [(\mathbf{u} \cdot \mathbf{x}^j) \mathbf{x}_j] \cdot [(\mathbf{v} \cdot \mathbf{x}^k) \mathbf{x}_k] = u^j v^k \mathbf{x}_j \cdot \mathbf{x}_k = u^j v^k m_{j k}\\ & = & [(\mathbf{u} \cdot \mathbf{x}_j) \mathbf{x}^j] \cdot [(\mathbf{v} \cdot \mathbf{x}_k) \mathbf{x}^k] = u_j v_k \mathbf{x}^j \cdot \mathbf{x}^k = u_j v_k m^{j k}\\ & = & [(\mathbf{u} \cdot \mathbf{x}^j) \mathbf{x}_j] \cdot [(\mathbf{v} \cdot \mathbf{x}_k) \mathbf{x}^k]_{} = u^j v_k m_j^k = u^j v_k \delta^k_j = u^k v_k\\ & = & [(\mathbf{u} \cdot \mathbf{x}_j) \mathbf{x}^j] \cdot [(\mathbf{v} \cdot \mathbf{x}^k) \mathbf{x}_k] = u_j v^k m^j_k = u_j v^k \delta^j_k = u_k v^k .\end{array}$

In the language of tensors, $m$ is called the metric tensor of the basis, $\delta$ is the Kronecker delta, an upper-indexed (superscripted) element is called contravariant, and a lower-indexed (subscripted) element is called covariant. Equating right-hand sides, we obtain the tensor contractions that are equivalent to the dot product

$\begin{array}{rcl} u^j v^k m_{j k} & = & u_k v^k = u^j v_j =\mathbf{u} \cdot \mathbf{v}\\ u_j v_k m^{j k} & = & u_j v^j = u^k v_k =\mathbf{u} \cdot \mathbf{v}\end{array}$

where in the first equation either $u^j m_{j k} = u_k$ or $v^k m_{j k} = v_j$ (index-lowering contractions), and in the second equation either $u_j m^{j k} = u^k$ or $v_k m^{j k} = v^j$ (index-raising contractions). The contraction that lowers the index on $u^j$ into $u_k$ expands to the sum

$\begin{array}{rcl} u^j m_{j k} & = & u^1 \mathbf{x}_1 \cdot \mathbf{x}_k + u^2 \mathbf{x}_2 \cdot \mathbf{x}_k + \cdots + u^n \mathbf{x}_n \cdot \mathbf{x}_k\\ & = & (u^1 \mathbf{x}_1 + u^2 \mathbf{x}_2 + \cdots + u^n \mathbf{x}_n) \cdot \mathbf{x}_k\\ & = & (u^j \mathbf{x}_j) \cdot \mathbf{x}_k =\mathbf{u} \cdot \mathbf{x}_k = u_k .\end{array}$

Contractions are a form of inner product. Contractions such as these

$\begin{array}{rcl} u_k & = & \mathbf{u} \cdot \mathbf{x}_k = u_j \mathbf{x}^j \cdot \mathbf{x}_k = u_j m_k^j = u_j \delta_k^j\\ u^k & = & \mathbf{u} \cdot \mathbf{x}^k = u^j \mathbf{x}_j \cdot \mathbf{x}^k = u^j m^k_j = u^j \delta_j^k\end{array}$

are called index renaming. Contractions involving $m$ and $\delta$ have many relations such as

$\begin{array}{rcl} m_{1 k} m^{1 k} & = & (\mathbf{x}_1 \cdot \mathbf{x}_k) (\mathbf{x}^1 \cdot \mathbf{x}^k) = (x_1)_k (x^1)^k =\mathbf{x}_1 \cdot \mathbf{x}^1 = 1\\ m_{j k} m^{j k} & = & n = m^j_j = m^k_k = \delta_j^j = \delta_k^k\\ m_j^i m_{i k} & = & (\mathbf{x}^i \cdot \mathbf{x}_j) (\mathbf{x}_i \cdot \mathbf{x}_k) = (x_j)^i (x_k)_i =\mathbf{x}_j \cdot \mathbf{x}_k = m_{j k}\\ m^j_i m^{i k} & = & (\mathbf{x}^j \cdot \mathbf{x}_i) (\mathbf{x}^i \cdot \mathbf{x}^k) = (x^j)_i (x^k)^i =\mathbf{x}^j \cdot \mathbf{x}^k = m^{j k} .\end{array}$

When viewed as $n \times n$ matrices, $m_{j k}$ and $m^{j k}$ are inverse matrices. The matrices $m$ are symmetric, so the indices can be reversed. The contraction that computes the matrix product is

$\begin{array}{rcl} m^{j i} m_{i k} & = & (\mathbf{x}^j \cdot \mathbf{x}^i) (\mathbf{x}_i \cdot \mathbf{x}_k) = (x^j)^i (x_k)_i =\mathbf{x}^j \cdot \mathbf{x}_k = m_k^j = \delta^j_k\\ {}[m^{j k}] & = & [m_{j k}]^{- 1} .\end{array}$

The Kronecker delta $\delta_k^j$, viewed as a matrix, is the identity matrix. From this matrix product identity, the reciprocal bases $\mathbf{x}^j$ can be computed as

$\begin{array}{rcl} m^{j i} \mathbf{x}_i \cdot \mathbf{x}_k & = & \mathbf{x}^j \cdot \mathbf{x}_k\\ m^{j i} \mathbf{x}_i & = & \mathbf{x}^j = (\mathbf{x}^j \cdot \mathbf{x}^i) \mathbf{x}_i = (x^j)^i \mathbf{x}_i .\end{array}$

The formula $\mathbf{u} \cdot \mathbf{v}= u_i v^i = u^i v_i$ for the inner or dot product of vectors requires the terms to be products of covariant and contravariant component pairs. One of the vectors has to be expressed in terms of the reciprocal basis relative to the basis of the other vector. This requirement is satisfied when expressing vectors on an orthonormal basis that is self-reciprocal, but must be paid proper attention otherwise. The formula is often written $\mathbf{u} \cdot \mathbf{v}= \Sigma u_i v_i$, but this is valid only if the vectors are both expressed on the same orthonormal basis $\mathbf{e}^k =\mathbf{e}_k$ with $\mathbf{e}_j \cdot \mathbf{e}_k = \delta_{j k}$.

The derivative operator $\nabla$ called del is often written as

$\begin{array}{rcl} \nabla & = & \sum^n_{i = 1} \mathbf{e}_i \frac{\partial}{\partial x_i} =\mathbf{e}_i \frac{\partial}{\partial x_i}\end{array}$

where the $\mathbf{e}_i$ are an orthonormal standard basis with vectors written in the Cartesian form $\mathbf{x}= x_j \mathbf{e}_j$. Del $\nabla$ can be treated as a vector in computations. It can also be written as

$\begin{array}{rcl} \nabla & = & \mathbf{x}^i \frac{\partial}{\partial r^i} =\mathbf{x}_i \frac{\partial}{\partial r_i}\end{array}$

for a basis $\mathbf{x}_i$ and reciprocal basis $\mathbf{x}^i$, and position vector $\mathbf{r}= r^j \mathbf{x}_j = r_j \mathbf{x}^j$ written in the tensor forms. For example, the divergence of $\mathbf{r}$ can be computed several ways as

$\begin{array}{rcl} \nabla \cdot \mathbf{r} & = & \frac{\partial (\mathbf{x}^i \cdot \mathbf{r})}{\partial r^i} = \frac{\partial r^i}{\partial r^i} = \delta_i^i = n\\ \nabla \cdot \mathbf{r} & = & \frac{\partial (\mathbf{x}_i \cdot \mathbf{r})}{\partial r_i} = \frac{\partial r_i}{\partial r_i} = \delta_i^i = n\\ \nabla \cdot \mathbf{r} & = & \frac{\partial}{\partial r_i} \mathbf{x}_i \cdot (r^j \mathbf{x}_j) = \frac{\partial}{\partial r_i} r^j m_{i j} = \frac{\partial r_i}{\partial r_i} = \delta_i^i = n\\ \nabla \cdot \mathbf{r} & = & \frac{\partial}{\partial r_i} \mathbf{x}_i \cdot (r_j \mathbf{x}^j) = \frac{\partial}{\partial r_i} r_j m_i^j = \frac{\partial r_i}{\partial r_i} = \delta_i^i = n\\ \nabla \cdot \mathbf{r} & = & \frac{\partial}{\partial r^i} \mathbf{x}^i \cdot (r^j \mathbf{x}_j) = \frac{\partial}{\partial r^i} r^j m_j^i = \frac{\partial r^i}{\partial r^i} = \delta_i^i = n\\ \nabla \cdot \mathbf{r} & = & \frac{\partial}{\partial r^i} \mathbf{x}^i \cdot (r_j \mathbf{x}^j) = \frac{\partial}{\partial r^i} r_j m^{i j} = \frac{\partial r^i}{\partial r^i} = \delta_i^i = n.\end{array}$

The derivative operator $\nabla$ can be applied further in this way as a vector, where

$\begin{array}{rcl} \nabla \mathbf{r} & = & \nabla \cdot \mathbf{r}+ \nabla \wedge \mathbf{r}\end{array}$

in geometric calculus for vectors in any number of dimensions $n$, and

$\begin{array}{rcl} \nabla \mathbf{r} & = & - \nabla \cdot \mathbf{r}+ \nabla \times \mathbf{r}\end{array}$

in quaternions or vector analysis in three dimensions spanned by the orthonormal quaternion vector units $\mathbf{i}$, $\mathbf{j}$, and $\mathbf{k}$.

In $n = 3$ dimensions, the product $\nabla \cdot \mathbf{r}$ is known as divergence, and the product $(\nabla \wedge \mathbf{r}) /\mathbf{I}_3 = \nabla \times \mathbf{r}$ is known as curl. The value $\mathbf{I}_3 =\mathbf{e}_1 \wedge \mathbf{e}_2 \wedge \mathbf{e}_3$ is the pseudoscalar of the Clifford algebra. Dividing the bivector $\nabla \wedge \mathbf{r}$ by the pseudoscalar $\mathbf{I}_3$ produces its spatial dual in the orthogonal vector space with the same magnitude, and oriented with sign in the expected direction for the curl vector. For a scalar field $f$, the product $\nabla f$ is known as the gradient vector, which generalizes the scalar-valued derivative of a single-variable function to a vector-valued derivative of a multi-variable function $f$.

In the rectilinear coordinates system (or affine or oblique coordinate system) that has been considered so far, the metric tensor $m$ has been a constant matrix containing constant ratios that relate to the amount of shearing that occurs in transforming from one rectilinear system to another. In a curvilinear coordinates system, the metric tensor $m$ may be variable and varies with the position vector $\mathbf{r}$. The local frame or basis $\mathbf{x}_i$ at $\mathbf{r}$ can be defined as

$\begin{array}{rcl} \mathbf{x}_i & = & \frac{\partial \mathbf{r}}{\partial s^i} = \frac{\partial r^k}{\partial s^i} \mathbf{e}_k\end{array}$

where the position vector $\mathbf{r}= r^k \mathbf{e}_k$. It can be assumed that $\mathbf{e}_k$ is a standard basis. Each $r^k$ is a function of the variables $s^i$, and each $s^i$ is at least an implicit function of the variables $r^k$ such that the transformation is invertible. The basis $\mathbf{x}_i$ is a frame local to each position of $\mathbf{r}$ in space, and may vary with position. The covariant metric tensor is

$\begin{array}{rcl} m_{i j} & = & \mathbf{x}_i \cdot \mathbf{x}_j = \frac{\partial r^k \mathbf{e}_k}{\partial s^i} \cdot \frac{\partial r^l \mathbf{e}_l}{\partial s^j} = \frac{\partial r^k}{\partial s^i} \frac{\partial r^l}{\partial s^j} \delta_{k l} = \sum_k \frac{\partial r^k}{\partial s^i} \frac{\partial r^k}{\partial s^j}\end{array}$

and in terms of the Jacobian matrix $\mathbf{J}$, $m_{i j}$ is expressed as the matrix

$\begin{array}{rcl} J_{k i} & = & \frac{\partial r^k}{\partial s^i}\\ \mathbf{J} & = & [J_{k i}]\\ {}[m_{i j}] & = & \left[ \sum_k J_{k i} J^{}_{k j} \right] =\mathbf{J}^{\mathrm{T}} \mathbf{J}.\end{array}$

The contravariant metric tensor $m^{i j}$ is again the matrix inverse of the covariant metric tensor

$\begin{array}{rcl} {}[m^{i j}] & = & [m_{i j}]^{- 1}\end{array}$

and the contravariant or reciprocal basis is

$\begin{array}{rcl} \mathbf{x}^i & = & m^{i j} \mathbf{x}_j .\end{array}$

In a cylindrical coordinate system or spherical coordinate system, $m_{i j}$ is a diagonal matrix and $m^{i j}$ is easily found as the matrix with each element inverted.

### Projecting a vector onto an orthogonal basis

Projections onto arbitrary bases $\mathbf{x}_{k}$, as solved using Cramer’s rule as just above, treats projections onto orthogonal bases as only a special case. Projections onto mutually orthogonal bases can be achieved using the ordinary projection operation

$\begin{array}{rcl} a_{k} & = & \mathbf{c} \cdot \frac{\mathbf{x}_{k}}{| \mathbf{x}_{k} |^{2}} = \frac{\mathbf{c} \cdot \mathbf{x}_{k}}{\mathbf{x}_{k} \cdot \mathbf{x}_{k}} = \frac{\mathbf{c}^{||\mathbf{x}_{k}} \cdot \mathbf{x}_{k}}{\mathbf{x}_{k} \cdot \mathbf{x}_{k}}\end{array}$

which is correct only if the $\mathbf{x}_{k}$ are mutually orthogonal. If the bases $\mathbf{x}_{1} , \ldots ,\mathbf{x}_{k} , \ldots ,\mathbf{x}_{n}$ are constrained to be mutually perpendicular (orthogonal), then the formula for Cramer’s rule becomes

$\begin{array}{rcl} a_{k} & = & \frac{\mathbf{x}_{1} \wedge \cdots \wedge ( \mathbf{c}^{||\mathbf{x}_{k}} +\mathbf{c}^{\bot \mathbf{x}_{k}} )_{k} \wedge \cdots \wedge \mathbf{x}_{n}}{\mathbf{x}_{1} \wedge \cdots \wedge \mathbf{x}_{k} \wedge \cdots \wedge \mathbf{x}_{n}}\\ & = & \frac{\mathbf{x}_{1} \cdots ( \mathbf{c}^{||\mathbf{x}_{k}} )_{k} \cdots \mathbf{x}_{n}}{\mathbf{x}_{1} \cdots \mathbf{x}_{k} \cdots \mathbf{x}_{n}} = \frac{\mathbf{c}^{||\mathbf{x}_{k}} \mathbf{x}_{1} \cdots ( )_{k} \cdots \mathbf{x}_{n}}{\mathbf{x}_{k} \mathbf{x}_{1} \cdots ( )_{k} \cdots \mathbf{x}_{n}}\\ & = & \frac{\mathbf{c}^{||\mathbf{x}_{k}}}{\mathbf{x}_{k}} = \frac{\mathbf{c}^{||\mathbf{x}_{k}} \mathbf{x}_{k}}{\mathbf{x}_{k} \mathbf{x}_{k}} = \frac{\mathbf{c} \cdot \mathbf{x}_{k}}{\mathbf{x}_{k} \cdot \mathbf{x}_{k}}\end{array}$

where $\mathbf{c}$ has been written as a sum of vector components parallel and perpendicular to $\mathbf{x}_{k}$. For any two perpendicular vectors $\mathbf{x}_{j}$,$\mathbf{x}_{k}$, their exterior product $\mathbf{x}_{j} \wedge \mathbf{x}_{k} =\mathbf{x}_{j} \mathbf{x}_{k}$ equals their Clifford product. The vector component $\mathbf{c}^{\bot \mathbf{x}_{k}}$ must be parallel to the other $\mathbf{x}_{j \neq k}$, therefore its outermorphism is zero. The result is Cramer’s rule reduced to orthogonal projection of vector $\mathbf{c}$ onto base $\mathbf{x}_{k}$ such that $\mathbf{c}^{||\mathbf{x}_{k}} =a_{k} \mathbf{x}_{k}$.

In general, the bases $\mathbf{x}_{1} , \ldots ,\mathbf{x}_{k} , \ldots ,\mathbf{x}_{n}$ are not necessarily mutually orthogonal and the projection to use is Cramer’s rule, generalized projection, not the dot product specific to orthogonal projection.

An orthonormal basis is identical to its reciprocal basis since

$\begin{array}{rcl} \mathbf{x}^{k} & = & ( -1 )^{k-1} ( \mathbf{x}_{1} \wedge \cdots \wedge ( )_{k} \wedge \cdots \wedge \mathbf{x}_{n} ) \cdot ( \mathbf{x}_{1} \wedge \cdots \wedge \mathbf{x}_{k} \wedge \cdots \wedge \mathbf{x}_{n} )^{-1}\\ & = & ( -1 )^{k-1} ( \mathbf{x}_{1} \cdots ( )_{k} \cdots \mathbf{x}_{n} ) ( \mathbf{x}_{n} \cdots ( )_{k} \cdots \mathbf{x}_{1} ) \mathbf{x}_{k} ( -1 )^{k-1}\\ & = & \mathbf{x}_{k}\end{array}$

and $\mathbf{c}= ( \mathbf{c} \cdot \mathbf{x}^{k} ) \mathbf{x}_{k}$ with implied summation over the range of $k \in \{ 1, \cdots ,n \}$. For an orthogonal basis, each reciprocal base is already shown to be

$\begin{array}{rcl} \mathbf{x}^{k} & = & \frac{\mathbf{x}_{k}}{| \mathbf{x}_{k} |^{2}} = \frac{\mathbf{x}_{k}}{\mathbf{x}_{k} \cdot \mathbf{x}_{k}} = \frac{\mathbf{x}_{k}}{\mathbf{x}_{k} \mathbf{x}_{k}} = \frac{1}{\mathbf{x}_{k}} =\mathbf{x}^{-1}_{k}\end{array}$

which suggests the name reciprocal basis.

### Solving a system of vector equations using SymPy

The free software SymPy, for symbolic mathematics using python, includes a Geometric Algebra Module and interactive calculator console isympy. The isympy console can be used to solve systems of vector equations using the formulas of this article. A simple example of console interaction follows to solve the system

$\begin{array}{rcl} 3\mathbf{v}_{1} +4\mathbf{v}_{2} +5\mathbf{v}_{3} & = & \mathbf{c}_{1} =9\mathbf{e}_{1} +2\mathbf{e}_{2} +3\mathbf{e}_{3}\\ 2\mathbf{v}_{1} +3\mathbf{v}_{2} +7\mathbf{v}_{3} & = & \mathbf{c}_{2} =6\mathbf{e}_{1} +5\mathbf{e}_{2} +8\mathbf{e}_{3}\\ 9\mathbf{v}_{1} +6\mathbf{v}_{2} +9\mathbf{v}_{3} & = & \mathbf{c}_{3} =2\mathbf{e}_{1} +4\mathbf{e}_{2} +7\mathbf{e}_{3} .\end{array}$
\$isympy
>>> from sympy.galgebra.ga import *
>>> (e1,e2,e3,e4,e5,e6) = MV.setup('e*1|2|3|4|5|6',metric='[1,1,1,1,1,1]')
>>> (v1,v2,v3) = symbols('v1 v2 v3')
>>> (c1,c2,c3,C) = symbols('c1 c2 c3 C')
>>> (a1,a2,a3) = symbols('a1 a2 a3')
>>> a1 = 3*e4 + 2*e5 + 9*e6
>>> a2 = 4*e4 + 3*e5 + 6*e6
>>> a3 = 5*e4 + 7*e5 + 9*e6
>>> c1 = 9*e1 + 2*e2 + 3*e3
>>> c2 = 6*e1 + 5*e2 + 8*e3
>>> c3 = 2*e1 + 4*e2 + 7*e3
>>> C = (c1^e4) + (c2^e5) + (c3^e6)
>>> v1 = (C^a2^a3)|((-1)**(1-1)*MV.inv(a1^a2^a3))
>>> v2 = (a1^C^a3)|((-1)**(2-1)*MV.inv(a1^a2^a3))
>>> v3 = (a1^a2^C)|((-1)**(3-1)*MV.inv(a1^a2^a3))
>>> 3*v1 + 4*v2 + 5*v3
9*e_1 + 2*e_2 + 3*e_3
>>> 2*v1 + 3*v2 + 7*v3
6*e_1 + 5*e_2 + 8*e_3
>>> 9*v1 + 6*v2 + 9*v3
2*e_1 + 4*e_2 + 7*e_3

## Incompatible and indeterminate cases

A system of equations is said to be incompatible when there are no solutions and it is called indeterminate when there is more than one solution. For linear equations, an indeterminate system will have infinitely many solutions (if it is over an infinite field), since the solutions can be expressed in terms of one or more parameters that can take arbitrary values.

Cramer's rule applies to the case where the coefficient determinant is nonzero. In the contrary case the system is either incompatible or indeterminate, based on the values of the determinants only for 2x2 systems.

For 3x3 or higher systems, the only thing one can say when the coefficient determinant equals zero is: if any of the "numerator" determinants are nonzero, then the system must be incompatible. However, the converse is false: having all determinants zero does not imply that the system is indeterminate. A simple example where all determinants vanish but the system is still incompatible is the 3x3 system x+y+z=1, x+y+z=2, x+y+z=3.

## Notes

1. ^ Cramer, Gabriel (1750). "Introduction à l'Analyse des lignes Courbes algébriques" (in French). Geneva: Europeana. pp. 656–659. Retrieved 2012-05-18.
2. ^ MacLaurin, Colin (1748). A Treatise of Algebra, in Three Parts..
3. ^ Boyer, Carl B. (1968). A History of Mathematics (2nd ed.). Wiley. p. 431.
4. ^ Katz, Victor (2004). A History of Mathematics (Brief ed.). Pearson Education. pp. 378–379.
5. ^ Hedman, Bruce A. (1999). "An Earlier Date for "Cramer's Rule"". Historia Mathematica. 4(26) (4): 365–368. doi:10.1006/hmat.1999.2247
6. ^ Ken Habgood, Itamar Arel (2012). "A condensation-based application of Cramerʼs rule for solving large-scale linear systems". Journal of Discrete Algorithms 10: 98–109. doi:10.1016/j.jda.2011.06.007.
7. ^ Robinson, Stephen M. (1970). "A Short Proof of Cramer's Rule". Mathematics Magazine 43: 94–95.