Free matrix representation

Free matrix representation#

by Stéphane Haussler

I hope the reader will find the free matrix representation intuitive. In this representation, each matrix element is expressed using its basis vectors, basis bivectors, and basis volumes, and can be reordered freely. The matrix brackets \([]\) function as an operator, adding a \(+\) sign between the elements within the brackets.

Vectors#

A vector \(v^♯\) with components \(a\), \(b\), and \(c\) will most often expressed using implicit basis vectors in column form:

\[\begin{split}v^♯ = \begin{bmatrix} a \\ b \\ c \\ \end{bmatrix}\end{split}\]

A plus sign \(+\) can be added to all elements multiplied by their respective basis vectors \(∂_x\), \(∂_y\), and \(∂_z\):

\[v^♯ = a \, ∂_x + b \, ∂_y + c \, ∂_x\]

The free matrix representation proposes explicitely writing the basis in the matrix, and order the terms as needed to organize and simplify calculations:

\[\begin{split}v^♯ = \begin{bmatrix} a \, ∂_x \\ b \, ∂_y \\ c \, ∂_z \\ \end{bmatrix}\end{split}\]

Concretely, applying a 1-form \(ω^♭ = e \, dx + f \, dy + g \, dz\) to the vector \(v^♯\) result in:

\[\begin{split}w^♭ (v^♯) = \begin{bmatrix} e \; dx & f \; dy & g \; dz \end{bmatrix} \begin{bmatrix} a \, ∂_x \\ b \, ∂_y \\ c \, ∂_z \\ \end{bmatrix}\end{split}\]

Since the vector and covector bases are explicitely written, we can fully reorganize the matrices and represent both the covector \(ω^♭\) and the vector \(v^♯\) as column matrices. The reader will likely notice that, in this common case, the standard notation is more convenient. However, this may not hold true for more complex situations.

\[\begin{split}w^♭ (v^♯) = \begin{bmatrix} e \; dx \\ f \; dy \\ g \; dz \\ \end{bmatrix} \begin{bmatrix} a \, ∂_x \\ b \, ∂_y \\ c \, ∂_z \\ \end{bmatrix}\end{split}\]

Distribute \(v^♯\) to each basis covectors \(dx^i\):

\[\begin{split}w^♭ (v^♯) = \begin{bmatrix} e \, dx \left( a \, ∂_x + b \, ∂_y + c \, ∂_z \right) \\ f \, dy \left( a \, ∂_x + b \, ∂_y + c \, ∂_z \right) \\ g \, dz \left( a \, ∂_x + b \, ∂_y + c \, ∂_z \right) \\ \end{bmatrix}\end{split}\]

Distribute each basis vectors \(∂_i\) to each basis covectors \(dx^i\):

\[\begin{split}w^♭ (v^♯) = \begin{bmatrix} e \, a \, dx ∂_x + e \, b \, dx ∂_y + e \, c \, dx ∂_z \\ f \, a \, dy ∂_x + f \, b \, dy ∂_y + f \, c \, dy ∂_z \\ g \, a \, dz ∂_x + g \, b \, dz ∂_y + g \, c \, dz ∂_z \\ \end{bmatrix}\end{split}\]

With \(dx^i ∂_j = δ^i_j\), most terms cancel and we obtain:

\[\begin{split}w^♭ (v^♯) = \begin{bmatrix} e \, a \, dx ∂_x \\ f \, b \, dy ∂_y \\ g \, c \, dz ∂_z \\ \end{bmatrix} = \begin{bmatrix} e \, a \\ f \, b \\ g \, c \\ \end{bmatrix}\end{split}\]

In other words we obtain the rules for the dot product, as we certainly expected:

\[w^♭ (v^♯) = e\;a + f\;b +g\;c\]

The calculations above are provided in exhaustive detail to illustrate a key point. By incorporating basis vectors and basis covectors into their matrix representation, we can organize and simplify calculations. This is achieved by arranging the components of covectors into rows and the components of vectors into columns, allowing us to follow matrix multiplication rules. While the result is straightforward in this example, the approach remains valid and effective even for more complex cases involving doubly covariant tensors.

Bivectors#

This is powerfull when using a pseudo-vector or pseudo-scalar basis, since the elements of the matrix can be re-ordered at will. For example, if we consider a linear combination of two forms in Euclidean space, we can write:

\[\begin{split}R^{♯♯} = \begin{bmatrix} a \; ∂_y ∧ ∂_z \\ b \; ∂_z ∧ ∂_x \\ c \; ∂_x ∧ ∂_y \\ \end{bmatrix}\end{split}\]

But also, since \(∂_i ∧ ∂_j = - ∂_j ∧ ∂_i\):

