Matrices and linear maps

Example (rotation matrix) open_in_new

To rotate a vector by $\theta$ about axis $\hat n$, the matrix is $$ R_{ij} = \delta_{ij}\cos\theta + (1-\cos\theta)n_in_j - \epsilon_{ijk}n_k\sin\theta. $$

Derivation

Example (reflection and projection onto plane) open_in_new

To reflect a point in $\R^3$ about a plane normal to $\hat n$ through the origin, the matrix is $$ R_{ij} = \delta_{ij} - 2n_in_j. $$

To project it onto the plane, the matrix is $$ R_{ij} = \delta_{ij} - n_in_j. $$

Derivation

Definition (linear map) open_in_new

Let $V,W$ be vector spaces. $T: V\to W$ is a linear map if

  • $T(\v a + \v b) = T(\v a) + T(\v b)$ for all $\v a,\v b\in V$; and

  • $T(\lambda\v a) = \lambda T(\v a)$ for all scalar $\lambda$ and $\v a\in V$.

Or equivalently, for all scalars $\lambda,\mu$ and vectors $\v a,\v b\in V$, $$ T(\lambda\v a + \mu\v b) = \lambda T(\v a) + \mu T(\v b). $$

Definition (image and kernel of linear map) open_in_new

Consider a linear map $f: U\to V$.

  • The image of $f$, denoted as $f(U)$ or $\mrm{image}(f)$, is the set $$ \sb{f(\v u)}{\v u\in U}. $$

  • The kernel of $f$, denoted as $\mrm{kernel}(f)$, is the set $$ \sb{\v u\in U}{f(\v u) = \v 0}. $$

Example of computing image and kernel

Theorem (image and kernel are subspaces) open_in_new

Consider the linear map $f: U\to V$ where $U, V$ are vector spaces.

  • $\mrm{image}(f)$ is a subspace of $V$.

  • $\mrm{kernel}(f)$ is a subspace of $U$.

Proof

Definition (rank, nullity) open_in_new

For a linear map $f: U\to V$,

  • the rank of $f$, denoted as $r(f)$, is the dimension of $f(U)$; and

  • the nullity of $f$, denoted as $n(f)$, is the dimension of $\mrm{kernel}(f)$.

Theorem (rank-nullity) open_in_new

For a linear map of $f: U\to V$ where $U,V$ are vector spaces, $$ r(f) + n(f) = \dim U. $$

Proof

Definition (associated matrix of a linear map) open_in_new

Consider a linear map $\alpha: \R^n \to \R^m$. For a basis $\v e_1, \ldots, \v e_n$ of $\R^n$, we have $$\begin{align*} \v x' = \alpha(\v x) &= \alpha\Big(\sum_{j=1}^n x_j \v e_j\Big) &&\text{for some scalars } x_j\in\R \\ &= \sum_{j=1}^n x_j \alpha(\v e_j). \end{align*}$$ In suffix notation, $$ A_{ij} x_j = x'_i = \big[\alpha(\v e_j)\big]_i x_j $$ so let $$ A_{ij} = \big[\alpha(\v e_j)\big]_i. $$

We write the $m\times n$ matrix with $A_{ij}$ being the entry at row $i$ and column $j$: $$ A = \{ A_{ij} \} = \begin{pmatrix} A_{11} & \ldots & A_{1n} \\ \vdots & A_{ij} & \vdots \\ A_{m1} & \ldots & A_{mn} \end{pmatrix} $$ and we write $$ \v x' = A \v x. $$

Note that the $j$-th column represents what $\alpha$ maps $\v e_j$ to.

Matrix algebra open_in_new

Matrix addition open_in_new

Consider two linear maps $\alpha,\beta: \R^n\to \R^m$. Define the sum of linear maps as $(\alpha+\beta)(\vec x) = \alpha(\vec x) + \beta(\vec x)$. The associated matrices satisfy $$ (A+B)_{ij} x_j = A_{ij} x_j + B_{ij} x_j $$ so we define matrix addition as just adding it entry by entry: $$ (A+B)_{ij} = A_{ij} + B_{ij}. $$

Matrix scalar multiplication open_in_new