\[\begin{split}R^{♯♯} = \frac{1}{2} \begin{bmatrix} a \; ∂_y ∧ ∂_z - a \; ∂_z ∧ ∂_y \\ b \; ∂_z ∧ ∂_x - b \; ∂_x ∧ ∂_z \\ c \; ∂_x ∧ ∂_y - c \; ∂_y ∧ ∂_x \\ \end{bmatrix}\end{split}\]

Which can be reordered into an arbitray matrix, for example using a row/column matrix representation:

\[\begin{split}R^{♯♯} = \frac{1}{2} \begin{bmatrix} & - c \; ∂_y ∧ ∂_x & + b \; ∂_z ∧ ∂_x \\ + c \; ∂_x ∧ ∂_y & & - a \; ∂_z ∧ ∂_y \\ - b \; ∂_x ∧ ∂_z & + a \; ∂_y ∧ ∂_z & \\ \end{bmatrix}\end{split}\]

All above matrix representations merely mean:

\[R^{♯♯} a \; ∂_y ∧ ∂_z + b \; ∂_z ∧ ∂_x + c \; ∂_x ∧ ∂_y\]

Matrix multiplication#

We consider now the \(♭♯\) representation of \(R\) because this object takes in a vector, and outputs a vector. See here for a detailed calculation. The core of this section is to point out that we can order \(R^{♭♯}\) using the row-major convention:

\[\begin{split}R^{♭♯} = \frac{1}{2} \begin{bmatrix} & - c \; dy ∧ ∂_x & + b \; dz ∧ ∂_x \\ + c \; dx ∧ ∂_y & & - a \; dz ∧ ∂_y \\ - b \; dx ∧ ∂_z & + a \; dy ∧ ∂_z & \\ \end{bmatrix}\end{split}\]

We fall back to Matrix multiplication rules. Consider a vector \(v^♯ = v^x ∂_x + v^y ∂_y + v^z ∂_z\), to which is applied the \(R^{♭♯}\) matrix. We fully expand and distribute each component to prove that indeed, we could have followed matrix multiplication rules, using an implicit basis.

Apply the rotation matrix \(R^{♭♯}\) to the vector \(v^♯\)

\[\begin{split}R^{♭♯} v^♯ = \frac{1}{2} \begin{bmatrix} & - c \; dy ∧ ∂_x & + b \; dz ∧ ∂_x \\ + c \; dx ∧ ∂_y & & - a \; dz ∧ ∂_y \\ - b \; dx ∧ ∂_z & + a \; dy ∧ ∂_z & \\ \end{bmatrix} \begin{bmatrix} v^x ∂_x \\ v^y ∂_y \\ v^z ∂_z \\ \end{bmatrix}\end{split}\]

Fully expand and distribute the vector \(v^♯\) to each element of the matrix:

\[\begin{split}R^{♭♯} v^♯ = \frac{1}{2} \begin{bmatrix} & - c \; dy (v^x ∂_x + v^y ∂_y + v^z ∂_z) ∧ ∂_x & + b \; dz (v^x ∂_x + v^y ∂_y + v^z ∂_z) ∧ ∂_x \\ + c \; dx (v^x ∂_x + v^y ∂_y + v^z ∂_z) ∧ ∂_y & & - a \; dz (v^x ∂_x + v^y ∂_y + v^z ∂_z) ∧ ∂_y \\ - b \; dx (v^x ∂_x + v^y ∂_y + v^z ∂_z) ∧ ∂_z & + a \; dy (v^x ∂_x + v^y ∂_y + v^z ∂_z) ∧ ∂_z & \\ \end{bmatrix}\end{split}\]

Apply the differential to the partial derivatives \(dx^i ∂_j = δ^i_j\):

\[\begin{split}R^{♭♯} v^♯ = \frac{1}{2} \begin{bmatrix} & - c \; v^y ∂_x & + b \; v^z ∂_x \\ + c \; v^x ∂_y & & - a \; v^z ∂_y \\ - b \; v^x ∂_z & + a \; v^y ∂_z & \\ \end{bmatrix}\end{split}\]

Reorder into a column vector:

\[\begin{split}R^{♭♯} v^♯ = \frac{1}{2} \begin{bmatrix} (- c \; v^y + b \; v^z) ∂_x \\ (+ c \; v^x - a \; v^z) ∂_y \\ (- b \; v^x + a \; v^y) ∂_z \\ \end{bmatrix}\end{split}\]

Indeed, we arrive at the result we would have obtained using matrix multiplication rules. This clarifies and justifies matrix multiplication rules, as well as provide a way to organize tensors of any rank into matrices in order to facilitate practical calculations. This comes at the cost of having to explicitely write the basis, which arguably improves on readability and is more explicit. We could have written a covector in the same explicit manner. This notation is very convenient when performing calculations in the Cartan-Hodge formalism as it permits to identify and organize terms for practical calculations, and if needed fall back to regular matrix multiplication.