We define the scalar multiplication of a linear map as $$ (\lambda\alpha)(\vec x) = \lambda\cdot\alpha(\vec x). $$ Therefore $$ (\lambda A)_{ij} = \lambda A_{ij}. $$

Matrix multiplication open_in_new

Consider $\alpha: \R^r \to \R^n$ and $\beta: \R^n\to\R^m$. $A$ is the associated $n\times r$ matrix and $B$ is the associated $m\times n$ matrix.

We consider the composition map $\beta\alpha: \R^r\to\R^m$. $$\begin{align*} (BA)_{ij} x_j &= \big(B(A\vec x)\big)_i \\ &= B_{ik}(A\vec x)_k \\ &= B_{ik}A_{kj}x_j \end{align*}$$ so we let $$ (BA)_{ij} = B_{ik}A_{kj}. $$

Properties:

  • In general, $AB\neq BA$.

  • Associativity: $(AB)C = A(BC)$. Proof

Matrix transpose open_in_new

Let $A$ be a $m\times n$ matrix. The transpose of $A$, denoted as $A^T$, is a $n\times m$ matrix defined by $$ (A^T)_{ij} = A_{ji}. $$

Properties:

  • $(A^T)^T = A$.

  • $(AB)^T = B^T A^T$. Proof

Matrix inverse open_in_new
  • $B$ is the left inverse of $A$ if $BA = I$.

  • $C$ is the right inverse of $A$ if $AC = I$.

  • If $A$ is a square matrix, then $A^{-1}\equiv B=C$ is the inverse of $A$. Proof This means inverse $A\inv$ satisfies $$ A\inv A = AA \inv = I. $$

  • If $A\inv$ exists, then $A$ is called invertible.

  • $(AB)\inv = B\inv A\inv$. Proof

Hermitian conjugate open_in_new

For a complex matrix $A$, $$ A^\dagger \equiv (A^T)^* \equiv (A^*)^T. $$

Properties:

  • $(AB)^\dagger = B^\dagger A^\dagger$.

Common type of matrices open_in_new

Definition (symmetric matrix) open_in_new

A square matrix $A$ is symmetric if $$ A^T = A. $$

Definition (Hermitian matrix) open_in_new

A square matrix $A$ is Hermitian if $$ A^\dagger = A. $$

The diagonal elements are necessarily real.

A real symmetric matrix is Hermitian.

Definition (anti-symmetric matrix) open_in_new

A square matrix is anti-symmetric if $$ A^T = -A. $$ The diagonal elements are necessarily 0.

Definition (skew-Hermitian matrix) open_in_new

A square matrix is skew-Hermitian $A$ if $$ A^\dagger = -A. $$

The diagonal elements are necessarily purely imaginary.

A real anti-symmetric matrix is a skew-Hermitian matrix.

Definition (orthogonal and unitary matrix) open_in_new

A real matrix $A$ is orthogonal if $$ A^T = A\inv \quad\text{i.e. } AA^T = A^T A = I. $$

A complex matrix $U$ is unitary if $$ U^\dagger = U\inv \quad\text{i.e. } UU^\dagger = U^\dagger U = I. $$

Definition (normal matrix) open_in_new

An $n\times n$ matrix $N$ is called normal if it commutes with its Hermitian conjugate $$ NN^\dagger = N^\dagger N. $$

Hermitian, symmetric, skew-Hermitian, anti-symmetric, orthogonal, unitary matrices are all normal.

Trace of a square matrix open_in_new

For a matrix $A$, the trace of $A$, denoted as $\mrm{trace}(A)$, is the sum of the diagonal elements of $A$, $$ \mrm{trace}(A) = A_{ii}. $$

Properties:

  • $\mrm{trace}(BC) = \mrm{trace}(CB)$. Proof

Definition (isotropic matrix) open_in_new

A matrix $A$ is isotropic if $$ A = \lambda I $$ for some scalar $\lambda$.

Decomposition of a square matrix open_in_new

Any $n\times n$ matrix $B$ can be written as a sum of symmetric and anti-symmetric parts, $$\begin{align*} B_{ij} &= \frac12 (B_{ij} + B_{ji}) + \frac12 (B_{ij} - B_{ji}) \\ B &= \underbrace{\frac12 (B + B^T)}_{\text{symmetric } S} + \underbrace{\frac12 (B - B^T)}_{\text{anti-symmetric } A} \end{align*}$$

A symmetric matrix $S$ can be decomposed an isotropic part and a traceless part, $$\begin{align*} S_{ij} &= \frac1n \mrm{trace}(S)\, \delta_{ij} + \big(S_{ij} - \frac1n \mrm{trace}(S)\, \delta_{ij} \big) \\ S &= \underbrace{\frac1n \mrm{trace}(S)\, I}_\text{isotropic} + \underbrace{\big(S - \frac1n\mrm{trace}(S)\, I\big)}_{\text{traceless, since } \mrm{trace}(\frac1n I) = 1} \end{align*}$$

In $\R^3$, the anti-symmetric part $A$ can be written in terms of a single vector $\vec w$ as $$ A_{ijk} = \epsilon_{ijk}\omega_k = \begin{pmatrix} 0 & \omega_3 & -\omega_2 \\ -\omega_3 & 0 & \omega_1 \\ \omega_2 & -\omega_1 & 0 \end{pmatrix} $$ which is a general anti-symmetric matrix.

Proposition (rows and columns of orthogonal and unitary matrix are orthonormal) open_in_new

For an orthogonal matrix $A$, the rows of $A$ form an orthonormal set. Similarly the columns of $A$ also form an orthonormal set. Same for a unitary matrix.

Proof

Gram-Schmidt process open_in_new

Given a set $\set{\v w_1, \v w_2, \ldots, \v w_r}$ of linearly independent vectors, we can use this process to form a orthonormal set $\set{\v v_1, \v v_2, \ldots, \v w_r}$ that has the same span.

Define the projection of $\v w$ onto $\v v$ by $$ \mathcal P_{\v v}(\v w) = \frac{\langle\v v|\v w\rangle}{\langle\v v|\v v\rangle}\v v.$$

  • Step 1: let $\v v_1 = \v w_1 / \sqrt{\langle\v w_1|\v w_1\rangle}$.

  • Step $k$: let $$\v u_k = \v w_k - \sum_{i=1}^{k-1} \mathcal P_{\v v_i}(\v w_k), $$ which gives an orthogonal vector. Then normalise it by $$ \v v_k = \frac{\v u_k}{\sqrt{\langle\v u_k|\v u_k\rangle}}. $$ (Explanation)

Determinant open_in_new

Motivation for determinant open_in_new

For a linear map $\alpha: \R^3 \to \R^3$ and standard basis $\vec e_1,\vec e_2,\vec e_3\mapsto \vec e_1', \vec e_2', \vec e_3'$, the determinant is defined to be the volume of the parallelepiped formed by $\vec e_1', \vec e_2', \vec e_3'$, $$\begin{align*} \det A &\equiv [\vec e_1', \vec e_2', \vec e_3'] \\ &= \epsilon_{ijk} (\vec e_1')_i (\vec e_2')_j (\vec e_3')_k \\ &= \epsilon_{ijk} \big(A_{il} (\vec e_1)_l\big) \big(A_{jm} (\vec e_2)_m\big) \big(A_{kn} (\vec e_3)_n\big) \\ &= \epsilon_{ijk} A_{il} \delta_{l1} A_{jm} \delta_{m2} A_{kn} \delta_{n3} \\ &= \epsilon_{ijk} A_{i1} A_{j2} A_{k3}. \end{align*}$$

See permutations in Groups for detailed discussion.

Definition (generalisation of Levi-Cevita symbol) open_in_new

Define $$ \epsilon_{j_1j_2\ldots j_n} = \begin{cases} +1 & \text{if }(j_1,j_2,\ldots,j_n)\text{ is an even permutation}, \\ -1 & \text{if }(j_1,j_2,\ldots,j_n)\text{ is an odd permutation}, \\ 0 & \text{otherwise.} \end{cases} $$

Definition (determinant) open_in_new

For an $n\times n$ matrix $A$, define its determinant $$ \det A = \sum_{\sigma\in S_n} \epsilon(\sigma) A_{\sigma(1) 1} A_{\sigma(2) 2} \ldots A_{\sigma(n) n}. $$

Alternatively, in suffix notation, $$ \det A = \epsilon_{j_1j_2\ldots j_n} A_{j_1 1} A_{j_2 2} \ldots A_{j_n n} $$ or equivalently, $$ \det A = \frac{1}{n!}\epsilon_{i_1i_2\ldots i_n}\epsilon_{j_1j_2\ldots j_n} A_{i_1 j_1} A_{i_2 j_2} \ldots A_{i_n j_n} $$

Properties of determinant open_in_new

Matrices mentioned here are of size $n\times n$.

Proposition (transpose has the same determinant) open_in_new

$$\det A = \det A^T.$$

Proof

Proposition (determinant when multiplying a row or column by scalar) open_in_new

If matrix $B$ is formed by multiplying every entry in a single row or column of $A$ by scalar $\lambda$, then $$\det B = \lambda \det A.$$

More formal description and proof

Proposition (determinant of scalar multiple) open_in_new

$$ \det \lambda A = \lambda^n \det A. $$

Proof

Proposition (determinant when two rows or columns equal) open_in_new

If two rows or columns of $A$ are identical, then $\det A = 0$.

Proof

Proposition (determinant when adding multiple of rows or columns onto another) open_in_new

If a matrix $B$ is formed by adding a scalar multiple $\lambda$ of a column (or row) of $A$ onto another column (or row), then $\det B = \det A$.

More formal description and proof

Proposition (determinant when two rows or columns are linearly dependent) open_in_new

If two rows or columns of $A$ are linearly dependent, then $\det A = 0$.

Proof

Proposition (determinant of products) open_in_new

$$ \det AB = \det A \det B. $$

Proof

Proposition (determinant of orthogonal and unitary matrix) open_in_new
  • If $A$ is orthogonal, then $\det A = \pm 1$ (Proof). In particular, in $\R^3$, $A$ represents a rotation ($\det A = 1$) or a reflection ($\det A = -1$).

  • If $U$ is unitary, then $|\det U| = 1$ (Proof).

Minors and cofactors open_in_new

Definition (minors, cofactors) open_in_new

For an $n\times n$ matrix $A$, define $A^{ij}$ be the $(n-1)\times(n-1)$ matrix in which row $i$ and column $j$ of $A$ are removed, $$ A^{ij} = \pmat{ A_{11} & \ldots & A_{1(j-1)} & A_{1(j+1)} & \ldots & A_{1n} \\ \vdots & & \vdots & \vdots & & \vdots \\ A_{(i-1)1} & \ldots & A_{(i-1)(j-1)} & A_{(i-1)(j+1)} & \ldots & A_{(i-1)n} \\ A_{(i+1)1} & \ldots & A_{(i+1)(j-1)} & A_{(i+1)(j+1)} & \ldots & A_{(i+1)n} \\ \vdots & & \vdots & \vdots & & \vdots \\ A_{n1} & \ldots & A_{n(j-1)} & A_{n(j+1)} & \ldots & A_{nn} \\ }.$$

  • The minor of the $ij$-th element of $A$ is defined as $$ M_{ij} = \det A^{ij}. $$

  • The cofactor of the $ij$-th element of $A$ is defined as $$ \Delta_{ij} = (-1)^{i-j} M_{ij}. $$

Proposition (Laplace expansion) open_in_new

For any $I=1,2,\ldots n$ of an $n\times n$ matrix $A$, the determinant of $A$ can be expanded along column $I$ as $$ \det A = \sum_{J_I=1}^n A_{J_I I} \Delta_{J_I I} $$ or along row $I$ as $$ \det A = \sum_{J_I=1}^n A_{IJ_I} \Delta_{IJ_I}. $$

Proof (Laplace expansion)

Proposition (expanding wrongly gives zero determinant) open_in_new

For an $n\times n$ matrix $A$ and row indices $i\neq I$, $$ \sum_{k=1}^n A_{ik} \Delta_{Ik} = 0. $$ Similarly for column indices $j\neq J$, $$ \sum_{k=1}^n A_{kj} \Delta_{kJ} = 0. $$

Proof (expanding wrongly gives zero determinant)