Chapter 3

Linear Algebra

3.1Linear Equations

Many problems in physics, engineering, and applied mathematics reduce to solving systems of linear equations: examples include Kirchhoff’s circuit laws, equilibrium conditions in mechanics, and eigenvalue problems in quantum mechanics.

Definition - Linear Equation

A linear equation in the variables \(x_1, x_2, \dots, x_n\) is an equation of the form

\begin{equation} a_1 x_1 + a_2 x_2 + \cdots + a_n x_n = b, \qquad a_i, b \in \mathbb{R}. \end{equation}

Each variable appears only to the first power: no products such as \(x_i x_j\), and no nonlinear operations such as \(x_i^2\), \(\sqrt{x_i}\), \(\sin(x_i)\), etc.

Example

Classify, as in the notes:

\begin{equation} \begin{aligned} &2x_1+3x_2=6 \quad\text{Linear }\checkmark, \qquad x_1^2+x_2=5 \quad\text{Nonlinear }\times,\\ &2x_1+2x_2+5x_3=1 \quad\text{Linear }\checkmark, \qquad x_2^2+x_2-x_3=5 \quad\text{Nonlinear }\times. \end{aligned} \end{equation}

3.2System of Linear Equations

For two variables, each linear equation is a line. The solution(s) of a system are the intersection point(s) of those lines.

Example - A system with a unique solution

Solve

\begin{equation} \begin{cases} x_1+x_2=5\\ x_1-x_2=1 \end{cases} \end{equation}

Solution.

Adding the two equations eliminates \(x_2\) and gives \(2x_1 = 6\), so \(x_1 = 3\); substituting back gives \(x_2 = 2\). Hence

\begin{equation} (x_1,x_2)=(3,2). \end{equation}

Geometrically each equation is a line, and the pair meets at a single point — the case of a unique solution.

Two lines meeting at a single point: the unique solution (x1,x2)=(3,2).
Figure 3.1. Two lines meeting at a single point: the unique solution \((x_1,x_2)=(3,2)\).

3.2.1Matrix Form, and Augmented Matrix

A system of linear equations

\begin{equation} \sum_{j=1}^n M_{ij}x_j=b_i,\qquad i=1,\dots,m \end{equation}

can be written as \(M\vec x=\vec b\), with coefficient matrix \(M=[M_{ij}]\), unknown vector \(\vec x\), and right-hand side \(\vec b\). The augmented matrix is \(A=[M\,|\,b]\).

3.2.2Elementary Row Operations

  1. Interchange two rows.

  2. Multiply (or divide) a row by a nonzero constant.

  3. Add a multiple of one row to another.

These do not change the solution set. That is the whole justification for row reduction: each operation is reversible, so the system you end up with has exactly the same solutions as the one you started with, while being far easier to read them off from.

3.2.3Row Echelon Form (REF) and Reduced Row Echelon Form (RREF)

Definition - Row Echelon Form (REF)

A matrix is in row echelon form if:

  1. all nonzero rows appear above any rows consisting entirely of zeros;

  2. in each nonzero row, the first nonzero entry (called the leading entry or pivot) is to the right of the leading entry in the row above;

  3. all entries below each leading entry are zero.

Important: In REF, pivots do not need to be \(1\).

\begin{equation} \begin{bmatrix} 2 & 3 & 1 & 1 \\ 0 & 1 & -4 & 1 \\ 0 & 0 & 5 & 1 \\ 0 & 0 & 0 & 0 \end{bmatrix} \qquad\Rightarrow\quad \checkmark\ \text{REF} \ (\text{pivots are not required to be } 1) \end{equation}
Definition - Reduced Row Echelon Form (RREF)

A matrix is in reduced row echelon form if:

  1. it is already in REF;

  2. each leading entry is \(1\);

  3. each leading \(1\) is the only nonzero entry in its column (including all entries above the pivot must be zero).

Examples of RREF:

\begin{equation} \begin{bmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{bmatrix}, \qquad \begin{bmatrix} 1 & 2 & 0 \\ 0 & 0 & 1 \end{bmatrix} \end{equation}

Not RREF — Why?

\begin{equation} \begin{bmatrix} 1 & 0 & 3 \\ 0 & 1 & -2 \\ 0 & 0 & 1 \end{bmatrix} \end{equation}

Pivot in column 3 has nonzero entries above it, violating (iii).

Remark - Rank

of a matrix equals the number of pivots (nonzero rows) in its RREF.

3.3Gauss–Jordan Reduction

Example - I (Unique solution)

System:

\begin{equation} \begin{cases} x_1+x_2=5\\ x_1-x_2=1 \end{cases} \qquad A= \begin{bmatrix} 1&1&|&5\\ 1&-1&|&1 \end{bmatrix}. \end{equation}
\begin{equation} \overset{\boxed{1}\;R_2\leftarrow R_2-R_1}{\Longrightarrow} \begin{bmatrix} 1&1&|&5\\ 0&-2&|&-4 \end{bmatrix} \overset{\boxed{2}\;R_2\leftarrow(-\tfrac12)R_2}{\Longrightarrow} \begin{bmatrix} 1&1&|&5\\ 0&1&|&2 \end{bmatrix} \overset{\boxed{3}\;R_1\leftarrow R_1-R_2}{\Longrightarrow} \begin{bmatrix} 1&0&|&3\\ 0&1&|&2 \end{bmatrix}. \end{equation}
\begin{equation} \boxed{x_1=3,\quad x_2=2} \end{equation}

This is RREF; \(\mathrm{rank}(M)=\mathrm{rank}(A)=2=n\Rightarrow\) unique solution.

Example - II (Infinitely many solutions)
\begin{equation} \begin{cases} x_1+x_2=2\\ 2x_1+2x_2=4 \end{cases} \qquad \begin{bmatrix} 1&1&|&2\\ 2&2&|&4 \end{bmatrix} \overset{\boxed{1}\;R_2\leftarrow R_2-2R_1}{\Longrightarrow} \begin{bmatrix} 1&1&|&2\\ 0&0&|&0 \end{bmatrix}. \end{equation}

\(\mathrm{rank}(M)=\mathrm{rank}(A)=1<2 \Rightarrow\) infinitely many solutions. Let \(x_2=t\). Then

\begin{equation} \boxed{(x_1,x_2)=(2-t,t),\ t\in\mathbb{R}}. \end{equation}
Example - III (Inconsistent)
\begin{equation} \begin{cases} x-y+4z=5\\ 2x-3y+8z=4\\ x-2y+4z=9 \end{cases} \qquad A= \begin{bmatrix} 1&-1&4&|&5\\ 2&-3&8&|&4\\ 1&-2&4&|&9 \end{bmatrix}. \end{equation}
\begin{equation} \overset{\boxed{1}\;R_2\leftarrow R_2-2R_1,\;\;R_3\leftarrow R_3-R_1}{\Longrightarrow} \begin{bmatrix} 1&-1&4&|&5\\ 0&-1&0&|&-6\\ 0&-1&0&|&4 \end{bmatrix} \overset{\boxed{2}\;R_3\leftarrow R_3-R_2}{\Longrightarrow} \begin{bmatrix} 1&-1&4&|&5\\ 0&-1&0&|&-6\\ 0&0&0&|&10 \end{bmatrix}. \end{equation}

Last row \(0=10\) is a contradiction. Hence

\begin{equation} \boxed{\mathrm{rank}(M)=2,\ \mathrm{rank}(A)=3\Rightarrow\text{ no solution (inconsistent).}} \end{equation}
Example - IV (Unique solution)
\begin{equation} \left[ \begin{array}{ccc|c} 2&0&-1&2\\ 6&5&3&7\\ 2&-1&0&4 \end{array} \right] \overset{\boxed{1}\;R_2\leftarrow R_2-3R_1,\;\;R_3\leftarrow R_3-R_1}{\Longrightarrow} \left[ \begin{array}{ccc|c} 2&0&-1&2\\ 0&5&6&1\\ 0&-1&1&2 \end{array} \right] \end{equation}
\begin{equation} \overset{\boxed{2}\;\text{swap }R_2\leftrightarrow R_3}{\Longrightarrow} \left[ \begin{array}{ccc|c} 2&0&-1&2\\ 0&-1&1&2\\ 0&5&6&1 \end{array} \right] \overset{\boxed{3}\;R_2\leftarrow(-1)R_2}{\Longrightarrow} \left[ \begin{array}{ccc|c} 2&0&-1&2\\ 0&1&-1&-2\\ 0&5&6&1 \end{array} \right] \end{equation}
\begin{equation} \overset{\boxed{4}\;R_3\leftarrow R_3-5R_2}{\Longrightarrow} \left[ \begin{array}{ccc|c} 2&0&-1&2\\ 0&1&-1&-2\\ 0&0&11&11 \end{array} \right] \overset{\boxed{5}\;R_3\leftarrow \tfrac1{11}R_3}{\Longrightarrow} \left[ \begin{array}{ccc|c} 2&0&-1&2\\ 0&1&-1&-2\\ 0&0&1&1 \end{array} \right] \end{equation}
\begin{equation} \overset{\boxed{6}\;R_2\leftarrow R_2+R_3}{\Longrightarrow} \left[ \begin{array}{ccc|c} 2&0&-1&2\\ 0&1&0&-1\\ 0&0&1&1 \end{array} \right] \overset{\boxed{7}\;R_1\leftarrow R_1+R_3}{\Longrightarrow} \left[ \begin{array}{ccc|c} 2&0&0&3\\ 0&1&0&-1\\ 0&0&1&1 \end{array} \right] \overset{\boxed{8}\;R_1\leftarrow \tfrac12 R_1}{\Longrightarrow} \left[ \begin{array}{ccc|c} 1&0&0&\tfrac{3}{2}\\ 0&1&0&-1\\ 0&0&1&1 \end{array} \right]. \end{equation}
\begin{equation} \boxed{x=\tfrac{3}{2},\quad y=-1,\quad z=1}\qquad (\mathrm{rank}(M)=\mathrm{rank}(A)=3=n\Rightarrow\text{unique solution}). \end{equation}
Definition - Rank Conditions for Solutions of Linear Systems

Let \(n\) be the number of unknowns, \(M\) the coefficient matrix, and \(A\) the augmented matrix of a linear system.

  • If \(\mathrm{rank}(M) = \mathrm{rank}(A) = n\): Unique solution

  • If \(\mathrm{rank}(M) = \mathrm{rank}(A) < n\): Infinitely many solutions (\(\Rightarrow\) at least one free variable)

  • If \(\mathrm{rank}(M) < \mathrm{rank}(A)\): No solution (inconsistent system)

Example

Your three quick cases:

\begin{equation} \begin{array}{ll} \text{(a)}& x+y=2,\;\ x+y=5\quad\Rightarrow\ \text{no solution (parallel).}\\[2pt] \text{(b)}& x+y=2,\;\ 2x+2y=4\quad\Rightarrow\ \text{infinitely many.}\\[2pt] \text{(c)}& x+y=2,\;\ x-y=4\quad\Rightarrow\ (x,y)=(3,-1)\ \text{(unique).} \end{array} \end{equation}

(a) Parallel lines \(\Rightarrow\) No solution

Two distinct lines with the same slope never intersect.

Parallel lines showing an inconsistent system: no intersection.
Figure 3.2. Parallel lines showing an inconsistent system: no intersection.

(b) Same line \(\Rightarrow\) Infinitely many solutions

The equations represent the same geometric line.

Coincident lines showing infinitely many solutions.
Figure 3.3. Coincident lines showing infinitely many solutions.

(c) Intersecting lines \(\Rightarrow\) Unique solution

The lines meet at exactly one point.

Intersecting lines showing a unique solution at (3,-1).
Figure 3.4. Intersecting lines showing a unique solution at \((3,-1)\).

3.4Determinants

Determinants provide a compact way of associating a scalar quantity with a square matrix. They are especially useful for testing invertibility and for solving systems of linear equations.

Definition - Determinant of a \(2\times2\) Matrix

For

\begin{equation} M = \begin{bmatrix} m_{11} & m_{12} \\ m_{21} & m_{22} \end{bmatrix}, \end{equation}
\begin{equation} \boxed{\det(M) = m_{11}m_{22} - m_{12}m_{21}}. \end{equation}
Definition - Determinant of a \(3\times3\) Matrix
\begin{equation} \det(M) = m_{11}\begin{vmatrix}m_{22}&m_{23}\\ m_{32}&m_{33}\end{vmatrix} - m_{12}\begin{vmatrix}m_{21}&m_{23}\\ m_{31}&m_{33}\end{vmatrix} + m_{13}\begin{vmatrix}m_{21}&m_{22}\\ m_{31}&m_{32}\end{vmatrix}. \end{equation}

General Definition: Cofactor Expansion

Let \(M=[m_{ij}]\) be \(n\times n\). Removing row \(i\) and column \(j\) gives the submatrix \(M^{(ij)}\).

Definition - Cofactor
\begin{equation} \boxed{C_{ij} = (-1)^{i+j}\,\det\!\big(M^{(ij)}\big)}. \end{equation}
Definition - Cofactor Expansion

Expanding along row \(1\):

\begin{equation} \boxed{ \det(M) = \sum_{j=1}^n m_{1j}\,C_{1j} = \sum_{j=1}^n (-1)^{1+j} m_{1j}\,\det(M^{(1j)}) }. \end{equation}

Properties of Determinants

Remark
  • Two identical rows/columns \(\Longrightarrow\) \(\det(M)=0\).

  • Swap two rows \(\Longrightarrow\) determinant changes sign.

  • Multiply a row by \(k\) \(\Longrightarrow\) determinant multiplied by \(k\).

  • Add a multiple of one row to another \(\Longrightarrow\) determinant unchanged.

  • Triangular matrix \(\Longrightarrow\) determinant \(=\) product of diagonal entries.

  • \(\boxed{M \text{ is invertible } \iff \det(M)\neq0}\).

Example

Compute the determinant:

\begin{equation} M = \begin{bmatrix} 1 & 2 & 3 \\ 0 & -1 & 4 \\ 2 & 0 & 1 \end{bmatrix}. \end{equation}

Expand along the first row:

\begin{equation} \det(M) = 1 \cdot \det\begin{bmatrix}-1 & 4 \\ 0 & 1\end{bmatrix} - 2 \cdot \det\begin{bmatrix}0 & 4 \\ 2 & 1\end{bmatrix} + 3 \cdot \det\begin{bmatrix}0 & -1 \\ 2 & 0\end{bmatrix}. \end{equation}

Compute each minor:

\begin{equation} = 1((-1)(1) - (4)(0)) - 2((0)(1) - (4)(2)) + 3((0)(0) - (-1)(2)). \end{equation}
\begin{equation} = (-1) - 2(-8) + 3(2) = -1 + 16 + 6 = 21. \end{equation}

3.5Cramer's Rule

Theorem - Cramer's Rule

Let \(M\) be an \(n \times n\) invertible matrix with \(\det(M) \neq 0\). Consider the linear system

\begin{equation} M\vec{x} = \vec{b}, \qquad \vec{x} = \begin{bmatrix} x_1 \\ x_2 \\ \vdots \\ x_n \end{bmatrix}, \quad \vec{b} = \begin{bmatrix} b_1 \\ b_2 \\ \vdots \\ b_n \end{bmatrix}. \end{equation}

Let \(M_i\) be the matrix obtained by replacing the \(i\)-th column of \(M\) with \(\vec{b}\). Then each component of the unique solution is

\begin{equation} \boxed{\,x_i = \frac{\det(M_i)}{\det(M)}, \quad i=1,2,\dots,n.} \end{equation}
Remark

Cramer's Rule is theoretically important, but computationally expensive for large systems. Practical numerical methods use row reduction instead of determinants.

Example

Solve the system using Cramer’s Rule:

\begin{equation} \begin{aligned} x + 2y &= 5, \\ 3x - y &= 4. \end{aligned} \end{equation}

Coefficient matrix:

\begin{equation} M = \begin{bmatrix} 1 & 2 \\ 3 & -1 \end{bmatrix}, \quad \vec{b} = \begin{bmatrix} 5 \\ 4 \end{bmatrix}. \end{equation}
\begin{equation} \det(M) = (1)(-1) - (2)(3) = -1 - 6 = -7. \end{equation}

Replace columns:

\begin{equation} M_1 = \begin{bmatrix} 5 & 2 \\ 4 & -1 \end{bmatrix}, \quad M_2 = \begin{bmatrix} 1 & 5 \\ 3 & 4 \end{bmatrix}. \end{equation}
\begin{equation} \det(M_1) = (5)(-1) - (2)(4) = -5 - 8 = -13, \quad \det(M_2) = (1)(4) - (5)(3) = 4 - 15 = -11. \end{equation}

Thus:

\begin{equation} x = \frac{\det(M_1)}{\det(M)} = \frac{-13}{-7} = \tfrac{13}{7}, \quad y = \frac{\det(M_2)}{\det(M)} = \frac{-11}{-7} = \tfrac{11}{7}. \end{equation}

3.6Vectors

Definition and Notation

A vector is a mathematical object that has both magnitude and direction. In physics, vectors naturally describe quantities that not only have a size but also point in a specific direction. Examples include displacement, velocity, acceleration, force, momentum, and electric or magnetic fields.

Vector in 3D Space

For \(n=3\), the general definition becomes

\begin{equation} \vec{a} = a_1 \hat{e}_1 + a_2 \hat{e}_2 + a_3 \hat{e}_3. \end{equation}

In standard Cartesian coordinates we identify

\begin{equation} \hat{e}_1 = \hat{i}, \qquad \hat{e}_2 = \hat{j}, \qquad \hat{e}_3 = \hat{k}, \end{equation}

so that in three-dimensional space, a vector is written in component form as

\begin{equation} \vec{a} = a_x \hat{i} + a_y \hat{j} + a_z \hat{k}, \end{equation}

where \(\hat{i}, \hat{j}, \hat{k}\) are unit vectors along the \(x,y,z\) axes, and \(a_x,a_y,a_z\) are the components.

Magnitude of a Vector

A vector in two-dimensional space. Any vector a in the plane can be written as a = ax i + ay j, where i and j are unit vectors along the x- and y-axes, and ax, ay are the components.
Figure 3.5. A vector in two-dimensional space. Any vector \(\vec{a}\) in the plane can be written as \(\vec{a} = a_x \hat{i} + a_y \hat{j}\), where \(\hat{i}\) and \(\hat{j}\) are unit vectors along the \(x\)- and \(y\)-axes, and \(a_x, a_y\) are the components.

The magnitude (length) of \(\vec{a}\) is

\begin{equation} a = \sqrt{a_x^2 + a_y^2 + a_z^2}. \end{equation}

If \(a=1\), then \(\vec{a}\) is a unit vector. Any nonzero vector can be turned into a unit vector by dividing by its length:

\begin{equation} \hat{a} = \frac{\vec{a}}{a}. \end{equation}

Multiplying a Vector by a Scalar

If \(\alpha\) is a real number (scalar), then

\begin{equation} \alpha \vec{a} = (\alpha a_x)\hat{i} + (\alpha a_y)\hat{j} + (\alpha a_z)\hat{k}. \end{equation}

- If \(\alpha>1\), the vector is stretched. - If \(0<\alpha<1\), it is shrunk. - If \(\alpha<0\), the direction is reversed.

Addition and Subtraction

For two vectors

\begin{equation} \vec{a} = a_x \hat{i} + a_y \hat{j} + a_z \hat{k}, \qquad \vec{b} = b_x \hat{i} + b_y \hat{j} + b_z \hat{k}, \end{equation}

we define

\begin{equation} \vec{a} + \vec{b} = (a_x+b_x)\hat{i} + (a_y+b_y)\hat{j} + (a_z+b_z)\hat{k}, \end{equation}
\begin{equation} \vec{a} - \vec{b}= \vec{a} + (-\vec{b}) = (a_x-b_x)\hat{i} + (a_y-b_y)\hat{j} + (a_z-b_z)\hat{k}. \end{equation}

Geometrically, vector addition corresponds to placing the tail of \(\vec{b}\) at the head of \(\vec{a}\) (the parallelogram rule). Subtraction corresponds to adding \(\vec{a}+(-\vec{b})\).

Adding more than two vectors: If we have \(\vec{a}, \vec{b}, \vec{c}, \dots\), then

\begin{equation} \vec{a} + \vec{b} + \vec{c} + \cdots = (a_x+b_x+c_x+\cdots)\hat{i} + (a_y+b_y+c_y+\cdots)\hat{j} + (a_z+b_z+c_z+\cdots)\hat{k}. \end{equation}

In words: to add several vectors, add their components along each axis separately.

Geometric picture:

Dot Product (Scalar Product)

The dot product of \(\vec{a}\) and \(\vec{b}\) is defined by

\begin{equation} \vec{a}\cdot\vec{b} = ab \cos\theta, \end{equation}

where \(\theta\) is the angle between \(\vec{a}\) and \(\vec{b}\).

Component Formula

Write the vectors in components:

\begin{equation} \vec{a} = a_x \hat{i} + a_y \hat{j} + a_z \hat{k}, \qquad \vec{b} = b_x \hat{i} + b_y \hat{j} + b_z \hat{k}. \end{equation}

Now compute their dot product using distributivity:

\begin{equation} \vec{a}\cdot\vec{b} = (a_x \hat{i} + a_y \hat{j} + a_z \hat{k}) \cdot (b_x \hat{i} + b_y \hat{j} + b_z \hat{k}). \end{equation}

Expanding term by term:

\begin{equation} = a_x b_x (\hat{i}\cdot\hat{i}) + a_x b_y (\hat{i}\cdot\hat{j}) + a_x b_z (\hat{i}\cdot\hat{k}) \end{equation}
\begin{equation} \quad + a_y b_x (\hat{j}\cdot\hat{i}) + a_y b_y (\hat{j}\cdot\hat{j}) + a_y b_z (\hat{j}\cdot\hat{k}) \end{equation}
\begin{equation} \quad + a_z b_x (\hat{k}\cdot\hat{i}) + a_z b_y (\hat{k}\cdot\hat{j}) + a_z b_z (\hat{k}\cdot\hat{k}). \end{equation}

Using the orthonormality relations

\begin{equation} \hat{i}\cdot\hat{i}=\hat{j}\cdot\hat{j}=\hat{k}\cdot\hat{k}=1, \qquad \hat{i}\cdot\hat{j}=\hat{j}\cdot\hat{k}=\hat{k}\cdot\hat{i}=0, \end{equation}

all the cross terms vanish, leaving

\begin{equation} \vec{a}\cdot\vec{b} = a_x b_x + a_y b_y + a_z b_z. \end{equation}

Conclusion: The component definition

\begin{equation} \boxed{\;\vec{a}\cdot\vec{b} = a_x b_x + a_y b_y + a_z b_z\;} \end{equation}

is equivalent to the geometric definition \(\vec{a}\cdot\vec{b}=ab\cos\theta\).

Example

Let \(\vec{a}=(1,2,-1)\) and \(\vec{b}=(2,0,3)\). Then

\begin{equation} \vec{a}\cdot\vec{b} = (1)(2) + (2)(0) + (-1)(3) = 2-3=-1. \end{equation}

Since the dot product is negative, the angle between the vectors is obtuse.

Example - Finding the angle between two vectors

Let

\begin{equation} \vec{a} = (1,2,2), \qquad \vec{b} = (3,0,1). \end{equation}

Solution.

\begin{equation} \vec{a}\cdot\vec{b} = (1)(3) + (2)(0) + (2)(1) = 3 + 0 + 2 = 5. \end{equation}

Step 2. Find the magnitudes.

\begin{equation} a = \sqrt{1^2+2^2+2^2} = \sqrt{1+4+4} = \sqrt{9} = 3, \end{equation}
\begin{equation} b = \sqrt{3^2+0^2+1^2} = \sqrt{9+0+1} = \sqrt{10}. \end{equation}

Step 3. Use the formula.

\begin{equation} \vec{a}\cdot\vec{b} = ab\cos\theta \quad\Rightarrow\quad \cos\theta = \frac{\vec{a}\cdot\vec{b}}{ab} = \frac{5}{3\sqrt{10}}. \end{equation}

Step 4. Solve for the angle.

\begin{equation} \theta = \cos^{-1}\!\left(\frac{5}{3\sqrt{10}}\right). \end{equation}

Thus the angle between \(\vec{a}\) and \(\vec{b}\) is

\begin{equation} \theta \approx 57.7^\circ. \end{equation}

Vectors in \(n\)-Dimensional Space

A vector in n-dimensional space. Any vector a can be expressed as a linear combination of the basis vectors \e1,e2,,en\ with components (a1,a2,,an).
Figure 3.6. A vector in \(n\)-dimensional space. Any vector \(\vec{a}\) can be expressed as a linear combination of the basis vectors \(\{\hat{e}_1,\hat{e}_2,\dots,\hat{e}_n\}\) with components \((a_1,a_2,\dots,a_n)\).

A vector in an \(n\)-dimensional vector space is written as

\begin{equation} \vec{a} = \sum_{i=1}^n a_i \, \hat{e}_i, \end{equation}

where

Remark

This expression is completely general: it defines a vector in any finite-dimensional vector space. In physics, however, we usually work in \(\mathbb{R}^3\), which describes the three spatial directions.

Kronecker Delta and the Dot Product in \(n\) Dimensions

Let \(\{\hat{e}_1,\hat{e}_2,\dots,\hat{e}_n\}\) be the standard orthonormal basis in \(\mathbb{R}^n\). The inner product of two basis vectors is defined as

\begin{equation} \hat{e}_i \cdot \hat{e}_j = \begin{cases} 1 & \text{if } i=j, \\ 0 & \text{if } i\neq j. \end{cases} \end{equation}

This property is written compactly using the Kronecker delta:

\begin{equation} \hat{e}_i \cdot \hat{e}_j = \delta_{ij}, \end{equation}

where

\begin{equation} \delta_{ij} = \begin{cases} 1 & \text{if } i=j, \\ 0 & \text{if } i\neq j. \end{cases} \end{equation}

Dot Product in \(n\) Dimensions

Let

\begin{equation} \vec{a} = \sum_{i=1}^n a_i \hat{e}_i, \qquad \vec{b} = \sum_{j=1}^n b_j \hat{e}_j. \end{equation}

The dot product is

\begin{equation} \vec{a}\cdot\vec{b} = \left( \sum_{i=1}^n a_i \hat{e}_i \right) \cdot \left( \sum_{j=1}^n b_j \hat{e}_j \right). \end{equation}

Expanding:

\begin{equation} = \sum_{i=1}^n \sum_{j=1}^n a_i b_j \, (\hat{e}_i\cdot\hat{e}_j). \end{equation}

Using \(\hat{e}_i \cdot \hat{e}_j = \delta_{ij}\):

\begin{equation} = \sum_{i=1}^n \sum_{j=1}^n a_i b_j \, \delta_{ij}. \end{equation}

Since \(\delta_{ij}\) is zero unless \(i=j\), this reduces to

\begin{equation} \vec{a}\cdot\vec{b} = \sum_{i=1}^n a_i b_i. \end{equation}

Cross Product

Definition - Cross Product

For two vectors \(\vec{a}\) and \(\vec{b}\) in \(\mathbb{R}^3\), the cross product is a new vector denoted by

\begin{equation} \vec{a}\times\vec{b}. \end{equation}

Magnitude. The length of the cross product is defined by

\begin{equation} |\vec{a}\times\vec{b}| = ab \sin\theta, \end{equation}

where \(a=|\vec{a}|\), \(b=|\vec{b}|\), and \(\theta\) is the angle between \(\vec{a}\) and \(\vec{b}\).

Geometric interpretation.

Component Formula for the Cross Product

Write the vectors in component form:

\begin{equation} \vec{a} = a_x \hat{i} + a_y \hat{j} + a_z \hat{k}, \qquad \vec{b} = b_x \hat{i} + b_y \hat{j} + b_z \hat{k}. \end{equation}

Then

\begin{equation} \vec{a}\times\vec{b} = (a_x \hat{i} + a_y \hat{j} + a_z \hat{k}) \times (b_x \hat{i} + b_y \hat{j} + b_z \hat{k}). \end{equation}

Expanding term by term:

\begin{equation} = a_x b_x (\hat{i}\times\hat{i}) + a_x b_y (\hat{i}\times\hat{j}) + a_x b_z (\hat{i}\times\hat{k}) \end{equation}
\begin{equation} \quad + a_y b_x (\hat{j}\times\hat{i}) + a_y b_y (\hat{j}\times\hat{j}) + a_y b_z (\hat{j}\times\hat{k}) \end{equation}
\begin{equation} \quad + a_z b_x (\hat{k}\times\hat{i}) + a_z b_y (\hat{k}\times\hat{j}) + a_z b_z (\hat{k}\times\hat{k}). \end{equation}

Now use the fundamental relations:

\begin{equation} \hat{i}\times\hat{i}=\hat{j}\times\hat{j}=\hat{k}\times\hat{k}=0, \end{equation}
\begin{equation} \hat{i}\times\hat{j}=\hat{k}, \quad \hat{j}\times\hat{k}=\hat{i}, \quad \hat{k}\times\hat{i}=\hat{j}, \end{equation}
\begin{equation} \hat{j}\times\hat{i}=-\hat{k}, \quad \hat{k}\times\hat{j}=-\hat{i}, \quad \hat{i}\times\hat{k}=-\hat{j}. \end{equation}

Substituting:

\begin{equation} \vec{a}\times\vec{b} = (a_y b_z - a_z b_y)\hat{i} + (a_z b_x - a_x b_z)\hat{j} + (a_x b_y - a_y b_x)\hat{k}. \end{equation}

This is the component formula for the cross product. This is easiest to remember as a determinant, with the unit vectors in the first row:

\begin{equation} \vec{a}\times\vec{b} = \begin{vmatrix} \hat{i} & \hat{j} & \hat{k} \\ a_x & a_y & a_z \\ b_x & b_y & b_z \end{vmatrix}. \end{equation}
Example

Let \(\vec{a}=(2,1,-1)\) and \(\vec{b}=(3,-2,1)\). Then

\begin{equation} \vec{a}\times\vec{b} = (1\cdot 1 - (-1)(-2))\hat{i} +((-1)\cdot 3 - (2)(1))\hat{j} +((2)(-2) - (1)(3))\hat{k}. \end{equation}
\begin{equation} = (1-2)\hat{i} + (-3-2)\hat{j} + (-4-3)\hat{k} = -\hat{i} - 5\hat{j} - 7\hat{k}. \end{equation}

Levi-Civita Symbol and the Cross Product

In three dimensions, the cross product of the standard basis vectors is defined by

\begin{equation} \hat{i}\times\hat{j}=\hat{k}, \qquad \hat{j}\times\hat{k}=\hat{i}, \qquad \hat{k}\times\hat{i}=\hat{j}, \end{equation}

together with the antisymmetry property

\begin{equation} \hat{e}_i \times \hat{e}_j = -(\hat{e}_j \times \hat{e}_i), \qquad \hat{e}_i \times \hat{e}_i = \vec{0}. \end{equation}

These relations are compactly encoded by the Levi-Civita symbol:

\begin{equation} \hat{e}_i \times \hat{e}_j = \sum_{k=1}^3 \epsilon_{ijk}\,\hat{e}_k, \end{equation}

where

\begin{equation} \epsilon_{ijk} = \begin{cases} +1 & \text{if } (i,j,k) \text{ is an even permutation of } (1,2,3), \\ -1 & \text{if } (i,j,k) \text{ is an odd permutation of } (1,2,3), \\ 0 & \text{if any indices are repeated}. \end{cases} \end{equation}

Cross Product in 3D

Let

\begin{equation} \vec{a} = \sum_{i=1}^3 a_i \hat{e}_i, \qquad \vec{b} = \sum_{j=1}^3 b_j \hat{e}_j. \end{equation}

Then

\begin{equation} \vec{a}\times\vec{b} = \left(\sum_{i=1}^3 a_i \hat{e}_i \right) \times \left(\sum_{j=1}^3 b_j \hat{e}_j \right). \end{equation}

Expanding:

\begin{equation} = \sum_{i=1}^3 \sum_{j=1}^3 a_i b_j \, (\hat{e}_i \times \hat{e}_j). \end{equation}

Using the Levi-Civita relation:

\begin{equation} = \sum_{i=1}^3 \sum_{j=1}^3 a_i b_j \left(\sum_{k=1}^3 \epsilon_{ijk}\hat{e}_k\right). \end{equation}

Rearranging the sums:

\begin{equation} \vec{a}\times\vec{b} = \sum_{k=1}^3 \left(\sum_{i=1}^3 \sum_{j=1}^3 \epsilon_{ijk} a_i b_j\right) \hat{e}_k. \end{equation}

Thus, the \(k\)-th component of \(\vec{a}\times\vec{b}\) is

\begin{equation} (\vec{a}\times\vec{b})_k = \sum_{i=1}^3 \sum_{j=1}^3 \epsilon_{ijk}\,a_i b_j. \end{equation}

3.7Matrix Operations

3.7.1Matrix Equations

Two matrices are said to be equal if and only if they have the same size (same number of rows and columns) and each corresponding element is equal.

Definition - Equality of Matrices

Two matrices \(M\) and \(A\) of the same size are equal if and only if all corresponding entries are equal. That is,

\begin{equation} M = A \quad \Longleftrightarrow \quad m_{ij} = a_{ij} \ \text{for every } i,j. \end{equation}
Example

Consider the matrix equation

\begin{equation} \begin{bmatrix} x & r & u \\ y & s & v \end{bmatrix} = \begin{bmatrix} 1 & 2 & 3i \\ 1+2i & 3 & 6 \end{bmatrix}. \end{equation}

By equating corresponding elements, we find

\begin{equation} x = 1, \quad r = 2, \quad u = 3i, \quad y = 1+2i, \quad s = 3, \quad v = 6. \end{equation}

3.7.2Multiplication of a Matrix by a Number

A scalar \(\lambda \in \mathbb{R}\) or \(\mathbb{C}\) can multiply a matrix \(M\). This operation means multiplying every entry of the matrix by \(\lambda\).

Definition - Scalar Multiplication of a Matrix

Let \(M = (m_{ij})\) be a matrix and let \(\lambda \in \mathbb{R}\) (or \(\mathbb{C}\)). The scalar multiple of \(M\) by \(\lambda\) is the matrix obtained by multiplying every entry of \(M\) by \(\lambda\):

\begin{equation} \lambda M = (\lambda\, m_{ij}). \end{equation}
Example

Consider the vector

\begin{equation} \vec{a} = \begin{bmatrix} a_1 \\ a_2 \\ \vdots \\ a_n \end{bmatrix}. \end{equation}

Multiplying by a scalar \(\lambda\) gives

\begin{equation} \lambda \vec{a} = \begin{bmatrix} \lambda a_1 \\ \lambda a_2 \\ \vdots \\ \lambda a_n \end{bmatrix}. \end{equation}
Example

Let

\begin{equation} M = \begin{bmatrix} m_{11} & m_{12} & m_{13} \\ m_{21} & m_{22} & m_{23} \end{bmatrix}. \end{equation}

Then

\begin{equation} \lambda M = \lambda \begin{bmatrix} m_{11} & m_{12} & m_{13} \\ m_{21} & m_{22} & m_{23} \end{bmatrix} = \begin{bmatrix} \lambda m_{11} & \lambda m_{12} & \lambda m_{13} \\ \lambda m_{21} & \lambda m_{22} & \lambda m_{23} \end{bmatrix}. \end{equation}
Theorem - Scalar Multiplication Entry-wise

For any matrix \(M = (m_{ij})\) and scalar \(\lambda\),

\begin{equation} (\lambda M)_{ij} = \lambda\, m_{ij}. \end{equation}

In other words, scalar multiplication acts on each entry of the matrix.

Theorem - Determinant of a Scalar Multiple

Let \(A\) be an \(n \times n\) matrix and \(\lambda\) a scalar. Then scaling every row of \(A\) by \(\lambda\) scales the determinant by \(\lambda^n\):

\begin{equation} \det(\lambda A) = \lambda^n \det(A). \end{equation}
Example - Scalar multiplication

For the same \(A\) as above, let \(\lambda=2\). Then

\begin{equation} \det(2A) = 2^2 \det(A) = 4(-2) = -8. \end{equation}

Indeed,

\begin{equation} 2A = \begin{bmatrix} 2 & 4 \\ 6 & 8 \end{bmatrix}, \quad \det(2A) = (2)(8) - (4)(6) = 16 - 24 = -8. \end{equation}

3.7.3Matrix Addition

Two matrices of the same size can be added by adding their corresponding elements.

Definition - Matrix Addition

Let \(M = (m_{ij})\) and \(A = (a_{ij})\) be matrices of the *same size. Their sum is defined entry-wise:

\begin{equation} M + A = (\,m_{ij} + a_{ij}\,). \end{equation}
Example

For example,

\begin{equation} M = \begin{bmatrix} m_{11} & m_{12} & m_{13} \\ m_{21} & m_{22} & m_{23} \end{bmatrix}, \quad A = \begin{bmatrix} a_{11} & a_{12} & a_{13} \\ a_{21} & a_{22} & a_{23} \end{bmatrix}. \end{equation}

Then

\begin{equation} M + A = \begin{bmatrix} m_{11}+a_{11} & m_{12}+a_{12} & m_{13}+a_{13} \\ m_{21}+a_{21} & m_{22}+a_{22} & m_{23}+a_{23} \end{bmatrix}. \end{equation}
Remark

We can only add matrices if they have the same dimensions.

Theorem - Entry-wise Addition

For matrices \(M = (m_{ij})\) and \(A = (a_{ij})\) of the same size,

\begin{equation} (M + A)_{ij} = m_{ij} + a_{ij}. \end{equation}
Example - Simple Example

Let

\begin{equation} M = \begin{bmatrix} 1 & 2 \\ 3 & 4 \end{bmatrix}, \quad A = \begin{bmatrix} 5 & 6 \\ 7 & 8 \end{bmatrix}. \end{equation}

Then

\begin{equation} M + A = \begin{bmatrix} 1+5 & 2+6 \\ 3+7 & 4+8 \end{bmatrix} = \begin{bmatrix} 6 & 8 \\ 10 & 12 \end{bmatrix}. \end{equation}
Remark

Repeated addition of the same matrix corresponds to scalar multiplication:

\begin{equation} \underbrace{A + A + \cdots + A}_{N \text{ times}} = N A. \end{equation}

3.7.4Matrix Multiplication

The product of two matrices \(AB\) is defined if and only if the number of columns of \(A\) equals the number of rows of \(B\).

Definition - Matrix Multiplication

Let

\begin{equation} A = (a_{ik}) \quad \text{be an } m \times n \text{ matrix}, \quad B = (b_{kj}) \quad \text{be an } n \times p \text{ matrix}. \end{equation}

Then the matrix product \(AB\) is the \(m \times p\) matrix whose entries are given by

\begin{equation} (AB)_{ij} = \sum_{k=1}^{n} a_{ik} b_{kj}, \qquad i = 1,\dots,m,\quad j = 1,\dots,p. \end{equation}
Example - a

Let

\begin{equation} A = \begin{bmatrix} 4 & 2 \\ -3 & 1 \end{bmatrix}, \quad B = \begin{bmatrix} 1 & 5 & 3 \\ 2 & 7 & -4 \end{bmatrix}. \end{equation}

Since \(A\) is \(2\times 2\) and \(B\) is \(2\times 3\), the product \(AB\) exists and is \(2\times 3\).

\begin{equation} AB = \begin{bmatrix} (4)(1)+(2)(2) & (4)(5)+(2)(7) & (4)(3)+(2)(-4) \\ (-3)(1)+(1)(2) & (-3)(5)+(1)(7) & (-3)(3)+(1)(-4) \end{bmatrix}. \end{equation}
\begin{equation} AB = \begin{bmatrix} 8 & 34 & 4 \\ -1 & -8 & -13 \end{bmatrix}. \end{equation}

Note: \(BA\) cannot be computed because the dimensions do not match.

Example - b

Let

\begin{equation} A = \begin{bmatrix} 3 & -1 \\ -4 & 2 \end{bmatrix}, \quad B = \begin{bmatrix} 5 & 2 \\ -7 & 3 \end{bmatrix}. \end{equation}

Both products \(AB\) and \(BA\) can be computed.

\begin{equation} AB = \begin{bmatrix} (3)(5)+(-1)(-7) & (3)(2)+(-1)(3) \\ (-4)(5)+(2)(-7) & (-4)(2)+(2)(3) \end{bmatrix} = \begin{bmatrix} 22 & 3 \\ -34 & -2 \end{bmatrix}. \end{equation}
\begin{equation} BA = \begin{bmatrix} (5)(3)+(2)(-4) & (5)(-1)+(2)(2) \\ (-7)(3)+(3)(-4) & (-7)(-1)+(3)(2) \end{bmatrix} = \begin{bmatrix} 7 & -1 \\ -33 & 13 \end{bmatrix}. \end{equation}

Thus,

\begin{equation} AB \neq BA. \end{equation}
Remark - Properties of Matrix Multiplication
  1. Associativity: \(A(BC) = (AB)C\).

  2. Distributivity: \((A+B)C = AC + BC\).

Commutators and Anticommutators

Definition - Commutator of Matrices

For two square matrices \(A\) and \(B\) of the same size, the commutator is defined by

\begin{equation} [A,B] = AB - BA. \end{equation}
Example

Consider

\begin{equation} (A-B)(A+B) = AA + AB - BA - BB. \end{equation}

Rearranging gives

\begin{equation} (A-B)(A+B) = A^2 - B^2 + [A,B]. \end{equation}
Definition - Anticommutator of Matrices

For two square matrices \(A\) and \(B\) of the same size, the anticommutator is defined by

\begin{equation} \{A,B\} = AB + BA. \end{equation}
Example

Expanding

\begin{equation} (A+B)(A+B) = A^2 + B^2 + (AB + BA) = A^2 + B^2 + \{A,B\}. \end{equation}
Theorem - Determinant of a Product

Let \(A\) and \(B\) be square matrices of the same size. Then

\begin{equation} \det(AB) = \det(A)\,\det(B) = \det(BA). \end{equation}

More generally, if \(A, B, C, \dots, G\) are all square matrices of the same size, then

\begin{equation} \det(ABC\cdots G) = \det(A)\,\det(B)\,\det(C)\cdots\det(G). \end{equation}
Example

Let

\begin{equation} A = \begin{bmatrix} 1 & 2 \\ 3 & 4 \end{bmatrix}, \quad B = \begin{bmatrix} 2 & 0 \\ 1 & 3 \end{bmatrix}. \end{equation}

First compute

\begin{equation} \det(A) = (1)(4) - (2)(3) = -2, \qquad \det(B) = (2)(3) - (0)(1) = 6. \end{equation}

Now compute

\begin{equation} AB = \begin{bmatrix} 1 & 2 \\ 3 & 4 \end{bmatrix} \begin{bmatrix} 2 & 0 \\ 1 & 3 \end{bmatrix} = \begin{bmatrix} 4 & 6 \\ 10 & 12 \end{bmatrix}, \end{equation}

so

\begin{equation} \det(AB) = (4)(12) - (6)(10) = 48 - 60 = -12. \end{equation}

On the other hand,

\begin{equation} \det(A)\det(B) = (-2)(6) = -12. \end{equation}

Thus,

\begin{equation} \det(AB) = \det(A)\det(B). \end{equation}

3.8Zero, Identity, and Transpose of Matrices

3.8.1Zero Matrix

Definition - Zero (Null) Matrix

A zero matrix, denoted \(0\), is a matrix in which every entry is zero. For any matrix \(A\) of the same size,

\begin{equation} A + 0 = 0 + A = A, \qquad A0 = 0A = 0. \end{equation}
Example

A \(2 \times 2\) zero matrix:

\begin{equation} 0 = \begin{bmatrix} 0 & 0 \\ 0 & 0 \end{bmatrix}. \end{equation}

3.8.2Identity Matrix

Definition - Identity Matrix

The identity matrix, denoted \(I\), is a square matrix with \(1\)s on the main diagonal and \(0\)s elsewhere. It acts as a multiplicative identity:

\begin{equation} AI = IA = A \quad \text{for any } n \times n \text{ matrix } A. \end{equation}
Example

The \(3 \times 3\) identity matrix:

\begin{equation} I = \begin{bmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{bmatrix}. \end{equation}

For

\begin{equation} A = \begin{bmatrix} 2 & 3 \\ 4 & 5 \end{bmatrix}, \quad I = \begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix}, \end{equation}

we have

\begin{equation} AI = IA = A. \end{equation}

3.8.3Transpose of a Matrix

Definition - Transpose

The transpose of a matrix \(A = (a_{ij})\), denoted \(A^T\), is formed by interchanging rows and columns:

\begin{equation} (A^T)_{ij} = a_{ji}. \end{equation}
Theorem - Transpose of a Product

For any matrices \(A\) and \(B\) such that the product \(AB\) is defined,

\begin{equation} (AB)^T = B^T A^T. \end{equation}

From the definition,

\begin{equation} (AB)_{ij} = \sum_k a_{ik} b_{kj}. \end{equation}

Taking transpose:

\begin{equation} (AB)^T_{ij} = (AB)_{ji} = \sum_k a_{jk} b_{ki}. \end{equation}

On the other hand,

\begin{equation} (B^T A^T)_{ij} = \sum_k (B^T)_{ik} (A^T)_{kj} = \sum_k b_{ki} a_{jk}. \end{equation}

Thus,

\begin{equation} (AB)^T = B^T A^T. \end{equation}
Example

Let

\begin{equation} A = \begin{bmatrix} 1 & 2 \\ 3 & 4 \end{bmatrix}, \quad B = \begin{bmatrix} 0 & 5 \\ 6 & 7 \end{bmatrix}. \end{equation}

Compute

\begin{equation} AB = \begin{bmatrix} 1 & 2 \\ 3 & 4 \end{bmatrix} \begin{bmatrix} 0 & 5 \\ 6 & 7 \end{bmatrix} = \begin{bmatrix} 12 & 19 \\ 24 & 43 \end{bmatrix}. \end{equation}

So

\begin{equation} (AB)^T = \begin{bmatrix} 12 & 24 \\ 19 & 43 \end{bmatrix}. \end{equation}

Meanwhile,

\begin{equation} B^T = \begin{bmatrix} 0 & 6 \\ 5 & 7 \end{bmatrix}, \quad A^T = \begin{bmatrix} 1 & 3 \\ 2 & 4 \end{bmatrix}, \end{equation}
\begin{equation} B^T A^T = \begin{bmatrix} 0 & 6 \\ 5 & 7 \end{bmatrix} \begin{bmatrix} 1 & 3 \\ 2 & 4 \end{bmatrix} = \begin{bmatrix} 12 & 24 \\ 19 & 43 \end{bmatrix}. \end{equation}

Hence

\begin{equation} (AB)^T = B^T A^T. \end{equation}
Remark

This result generalizes to multiple matrices:

\begin{equation} (ABC \cdots G)^T = G^T \cdots C^T B^T A^T. \end{equation}

3.8.4Inverse of a Matrix

Recall that the identity matrix \(I\) satisfies

\begin{equation} AI = IA = A \quad \text{for any square matrix } A. \end{equation}
Definition - Inverse Matrix

A square matrix \(A\) is invertible (or nonsingular) if there exists a matrix \(A^{-1}\) such that

\begin{equation} AA^{-1} = A^{-1}A = I. \end{equation}

In this case, \(A^{-1}\) is called the inverse of \(A\).

Theorem - Inverse via Cofactors (Adjugate Formula)

If \(A\) is an \(n \times n\) matrix with \(\det(A) \neq 0\), then

\begin{equation} A^{-1} = \frac{1}{\det(A)} \,\mathrm{adj}(A), \end{equation}

where the adjugate matrix \(\mathrm{adj}(A)\) is the transpose of the cofactor matrix \(C = (c_{ij})\):

\begin{equation} \mathrm{adj}(A) = C^{T}. \end{equation}

Each cofactor is given by

\begin{equation} c_{ij} = (-1)^{i+j} \det\!\big(M^{(ij)}\big), \end{equation}

and \(M^{(ij)}\) is the submatrix formed by removing row \(i\) and column \(j\) of \(A\).

Example - 2×2 inverse

If

\begin{equation} A = \begin{bmatrix} a & b \\ c & d \end{bmatrix}, \end{equation}

then

\begin{equation} A^{-1} = \frac{1}{ad - bc} \begin{bmatrix} d & -b \\ -c & a \end{bmatrix}. \end{equation}
Example - 3×3 inverse

Let

\begin{equation} A = \begin{bmatrix} 1 & 0 & -1 \\ -2 & 3 & 0 \\ 1 & -3 & 2 \end{bmatrix}. \end{equation}

Compute the cofactors:

- First row:

\begin{equation} c_{11} = \det\begin{bmatrix}3 & 0 \\ -3 & 2\end{bmatrix} = 6, \quad c_{12} = -\det\begin{bmatrix}-2 & 0 \\ 1 & 2\end{bmatrix} = 4, \quad c_{13} = \det\begin{bmatrix}-2 & 3 \\ 1 & -3\end{bmatrix} = 3. \end{equation}

- Second row:

\begin{equation} c_{21} = -\det\begin{bmatrix}0 & -1 \\ -3 & 2\end{bmatrix} = 3, \quad c_{22} = \det\begin{bmatrix}1 & -1 \\ 1 & 2\end{bmatrix} = 3, \quad c_{23} = -\det\begin{bmatrix}1 & 0 \\ 1 & -3\end{bmatrix} = 3. \end{equation}

- Third row:

\begin{equation} c_{31} = \det\begin{bmatrix}0 & -1 \\ 3 & 0\end{bmatrix} = 3, \quad c_{32} = -\det\begin{bmatrix}1 & -1 \\ -2 & 0\end{bmatrix} = 2, \quad c_{33} = \det\begin{bmatrix}1 & 0 \\ -2 & 3\end{bmatrix} = 3. \end{equation}

Thus the cofactor matrix is

\begin{equation} C = \begin{bmatrix} 6 & 4 & 3 \\ 3 & 3 & 3 \\ 3 & 2 & 3 \end{bmatrix}. \end{equation}

Since

\begin{equation} \det(A) = 1(6) - 0 + (-1)(3) = 3, \end{equation}

the inverse is

\begin{equation} A^{-1} = \frac{1}{\det(A)} C^T = \frac{1}{3} \begin{bmatrix} 6 & 3 & 3 \\ 4 & 3 & 2 \\ 3 & 3 & 3 \end{bmatrix}. \end{equation}
Example

We write the system as

\begin{equation} M\vec{x}=\vec{b}, \qquad M=\begin{bmatrix}1&1\\1&-1\end{bmatrix}, \quad \vec{x}=\begin{bmatrix}x_1\\x_2\end{bmatrix}, \quad \vec{b}=\begin{bmatrix}5\\1\end{bmatrix}. \end{equation}

Solution.

\begin{equation} \det(M)=(1)(-1)-(1)(1)=-1-1=-2 \neq 0. \end{equation}

Step 2. Cofactor matrix.

\begin{equation} \begin{aligned} c_{11}&=(-1)^{1+1}\det([-1])=-1, \\ c_{12}&=(-1)^{1+2}\det([1])=-1, \\ c_{21}&=(-1)^{2+1}\det([1])=-1, \\ c_{22}&=(-1)^{2+2}\det([1])=1. \end{aligned} \end{equation}

So

\begin{equation} C=\begin{bmatrix}-1&-1\\-1&1\end{bmatrix}, \qquad C^T=\begin{bmatrix}-1&-1\\-1&1\end{bmatrix}. \end{equation}

Step 3. Inverse matrix.

\begin{equation} M^{-1}=\frac{1}{\det(M)}C^T =\frac{1}{-2}\begin{bmatrix}-1&-1\\-1&1\end{bmatrix} =\begin{bmatrix}\tfrac{1}{2}&\tfrac{1}{2}\\[6pt]\tfrac{1}{2}&-\tfrac{1}{2}\end{bmatrix}. \end{equation}

Step 4. Multiply by \(\vec{b}\).

\begin{equation} \vec{x}=M^{-1}\vec{b} =\begin{bmatrix}\tfrac{1}{2}&\tfrac{1}{2}\\[6pt]\tfrac{1}{2}&-\tfrac{1}{2}\end{bmatrix} \begin{bmatrix}5\\1\end{bmatrix}. \end{equation}

Compute components:

\begin{equation} x_1=\tfrac{1}{2}(5)+\tfrac{1}{2}(1)=\tfrac{6}{2}=3, \qquad x_2=\tfrac{1}{2}(5)-\tfrac{1}{2}(1)=\tfrac{4}{2}=2. \end{equation}
\begin{equation} \boxed{x_1=3,\quad x_2=2} \end{equation}

3.8.5Complex Conjugate of a Matrix

Definition - Complex Conjugate

Let \(A = (a_{ij})\) be a matrix with complex entries. The complex conjugate of \(A\), denoted \(\bar{A}\) or \(A^*\), is obtained by taking the complex conjugate of each entry:

\begin{equation} (\bar{A})_{ij} = \overline{a_{ij}}. \end{equation}
Example
\begin{equation} A = \begin{pmatrix} 1+i & 2 \\ -3i & 4 \end{pmatrix} \quad \Longrightarrow \quad \bar{A} = \begin{pmatrix} 1-i & 2 \\ 3i & 4 \end{pmatrix}. \end{equation}

3.8.6Hermitian Conjugate (Adjoint)

Definition - Hermitian Conjugate (Adjoint)

The Hermitian conjugate of a matrix \(A\), denoted \(A^\dagger\), is defined as the transpose of its complex conjugate:

\begin{equation} A^\dagger = (\bar{A})^T. \end{equation}

Equivalently,

\begin{equation} (A^\dagger)_{ij} = \overline{a_{ji}}. \end{equation}
Example

If

\begin{equation} A = \begin{pmatrix} 1+i & 2 \\ -3i & 4 \end{pmatrix}, \quad \text{then}\quad A^\dagger = \begin{pmatrix} 1-i & 3i \\ 2 & 4 \end{pmatrix}. \end{equation}

3.8.7Special Matrices: Real vs Complex

It is useful to distinguish between real and complex matrices, because many important classes of matrices in the real case (such as symmetric and orthogonal) have natural generalizations in the complex case (Hermitian and unitary). This way, we can see clearly how the theory for real matrices extends to complex matrices.

Real matricesComplex matrices
\(A = \bar{A}\) (all entries real)
\(\bar{A} = -A\) (Purely imaginary)
\(A = A^T\) (Symmetric)\(A = A^\dagger\) (Hermitian)
\(A = -A^T\) (Anti-symmetric)\(A = -A^\dagger\) (Anti-Hermitian)
\(A^{-1} = A^T\) (Orthogonal)\(A^{-1} = A^\dagger\) (Unitary)
\(AA^\dagger = A^\dagger A\) (Normal)
Remark

The correspondence is clear:

\begin{equation} \text{Symmetric} \;\leftrightarrow\; \text{Hermitian}, \quad \text{Anti-symmetric} \;\leftrightarrow\; \text{Anti-Hermitian}, \quad \text{Orthogonal} \;\leftrightarrow\; \text{Unitary}. \end{equation}
Example

Let \(A\) be a unitary matrix, i.e. \(A^\dagger A = I\).

Then

\begin{equation} [A, A^\dagger] = AA^\dagger - A^\dagger A = I - I = 0. \end{equation}

Thus, every unitary matrix is normal.

Also,

\begin{equation} \{A, A^\dagger\} = AA^\dagger + A^\dagger A = I + I = 2I. \end{equation}
TypeDefinitionExample (\(2\times 2\))
Real\(A = \bar{A}\)\(\left[\begin{array}{cc} 2 & -1 \\ 0 & 3 \end{array}\right]\)
Symmetric\(A = A^T\)\(\left[\begin{array}{cc} 2 & 5 \\ 5 & -1 \end{array}\right]\)
Anti-symmetric\(A = -A^T\)\(\left[\begin{array}{cc} 0 & -3 \\ 3 & 0 \end{array}\right]\)
Orthogonal\(A^{-1} = A^T\)\(\left[\begin{array}{cc} 0 & -1 \\ 1 & 0 \end{array}\right]\)
Purely imaginary\(\bar{A} = -A\)\(\left[\begin{array}{cc} i & 0 \\ 0 & -i \end{array}\right]\)
Hermitian\(A^\dagger = A\)\(\left[\begin{array}{cc} 2 & 1+i \\ 1-i & 3 \end{array}\right]\)
Anti-Hermitian\(A^\dagger = -A\)\(\left[\begin{array}{cc} i & 2 \\ -2 & -i \end{array}\right]\)
Unitary\(A^{-1} = A^\dagger\)\(\tfrac{1}{\sqrt{2}}\left[\begin{array}{cc} 1 & i \\ i & 1 \end{array}\right]\)
Normal\(AA^\dagger = A^\dagger A\)\(\left[\begin{array}{cc} 1 & 1 \\ 0 & 1 \end{array}\right]\)

3.8.8Functions of Matrices

We can extend the notion of a function of a number to a function of a matrix. In general, a function \(f(A)\) of a matrix is defined by the Taylor (Maclaurin) series expansion of \(f(x)\), with the variable \(x\) replaced by the matrix \(A\).

The Maclaurin series of a function \(f(x)\) is

\begin{equation} f(x) = f(0) + f'(0)x + \frac{f''(0)}{2!}x^2 + \frac{f^{(3)}(0)}{3!}x^3 + \cdots. \end{equation}

Accordingly, we define

\begin{equation} f(A) = f(0)I + f'(0)A + \frac{f''(0)}{2!}A^2 + \frac{f^{(3)}(0)}{3!}A^3 + \cdots, \end{equation}

where \(I\) is the identity matrix.

Example

Let

\begin{equation} A = \begin{bmatrix} 1 & \sqrt{2} \\ -\sqrt{2} & -1 \end{bmatrix}. \end{equation}

a) Polynomial function of \(A\). First compute

\begin{equation} A^2 = \begin{bmatrix} 1 & \sqrt{2} \\ -\sqrt{2} & -1 \end{bmatrix} \begin{bmatrix} 1 & \sqrt{2} \\ -\sqrt{2} & -1 \end{bmatrix} = \begin{bmatrix} -1 & 0 \\ 0 & -1 \end{bmatrix} = -I. \end{equation}

Now consider

\begin{equation} f(A) = 3 - 2A^2 - A^3 - 5A^4 + A^6. \end{equation}

Using \(A^2 = -I\), higher powers reduce:

\begin{equation} A^3 = -A, \quad A^4 = I, \quad A^6 = -I. \end{equation}

Thus

\begin{equation} f(A) = 3I + 2I + A - 5I + I = I + A. \end{equation}

Therefore,

\begin{equation} f(A) = \begin{bmatrix} 2 & \sqrt{2} \\ -\sqrt{2} & 0 \end{bmatrix}. \end{equation}

b) Exponential of \(A\) using Maclaurin series. The exponential of a matrix is defined by

\begin{equation} e^{kA} = I + kA + \frac{(kA)^2}{2!} + \frac{(kA)^3}{3!} + \cdots. \end{equation}

Using \(A^2 = -I\), higher powers alternate:

\begin{equation} A^3 = -A, \quad A^4 = I, \quad A^5 = A, \quad \dots \end{equation}

Thus

\begin{equation} e^{kA} = \Big(1 - \frac{k^2}{2!} + \frac{k^4}{4!} - \cdots \Big) I + \Big(k - \frac{k^3}{3!} + \frac{k^5}{5!} - \cdots \Big) A. \end{equation}

Recognizing the series expansions,

\begin{equation} e^{kA} = I \cos(k) + A \sin(k). \end{equation}
Remark

In general,

\begin{equation} e^{A+B} \neq e^A e^B. \end{equation}

However, if \([A,B]=0\) (i.e., \(AB=BA\)), then

\begin{equation} e^{A+B} = e^A e^B. \end{equation}

3.9Linear Combinations and Linear Functions

Definition - Linear Combination

Let \(\vec{r}_1, \vec{r}_2 \in \mathbb{R}^n\) (or \(\mathbb{C}^n\)) and let \(a,b\) be scalars. Any vector of the form

\begin{equation} a\vec{r}_1 + b\vec{r}_2 \end{equation}

is called a linear combination of \(\vec{r}_1\) and \(\vec{r}_2\).

Definition - Linear Scalar Function

A function \(f: \mathbb{R}^n \to \mathbb{R}\) (or \(\mathbb{C}\)) is linear if, for all scalars \(a,b\) and vectors \(\vec{r}_1, \vec{r}_2\),

\begin{equation} f(a\vec{r}_1 + b\vec{r}_2) = a\, f(\vec{r}_1) + b\, f(\vec{r}_2). \end{equation}

Such functions are also called linear functionals.

Definition - Linear Vector Function

A vector-valued function \(\vec{F} : \mathbb{R}^n \to \mathbb{R}^m\) is linear if, for all scalars \(a,b\) and vectors \(\vec{r}_1, \vec{r}_2\),

\begin{equation} \vec{F}(a\vec{r}_1 + b\vec{r}_2) = a\,\vec{F}(\vec{r}_1) + b\,\vec{F}(\vec{r}_2). \end{equation}

Such functions are also called linear transformations or linear maps.

Example

Is the exponential operator linear? Check:

\begin{equation} e^{a x + b y} \;\neq\; a e^{x} + b e^{y}. \end{equation}

Therefore, the exponential function is not linear.

Definition - Linear Operator

Let \(\mathcal{O}\) be a function (operator) defined on a vector space \(V\). We say \(\mathcal{O}\) is a linear operator if, for all scalars \(a,b\) and vectors \(A,B \in V\),

\begin{equation} \mathcal{O}(aA + bB) = a\,\mathcal{O}(A) + b\,\mathcal{O}(B). \end{equation}
Example

The derivative operator \(\dfrac{d}{dx}\) is linear because

\begin{equation} \frac{d}{dx}\Big(a f(x) + b g(x)\Big) = a \frac{df(x)}{dx} + b \frac{dg(x)}{dx}. \end{equation}

Similarly, the integral operator

\begin{equation} I[f(x)] = \int f(x)\, dx \end{equation}

is linear since

\begin{equation} I\!\left[a f(x) + b g(x)\right] = a \int f(x)\,dx + b \int g(x)\,dx. \end{equation}

3.10Matrix Operators and Linear Transformations

Definition - Linear Transformation

A linear transformation (or linear mapping) is a function

\begin{equation} M : \mathbb{R}^n \to \mathbb{R}^m \quad (\text{or } \mathbb{C}^n \to \mathbb{C}^m) \end{equation}

that maps vectors to vectors and satisfies, for all vectors \(\vec{r}_1, \vec{r}_2\) and scalars \(a,b\),

\begin{equation} M(a\vec{r}_1 + b\vec{r}_2) = a\,M(\vec{r}_1) + b\,M(\vec{r}_2). \end{equation}

Equivalently, linear transformations preserve vector addition and scalar multiplication.

Linear Transformations in 2D

Consider the set of equations

\begin{equation} \label{eq:lintrans} \begin{cases} X = ax + by, \\ Y = cx + dy, \end{cases} \qquad \begin{pmatrix} X \\ Y \end{pmatrix} = \begin{pmatrix} a & b \\ c & d \end{pmatrix} \begin{pmatrix} x \\ y \end{pmatrix}, \qquad \vec{R} = M\vec{r}, \end{equation}

where \(a,b,c,d\) are constants.

For every point \((x,y)\), these equations map it to a new point \((X,Y)\). This process is called a mapping or transformation of the plane. The matrix \(M\) contains all the information about this transformation, and acts as a linear operator.

Since

\begin{equation} M(a\vec{r}_1+b\vec{r}_2) = a M\vec{r}_1 + b M\vec{r}_2, \end{equation}

the matrix \(M\) is a linear operator.

Geometric Interpretation

Equations \(\eqref{eq:lintrans}\) can be interpreted in two ways:

\begin{equation} \begin{cases} x' = ax + by, \\ y' = cx + dy, \end{cases} \qquad \begin{pmatrix} x' \\ y' \end{pmatrix} = \begin{pmatrix} a & b \\ c & d \end{pmatrix} \begin{pmatrix} x \\ y \end{pmatrix}, \qquad \vec{r}' = M\vec{r}. \end{equation}

3.11Orthogonal Transformations

Definition - Orthogonal Matrix

A real square matrix \(M\) is called orthogonal if

\begin{equation} M^{-1} = M^T. \end{equation}

Equivalently,

\begin{equation} M^T M = I = M M^T. \end{equation}

Thus, the columns (and rows) of an orthogonal matrix form an orthonormal set of vectors.

Conditions for a \(2\times 2\) Orthogonal Matrix

Let

\begin{equation} M = \begin{pmatrix} a & b \\ c & d \end{pmatrix}, \qquad M^T = \begin{pmatrix} a & c \\ b & d \end{pmatrix}. \end{equation}

Then

\begin{equation} M^T M = \begin{pmatrix} a & c \\ b & d \end{pmatrix} \begin{pmatrix} a & b \\ c & d \end{pmatrix} = \begin{pmatrix} a^2+c^2 & ab+cd \\ ab+cd & b^2+d^2 \end{pmatrix}. \end{equation}

For orthogonality, we require

\begin{equation} M^T M = I = \begin{pmatrix} 1 & 0 \\ 0 & 1 \end{pmatrix}. \end{equation}

Thus, the conditions are

\begin{equation} a^2 + c^2 = 1, \qquad b^2 + d^2 = 1, \qquad ab+cd = 0. \end{equation}

Determinant Property

Theorem - Determinant of an Orthogonal Matrix

If \(M\) is an orthogonal matrix, then

\begin{equation} \det(M) = \pm 1. \end{equation}

Since \(M^TM = I\),

\begin{equation} \det(M^TM) = \det(I) = 1. \end{equation}

But

\begin{equation} \det(M^T)\det(M) = (\det M)^2 = 1, \end{equation}

so

\begin{equation} \det(M) = \pm 1. \end{equation}
Remark
\begin{equation} \det(M) = +1 \quad \Rightarrow \quad \text{pure rotation}. \end{equation}
\begin{equation} \det(M) = -1 \quad \Rightarrow \quad \text{ A rotation combined with a reflection}. \end{equation}

3.12Rotation in 2D

Active Rotation

Consider a vector

\begin{equation} \vec{r} = x \,\hat{i} + y \,\hat{j}. \end{equation}

In polar form,

\begin{equation} \vec{r} = r \cos\alpha \,\hat{i} + r \sin\alpha \,\hat{j}, \end{equation}

where \(r = \sqrt{x^2+y^2}\) and \(\alpha\) is the angle of the vector with the \(x\)-axis.

Rotation of Coordinates

Suppose a vector in the plane is written in polar form as

\begin{equation} \vec{r} = r\cos\alpha\,\hat{i} + r\sin\alpha\,\hat{j}, \end{equation}

where \(r\) is the magnitude and \(\alpha\) is the angle with respect to the \(x\)-axis.

After a counterclockwise rotation by an angle \(\theta\), the new vector becomes

\begin{equation} \vec{r}' = r\cos(\alpha+\theta)\,\hat{i} + r\sin(\alpha+\theta)\,\hat{j}. \end{equation}

Using the addition identities,

\begin{equation} \cos(\alpha+\theta) = \cos\alpha\cos\theta - \sin\alpha\sin\theta, \qquad \sin(\alpha+\theta) = \sin\alpha\cos\theta + \cos\alpha\sin\theta, \end{equation}

we substitute to obtain

\begin{equation} \vec{r}' = \big(r\cos\alpha\cos\theta - r\sin\alpha\sin\theta\big)\,\hat{i} + \big(r\sin\alpha\cos\theta + r\cos\alpha\sin\theta\big)\,\hat{j}. \end{equation}

Since \(x = r\cos\alpha\) and \(y = r\sin\alpha\), this simplifies to

\begin{equation} \vec{r}' = (x\cos\theta - y\sin\theta)\,\hat{i} + (x\sin\theta + y\cos\theta)\,\hat{j}. \end{equation}

Resulting Coordinate Transformation

Thus, the rotated coordinates are

\begin{equation} x' = x\cos\theta - y\sin\theta, \qquad y' = x\sin\theta + y\cos\theta. \end{equation}

Matrix Form

This can be written in matrix form as

\begin{equation} \begin{pmatrix} x' \\ y' \end{pmatrix} = \begin{pmatrix} \cos\theta & -\sin\theta \\ \sin\theta & \cos\theta \end{pmatrix} \begin{pmatrix} x \\ y \end{pmatrix}. \end{equation}

The matrix

\begin{equation} R(\theta) = \begin{pmatrix} \cos\theta & -\sin\theta \\ \sin\theta & \cos\theta \end{pmatrix} \end{equation}

is called the rotation matrix in 2D.

Active rotation of a vector by angle .
Figure 3.7. Active rotation of a vector by angle \(\theta\).

Passive Rotation

In a passive rotation, instead of rotating the vector, we rotate the coordinate system by \(\theta\), while keeping the vector fixed.

Equivalently, the components of the vector are expressed relative to the rotated axes \((x',y')\). In this case, the relation between old and new coordinates is

\begin{equation} \begin{pmatrix} x' \\ y' \end{pmatrix} = \begin{pmatrix} \cos\theta & \sin\theta \\ -\sin\theta & \cos\theta \end{pmatrix} \begin{pmatrix} x \\ y \end{pmatrix}. \end{equation}
Passive rotation: axes rotated, vector unchanged.
Figure 3.8. Passive rotation: axes rotated, vector unchanged.

3.13Rotations and Reflections in 3D

Rotations in three dimensions can be represented by special orthogonal matrices (\(\det M = +1\)). Reflections are also represented by orthogonal matrices, but with determinant \(-1\).

Rotation about the \(z\)-axis

A rotation by angle \(\theta\) about the \(z\)-axis is given by

\begin{equation} R_z(\theta) = \begin{pmatrix} \cos\theta & -\sin\theta & 0 \\ \sin\theta & \cos\theta & 0 \\ 0 & 0 & 1 \end{pmatrix}. \end{equation}

Rotation about the \(z\)-axis with reflection in the \(xy\)-plane

If we combine a rotation about \(z\) with a reflection through the \(xy\)-plane, the matrix becomes

\begin{equation} M = \begin{pmatrix} \cos\theta & -\sin\theta & 0 \\ \sin\theta & \cos\theta & 0 \\ 0 & 0 & -1 \end{pmatrix}. \end{equation}

This is an orthogonal matrix with determinant \(-1\).

Rotation about the \(y\)-axis

A rotation by angle \(\beta\) about the \(y\)-axis is

\begin{equation} R_y(\beta) = \begin{pmatrix} \cos\beta & 0 & \sin\beta \\ 0 & 1 & 0 \\ -\sin\beta & 0 & \cos\beta \end{pmatrix}. \end{equation}

Rotation about the \(x\)-axis

A rotation by angle \(\alpha\) about the \(x\)-axis is

\begin{equation} R_x(\alpha) = \begin{pmatrix} 1 & 0 & 0 \\ 0 & \cos\alpha & -\sin\alpha \\ 0 & \sin\alpha & \cos\alpha \end{pmatrix}. \end{equation}

General 3D Rotation

A general rotation in 3D can be expressed as a product of basic rotations:

\begin{equation} R(\theta, \beta, \alpha) = R_z(\theta)\, R_y(\beta)\, R_x(\alpha). \end{equation}
Remark
  • Each rotation preserves vector length: \(\left\|\vec{r}\right\| = \left\|R\vec{r}\right\|\).

  • The determinant distinguishes between a pure rotation (\(\det = +1\)) and a rotation combined with reflection (\(\det = -1\)).

  • The product of orthogonal matrices is also orthogonal.

3.14Linear Independence

Vectors

Definition - Linear Dependence

A set of vectors \(\{\vec{a}, \vec{b}, \vec{c}, \dots\}\) is called linearly dependent if there exist scalars \(k_1, k_2, k_3, \dots\), not all zero, such that

\begin{equation} k_1\vec{a} + k_2\vec{b} + k_3\vec{c} + \cdots = \vec{0}. \end{equation}
Definition - Linear Independence

A set of vectors is linearly independent if the only solution to

\begin{equation} k_1\vec{a} + k_2\vec{b} + k_3\vec{c} + \cdots = \vec{0} \end{equation}

is the trivial solution:

\begin{equation} k_1 = k_2 = k_3 = \cdots = 0. \end{equation}
Example

Let

\begin{equation} \vec{a} = \hat{i} + \hat{j}, \quad \vec{b} = \hat{i} + \hat{k}, \quad \vec{c} = 2\hat{i} + \hat{j} + \hat{k}. \end{equation}

Then

\begin{equation} \vec{a} + \vec{b} - \vec{c} = 0, \end{equation}

so \(\vec{a}, \vec{b}, \vec{c}\) are linearly dependent.

However, the standard basis vectors \(\hat{i}, \hat{j}, \hat{k}\) are linearly independent since

\begin{equation} a\hat{i} + b\hat{j} + c\hat{k} = 0 \quad \Rightarrow \quad a=b=c=0. \end{equation}

Functions and Linear Dependence

Definition - Linear Dependence of Functions

Functions \(f_1(x), f_2(x), \dots, f_n(x)\) are called linearly dependent on an interval \(I\) if there exist constants \(k_1, k_2, \dots, k_n\), not all zero, such that

\begin{equation} k_1 f_1(x) + k_2 f_2(x) + \cdots + k_n f_n(x) = 0 \quad \text{for all } x \in I. \end{equation}

If the only solution is \(k_1 = k_2 = \cdots = k_n = 0\), then the functions are linearly independent on \(I\).

Wronskian Test for Independence

Definition - Wronskian

Given functions \(f_1, f_2, \dots, f_n\) that are \((n-1)\)-times differentiable, their Wronskian is defined as the determinant

\begin{equation} W(x) = \begin{vmatrix} f_1(x) & f_2(x) & \cdots & f_n(x) \\ f_1'(x) & f_2'(x) & \cdots & f_n'(x) \\ \vdots & \vdots & \ddots & \vdots \\ f_1^{(n-1)}(x) & f_2^{(n-1)}(x) & \cdots & f_n^{(n-1)}(x) \end{vmatrix}. \end{equation}
Theorem - Wronskian Test

If \(W(x) \neq 0\) for at least one point (or on some subinterval) of the interval \(I\), then the functions \(f_1, f_2, \dots, f_n\) are linearly independent on \(I\).

Example

Consider the functions

\begin{equation} f_1(x) = 1, \quad f_2(x) = x, \quad f_3(x) = \sin(x). \end{equation}

The Wronskian is

\begin{equation} W = \begin{vmatrix} 1 & x & \sin(x) \\ 0 & 1 & \cos(x) \\ 0 & 0 & -\sin(x) \end{vmatrix}. \end{equation}

Expanding the determinant:

\begin{equation} W = (1)(1)(-\sin(x)) = -\sin(x). \end{equation}

Since \(W(x) \neq 0\) (for \(x \neq n\pi\)), the functions are linearly independent.

Remark

Linear independence is important because it tells us whether a set of functions (or vectors) provides genuinely new information. If functions are linearly dependent, then at least one of them can be expressed as a combination of the others, meaning it does not add anything new.

  • In differential equations, solutions are only useful if they are linearly independent. For example, the general solution of a second-order linear ODE requires two linearly independent solutions.

  • In Fourier series or orthogonal expansions, independence ensures that different basis functions represent different "directions" in function space.

  • In linear algebra, linear independence guarantees that a basis spans the space without redundancy, so every vector (or function) can be uniquely expressed as a combination of basis elements.

In short, linear independence is what allows us to build efficient and non-redundant representations of mathematical objects.

3.15Homogeneous Equations

General Form

A system of linear equations can be written as

\begin{equation} M \vec{x} = \vec{b}. \end{equation}

If \(\vec{b} = \vec{0}\), the system is called a homogeneous system:

\begin{equation} M \vec{x} = \vec{0}. \end{equation}

Basic Properties

Example

Consider the system

\begin{equation} \begin{cases} x+y=0, \\ x-y=0. \end{cases} \end{equation}

In matrix form:

\begin{equation} \begin{pmatrix} 1 & 1 \\ 1 & -1 \end{pmatrix} \begin{pmatrix} x \\ y \end{pmatrix} = \begin{pmatrix} 0 \\ 0 \end{pmatrix}. \end{equation}

Here \(\operatorname{rank}(M)=2=\text{Number unknowns}\). Thus, the only solution is the trivial one: \(\vec{x} = \vec{0}\).

Example

Consider the system

\begin{equation} \begin{cases} x+y=0, \\ 2x+2y=0. \end{cases} \end{equation}

In matrix form:

\begin{equation} \begin{pmatrix} 1 & 1 \\ 2 & 2 \end{pmatrix} \begin{pmatrix} x \\ y \end{pmatrix} = \begin{pmatrix} 0 \\ 0 \end{pmatrix}. \end{equation}

Here \(\operatorname{rank}(M)=1 < \text{Number unknowns}=2\). Thus, the system has infinitely many non-trivial solutions, e.g.

\begin{equation} x = -y. \end{equation}
Theorem - Non-Trivial Solutions of Homogeneous Systems

A homogeneous system of linear equations

\begin{equation} M\vec{x} = \vec{0}, \end{equation}

where \(M\) is an \(n \times n\) matrix, has non-trivial solutions (\(\vec{x} \neq \vec{0}\)) if and only if

\begin{equation} \det(M) = 0. \end{equation}

Equivalently, the system has only the trivial solution \(\vec{x} = \vec{0}\) when \(\det(M) \neq 0\).

3.16Eigenvalues, Eigenvectors, and Matrix Diagonalization

From Linear Systems to Eigenvalue Problem

A general system of linear equations can be written as

\begin{equation} M \vec{x} = \vec{b}. \end{equation}

A special case occurs when the vector on the right-hand side is proportional to \(\vec{x}\), i.e.

\begin{equation} \vec{b} = \lambda \vec{x}. \end{equation}

Then

\begin{equation} M \vec{x} = \lambda \vec{x}. \end{equation}

This is called the eigenvalue problem, where

Rearranging,

\begin{equation} (M - \lambda I)\vec{x} = \vec{0}. \end{equation}

This is a homogeneous system. For non-trivial solutions to exist, we require

\begin{equation} \det(M - \lambda I) = 0, \end{equation}

which is called the characteristic equation.

The roots of this equation give the eigenvalues of \(M\). The corresponding eigenvectors are obtained by solving \((M-\lambda I)\vec{x}=0\).

Example - A \(2\times 2\) Matrix

Find the eigenvalues and normalized eigenvectors of

\begin{equation} M = \begin{pmatrix} 5 & -2 \\ -2 & 2 \end{pmatrix}. \end{equation}

Solution.

Step 1. Solve the characteristic equation.

\begin{equation} \det(M - \lambda I) = \begin{vmatrix} 5-\lambda & -2 \\ -2 & 2-\lambda \end{vmatrix} = (5-\lambda)(2-\lambda) - 4. \end{equation}

Expanding,

\begin{equation} \lambda^2 - 7\lambda + 6 = 0 \quad \Rightarrow \quad (\lambda-6)(\lambda-1)=0. \end{equation}

Thus, the eigenvalues are

\begin{equation} \lambda_1 = 1, \qquad \lambda_2 = 6. \end{equation}

Step 2. Eigenvector for \(\lambda_1=1\).

Solve

\begin{equation} (M-I)\vec{x} = 0, \qquad \begin{pmatrix} 4 & -2 \\ -2 & 1 \end{pmatrix} \begin{pmatrix} x \\ y \end{pmatrix} = \begin{pmatrix}0 \\ 0\end{pmatrix}. \end{equation}

This gives \(y=2x\). Take \(x=1\), then

\begin{equation} \vec{v}_1 = \begin{pmatrix}1 \\ 2\end{pmatrix}. \end{equation}

Normalize:

\begin{equation} \left\|\vec{v}_1\right\| = \sqrt{1^2+2^2} = \sqrt{5}, \qquad \hat{v}_1 = \frac{1}{\sqrt{5}}\begin{pmatrix}1 \\ 2\end{pmatrix}. \end{equation}

Step 3. Eigenvector for \(\lambda_2=6\).

Solve

\begin{equation} (M-6I)\vec{x} = 0, \qquad \begin{pmatrix} -1 & -2 \\ -2 & -4 \end{pmatrix} \begin{pmatrix} x \\ y \end{pmatrix} = \begin{pmatrix}0 \\ 0\end{pmatrix}. \end{equation}

This gives \(x=-2y\). Take \(y=1\), then

\begin{equation} \vec{v}_2 = \begin{pmatrix}-2 \\ 1\end{pmatrix}. \end{equation}

Normalize:

\begin{equation} \left\|\vec{v}_2\right\| = \sqrt{(-2)^2+1^2} = \sqrt{5}, \qquad \hat{v}_2 = \frac{1}{\sqrt{5}}\begin{pmatrix}-2 \\ 1\end{pmatrix}. \end{equation}

Orthogonality

Notice

\begin{equation} \hat{v}_1 \cdot \hat{v}_2 = \frac{1}{5} \begin{pmatrix} 1 & 2\end{pmatrix} \begin{pmatrix}-2 \\ 1\end{pmatrix} = \frac{-2+2}{5} = 0. \end{equation}

Thus, \(\hat{v}_1\) and \(\hat{v}_2\) are orthogonal and normalized. This was not a coincidence: \(M\) is symmetric, and the eigenvectors of a real symmetric matrix belonging to distinct eigenvalues are always orthogonal. That fact is why symmetric matrices are so prominent in physics — moments of inertia, stress tensors and quantum observables are all symmetric (or Hermitian), and each is guaranteed a set of perpendicular principal axes.

Matrix Diagonalization

If a matrix \(M\) has \(n\) linearly independent eigenvectors, then it can be diagonalized. That is, there exists a matrix \(C\) such that

\begin{equation} C^{-1} M C = D, \end{equation}

where \(D\) is a diagonal matrix.

Explicitly,

\begin{equation} C = \begin{bmatrix} \vec{v}_1 & \vec{v}_2 & \cdots & \vec{v}_n \end{bmatrix}, \qquad D = \begin{pmatrix} \lambda_1 & 0 & \cdots & 0 \\ 0 & \lambda_2 & \cdots & 0 \\ \vdots & \vdots & \ddots & \vdots \\ 0 & 0 & \cdots & \lambda_n \end{pmatrix}. \end{equation}
Example

From the previous example with

\begin{equation} M = \begin{pmatrix} 5 & -2 \\ -2 & 2 \end{pmatrix}, \end{equation}

we found eigenvalues \(\lambda_1=1\), \(\lambda_2=6\), with normalized eigenvectors

\begin{equation} \hat{v}_1 = \tfrac{1}{\sqrt{5}}\begin{pmatrix} 1 \\ 2\end{pmatrix}, \qquad \hat{v}_2 = \tfrac{1}{\sqrt{5}}\begin{pmatrix}-2 \\ 1\end{pmatrix}. \end{equation}

Place them as the columns of \(C\), in the same order as the eigenvalues are listed in \(D\):

\begin{equation} C = \frac{1}{\sqrt{5}} \begin{pmatrix} 1 & -2 \\ 2 & 1 \end{pmatrix}, \qquad D = \begin{pmatrix} 1 & 0 \\ 0 & 6 \end{pmatrix}. \end{equation}

The order is not optional: swapping the columns of \(C\) swaps the diagonal entries of \(D\). Since the eigenvectors are orthonormal, \(C\) is orthogonal and \(C^{-1} = C^{T}\), which makes the check easy:

\begin{equation} C^{T} M C = \frac{1}{5} \begin{pmatrix} 1 & 2 \\ -2 & 1\end{pmatrix} \begin{pmatrix} 5 & -2 \\ -2 & 2\end{pmatrix} \begin{pmatrix} 1 & -2 \\ 2 & 1\end{pmatrix} = \begin{pmatrix} 1 & 0 \\ 0 & 6\end{pmatrix} = D . \end{equation}

Initially, in the standard \(x,y\)-coordinate system, the matrix \(M\) is not diagonal, so the action of \(M\) mixes the two coordinates.

By finding eigenvectors, we identify new directions (the eigenvector directions) along which \(M\) acts by simple stretching (scaling) without mixing.

Placing the eigenvectors as columns of \(C\) gives a new coordinate system aligned with these eigenvector directions. In this new system:

\begin{equation} C^{-1}MC = D, \end{equation}

and the matrix becomes diagonal.

Geometrically: \(C\) is an orthogonal matrix (\(C^T C = I\)), so it represents a rotation of axes. This rotation “re-orients” the coordinate system so that the complicated mixing of \(M\) in the \(x,y\) basis becomes pure stretching along the new axes.

Degeneracy

If two or more eigenvalues of a matrix are equal, the eigenvalue is said to be degenerate. In this case, there may be more than one linearly independent eigenvector associated with the same eigenvalue.

Example

Consider

\begin{equation} M = \begin{pmatrix} 1 & -4 & 2 \\ -4 & 1 & -2 \\ 2 & -2 & -2 \end{pmatrix}. \end{equation}

The eigenvalues are

\begin{equation} \lambda = 6, \quad -3, \quad -3. \end{equation}
  • For \(\lambda=6\): an eigenvector is

    \begin{equation} \vec{v}_1 = \begin{pmatrix} 2 \\ -2 \\ 1 \end{pmatrix}. \end{equation}
  • For the degenerate eigenvalue \(\lambda=-3\): two linearly independent eigenvectors are

    \begin{equation} \vec{v}_2 = \begin{pmatrix} 1 \\ 1 \\ 0 \end{pmatrix}, \qquad \vec{v}_3 = \begin{pmatrix} -1 \\ 0 \\ 2 \end{pmatrix}. \end{equation}

Thus, the eigenspace corresponding to \(\lambda=-3\) is two-dimensional.

Remark

Degeneracy often arises in physics due to symmetries (e.g., rotational invariance). In such cases, the set of eigenvectors corresponding to a degenerate eigenvalue spans a subspace, and any linear combination of them is also an eigenvector.

3.16.5Application Diagonalization: Vibrations of a Linear Triatomic Molecule

Consider a linear triatomic molecule with three atoms connected by springs (see Figure 3.9). The outer atoms each have mass \(m\), and the central atom has mass \(M\). The spring constant is \(k\).

Model of a linear triatomic molecule with masses m, M, m connected by springs.
Figure 3.9. Model of a linear triatomic molecule with masses \(m, M, m\) connected by springs.

Let the displacements from equilibrium be denoted by \(x, y, z\) for the left, middle, and right masses respectively. We are interested in finding the normal modes of vibration and the corresponding frequencies.

Potential Energy and Equations of Motion

The potential energy stored in the springs is

\begin{align} V &= \tfrac{1}{2}k(x-y)^2 + \tfrac{1}{2}k(y-z)^2 \\ &= \tfrac{1}{2}k\big(x^2 + 2y^2 + z^2 - 2xy - 2yz\big). \end{align}

The equations of motion follow from Newton’s second law:

\begin{align} m\ddot{x} &= -\frac{\partial V}{\partial x} = -k(x-y), \\ M\ddot{y} &= -\frac{\partial V}{\partial y} = -k(2y-x-z), \\ m\ddot{z} &= -\frac{\partial V}{\partial z} = -k(z-y). \end{align}

Normal Mode Ansatz

We seek normal mode solutions of the form

\begin{equation} x = X e^{i\omega t}, \qquad y = Y e^{i\omega t}, \qquad z = Z e^{i\omega t}. \end{equation}

This leads to the eigenvalue problem

\begin{equation} \begin{pmatrix} 1 & -1 & 0 \\ -\tfrac{m}{M} & \tfrac{2m}{M} & -\tfrac{m}{M} \\ 0 & -1 & 1 \end{pmatrix} \begin{pmatrix}X\\Y\\Z\end{pmatrix} = \frac{m \omega^2}{k} \begin{pmatrix}X\\Y\\Z\end{pmatrix}. \end{equation}

Let

\begin{equation} \lambda = \frac{m\omega^2}{k}. \end{equation}

The eigenvalues of this matrix are

\begin{equation} \lambda = 0, \qquad \lambda = 1, \qquad \lambda = 1 + \frac{2m}{M}. \end{equation}

Modes by Symmetry

  1. Translation (zero mode):

    \begin{equation} \omega_0 = 0, \qquad (X:Y:Z) = (1:1:1), \qquad \hat{\mathbf v}_0=\frac{1}{\sqrt{3}} \begin{pmatrix}1\\[2pt]1\\[2pt]1\end{pmatrix}. \end{equation}
  2. Symmetric stretch:

    \begin{equation} \omega_- = \sqrt{\tfrac{k}{m}}, \qquad (X:Y:Z) = (1:0:-1), \qquad \hat{\mathbf v}_-=\frac{1}{\sqrt{2}} \begin{pmatrix}1\\[2pt]0\\[2pt]-1\end{pmatrix}. \end{equation}
  3. Antisymmetric stretch:

    \begin{equation} \omega_+ = \sqrt{\tfrac{k}{m}\left(1 + \tfrac{2m}{M}\right)}, \qquad (X:Y:Z) = \Big(1:-\tfrac{2m}{M}:1\Big), \end{equation}
    \begin{equation} \hat{\mathbf v}_+=\frac{1}{\sqrt{\,2+4\left(\tfrac{m}{M}\right)^2\,}} \begin{pmatrix}1\\[2pt]-\tfrac{2m}{M}\\[2pt]1\end{pmatrix}. \end{equation}

Carbon dioxide is the standard example, since \(\mathrm{O}=\mathrm{C}=\mathrm{O}\) is linear and its outer atoms have equal mass: \(m = 16\) for oxygen and \(M = 12\) for carbon. Putting those numbers in gives \(\omega_+/\omega_- = \sqrt{1 + 2m/M} = 1.92\), against the measured ratio \(2349/1333 = 1.76\) for the two stretching bands of \(\mathrm{CO_2}\) — close, for a model in which the molecule is three masses on two ideal springs. Water is not an example: \(\mathrm{H_2O}\) is bent through about \(104.5^\circ\), and a bent molecule needs the two-dimensional problem.

The three normal modes of a linear triatomic molecule, drawn for CO2. Faint uprights mark the rest positions. In the symmetric stretch the carbon does not move at all and the two oxygens swing out and back together, so both bonds lengthen and shorten in step. In the antisymmetric stretch the oxygens move the same way as each other and the carbon recoils the other way, so one bond stretches while the other compresses — which is why it is the faster of the two. The translation is the eigenvector with =0: the molecule drifts and no bond changes length at all, which is why it stores no energy and is not a vibration. This model allows motion only along the axis, so a real molecule's bending mode does not appear.
Figure 3.10. The three normal modes of a linear triatomic molecule, drawn for \(\mathrm{CO_2}\). Faint uprights mark the rest positions. In the symmetric stretch the carbon does not move at all and the two oxygens swing out and back together, so both bonds lengthen and shorten in step. In the antisymmetric stretch the oxygens move the same way as each other and the carbon recoils the other way, so one bond stretches while the other compresses — which is why it is the faster of the two. The translation is the eigenvector with \(\omega=0\): the molecule drifts and no bond changes length at all, which is why it stores no energy and is not a vibration. This model allows motion only along the axis, so a real molecule's bending mode does not appear.

3.17General Vector Spaces

Up to now, we have mostly thought of vectors as arrows in 2D or 3D space. However, the concept of a vector is much broader. Many mathematical objects (functions, polynomials, matrices, sequences) behave like vectors as long as they satisfy the same algebraic rules of addition and scalar multiplication. Such collections of objects are called vector spaces.

Definition of a Vector Space

Definition

A vector space over the real (or complex) numbers is a set of objects \( \mathcal{V} = \{ U,V,W,\dots \} \), called vectors, together with two operations:

  1. Vector addition: \( U+V \in \mathcal{V} \) for all \(U,V \in \mathcal{V}\),

  2. Scalar multiplication: \( kV \in \mathcal{V} \) for any scalar \(k\).

These operations must satisfy the following axioms:

  1. Closure: \(U+V \in \mathcal{V}\).

  2. Commutativity: \(U+V = V+U\).

  3. Associativity: \(U+(V+W) = (U+V)+W\).

  4. Zero vector: \(\exists \, \vec{0} \in \mathcal{V}\) such that \(V+\vec{0}=V\).

  5. Additive inverse: For every \(V\in \mathcal{V}\), there exists \(-V\) such that \(V+(-V)=0\).

  6. Distributive properties:

    \begin{equation} k(U+V) = kU+kV, \quad (k_1+k_2)V = k_1V+k_2V. \end{equation}
  7. Associativity of scalar multiplication:

    \begin{equation} (k_1 k_2)V = k_1(k_2 V). \end{equation}
  8. Identity for scalar multiplication:

    \begin{equation} 1 \cdot V = V, \qquad 0 \cdot V = \vec{0}. \end{equation}

Examples of Vector Spaces

Example - Polynomials

The set of all polynomials of degree \(\leq 3\),

\begin{equation} f(x) = a_0 + a_1 x + a_2 x^2 + a_3 x^3, \end{equation}

forms a vector space. The basis is

\begin{equation} \{1, x, x^2, x^3\}. \end{equation}

Any polynomial of degree \(\leq 3\) can be written as a linear combination of these basis elements.

Example - Functions

The set \(\{ e^{ix}, e^{-ix}, \sin(x), \cos(x) \}\) spans a vector space of functions. A basis is \(\{\sin(x), \cos(x)\}\), or equivalently, \(\{e^{ix}, e^{-ix}\}\).

Example - Matrices

The set of all \(2\times 2\) matrices with real entries is a vector space. For example, the basis can be chosen as

\begin{equation} E_{11} = \begin{pmatrix}1&0\\0&0\end{pmatrix}, \quad E_{12} = \begin{pmatrix}0&1\\0&0\end{pmatrix}, \quad E_{21} = \begin{pmatrix}0&0\\1&0\end{pmatrix}, \quad E_{22} = \begin{pmatrix}0&0\\0&1\end{pmatrix}. \end{equation}

3.18Bra–Ket Notation and Inner/Outer Products

Motivation

So far, we have written the dot product of two vectors \(\vec{a}, \vec{b}\) as

\begin{equation} \vec{a}\cdot \vec{b} = \sum_i a_i b_i. \end{equation}

In quantum mechanics and linear algebra, it is often convenient to use the Dirac notation, also called bra–ket notation, which provides a compact and powerful way to express inner and outer products.

Kets and Bras

A vector is written as a ket:

\begin{equation} |\! a \rangle \equiv \begin{pmatrix} a_1 \\ a_2 \\ \vdots \\ a_n \end{pmatrix}. \end{equation}

Its conjugate transpose is called a bra:

\begin{equation} \langle a \!| \equiv \big(|a\rangle\big)^\dagger = \begin{pmatrix} a_1^* & a_2^* & \cdots & a_n^* \end{pmatrix}. \end{equation}

Inner Product (Dot Product)

The dot product (inner product) of two vectors \(|a\rangle, |b\rangle\) is written as

\begin{equation} \langle a|b \rangle = \sum_i a_i^* b_i. \end{equation}

Thus, the ordinary dot product

\begin{equation} \vec{a}\cdot \vec{b} = \langle a|b \rangle. \end{equation}

Outer Product

The outer product of two vectors is written as

\begin{equation} |a\rangle \langle b| = \begin{pmatrix} a_1 \\ a_2 \\ \vdots \\ a_n \end{pmatrix} \begin{pmatrix} b_1^* & b_2^* & \cdots & b_n^* \end{pmatrix}. \end{equation}

This gives an \(n\times n\) matrix whose \(ij\)-th entry is \(a_i b_j^*\).

Completeness Relation

For a complete set of orthonormal basis vectors \(\{ |e_i\rangle \}\),

\begin{equation} \sum_i |e_i\rangle \langle e_i| = I. \end{equation}

This is called the completeness relation.

Example

In 3D space, the standard basis is

\begin{equation} |i\rangle = \begin{pmatrix}1\\0\\0\end{pmatrix}, \quad |j\rangle = \begin{pmatrix}0\\1\\0\end{pmatrix}, \quad |k\rangle = \begin{pmatrix}0\\0\\1\end{pmatrix}. \end{equation}

Then

\begin{equation} |i\rangle \langle i| + |j\rangle \langle j| + |k\rangle \langle k| = \begin{pmatrix}1&0&0\\0&1&0\\0&0&1\end{pmatrix} = I. \end{equation}

Summary

3.19Hilbert Spaces: Inner Product, Norm, and Orthogonality

Inner Product

For functions \(A(x), B(x)\) defined on an interval \([a,b]\), the inner product is defined as

\begin{equation} \langle A(x), B(x) \rangle = \int_a^b A^*(x) B(x)\, dx, \end{equation}

where \(A^*(x)\) is the complex conjugate of \(A(x)\).

Norm

The norm (or length) of a function is

\begin{equation} \|A\|^2 = \langle A, A \rangle = \int_a^b A^*(x) A(x)\, dx. \end{equation}

Orthogonality

Two functions are orthogonal if

\begin{equation} \int_a^b A^*(x) B(x)\, dx = 0. \end{equation}

Properties of Inner Product Spaces

An inner product space is a vector space with an additional inner product that satisfies:

  1. Conjugate symmetry: \(\langle A, B \rangle^* = \langle B, A \rangle\).

  2. Linearity in the second argument:

    \begin{equation} \langle A, \alpha B + \beta C \rangle = \alpha \langle A,B \rangle + \beta \langle A,C \rangle. \end{equation}
  3. Antilinearity in the first argument:

    \begin{equation} \langle \alpha A + \beta B, C \rangle = \alpha^* \langle A,C \rangle + \beta^* \langle B,C \rangle. \end{equation}
  4. Positive definiteness:

    \begin{equation} \langle A,A \rangle \geq 0, \qquad \langle A,A \rangle = 0 \iff A=0. \end{equation}

Hilbert Space

A Hilbert space is an inner product space that is also complete, meaning that all Cauchy sequences converge within the space. An important example is the space of square-integrable functions:

\begin{equation} L^2[a,b] = \Big\{ f(x) \; \big| \; \int_a^b |f(x)|^2 dx < \infty \Big\}. \end{equation}

Functions in \(L^2\) can be normalized so that

\begin{equation} \langle f, f \rangle = \int_{-\infty}^{\infty} |f(x)|^2 dx = 1. \end{equation}

Orthonormal Bases

A set of functions \(\{ f_n(x) \}\) is orthonormal if

\begin{equation} \langle f_m, f_n \rangle = \delta_{mn}. \end{equation}

Any function \(g(x)\) in the Hilbert space can be expanded as a linear combination:

\begin{equation} g(x) = \sum_{n=1}^\infty c_n f_n(x), \qquad c_n = \langle f_n, g \rangle. \end{equation}

For example, on the interval \([-\pi,\pi]\), the set

\begin{equation} f_n(x) = \cos(nx), \; \sin(nx), \qquad n=1,2,3,\dots \end{equation}

forms an orthogonal basis under the inner product

\begin{equation} \int_{-\pi}^{\pi} \cos(mx) \cos(nx)\, dx = \pi \delta_{mn}. \end{equation}

If the set \(\{f_n\}\) is complete, then

\begin{equation} \sum_{n} | \langle f_n, f \rangle |^2 = \langle f,f \rangle. \end{equation}

Schwarz’s Inequality

For any two vectors (functions) \(A, B\) in an inner product space,

\begin{equation} |\langle A, B \rangle|^2 \leq \langle A,A \rangle \, \langle B,B \rangle. \end{equation}

This is a fundamental inequality that ensures consistency of the inner product structure.

3.20Gram–Schmidt Method of Orthonormalization

Motivation

Given a set of linearly independent vectors

\begin{equation} \{|A\rangle, |B\rangle, |C\rangle\}, \end{equation}

we want to construct an orthonormal basis

\begin{equation} \{|e_1\rangle, |e_2\rangle, |e_3\rangle\}. \end{equation}

The Gram–Schmidt procedure provides a systematic way to do this.

Procedure

  1. Start with

    \begin{equation} |e_1\rangle = \frac{|A\rangle}{\sqrt{\langle A|A\rangle}}. \end{equation}
  2. Subtract from \(|B\rangle\) its projection onto \(|e_1\rangle\):

    \begin{equation} |e_2'\rangle = |B\rangle - \langle e_1|B\rangle |e_1\rangle, \qquad |e_2\rangle = \frac{|e_2'\rangle}{\sqrt{\langle e_2'|e_2'\rangle}}. \end{equation}
  3. Subtract from \(|C\rangle\) its projections onto both \(|e_1\rangle\) and \(|e_2\rangle\):

    \begin{equation} |e_3'\rangle = |C\rangle - \langle e_1|C\rangle |e_1\rangle - \langle e_2|C\rangle |e_2\rangle, \qquad |e_3\rangle = \frac{|e_3'\rangle}{\sqrt{\langle e_3'|e_3'\rangle}}. \end{equation}

At each step, we subtract projections to guarantee orthogonality, and then normalize to guarantee unit length.

Example - Gram–Schmidt orthonormalization

Suppose we start with

\begin{equation} |v_1\rangle = \begin{pmatrix}1 \\ 1 \\ 0\end{pmatrix}, \qquad |v_2\rangle = \begin{pmatrix}-1 \\ 0 \\ 2\end{pmatrix}, \qquad |v_3\rangle = \begin{pmatrix}0 \\ 1 \\ 1\end{pmatrix}. \end{equation}

Solution.

Step 1: Construct \(|e_1\rangle\).

\begin{equation} |e_1\rangle = \frac{|v_1\rangle}{\sqrt{\langle v_1|v_1\rangle}} = \frac{1}{\sqrt{2}}\begin{pmatrix}1 \\ 1 \\ 0\end{pmatrix}. \end{equation}

Step 2: Construct \(|e_2\rangle\).

\begin{equation} |e_2'\rangle = |v_2\rangle - \langle e_1|v_2\rangle |e_1\rangle. \end{equation}

Compute

\begin{equation} \langle e_1|v_2\rangle = \frac{1}{\sqrt{2}}(1 \cdot -1 + 1 \cdot 0 + 0 \cdot 2) = -\frac{1}{\sqrt{2}}. \end{equation}

So

\begin{equation} |e_2'\rangle = \begin{pmatrix}-1 \\ 0 \\ 2\end{pmatrix} - \left(-\tfrac{1}{\sqrt{2}}\right)\frac{1}{\sqrt{2}} \begin{pmatrix}1 \\ 1 \\ 0\end{pmatrix} = \begin{pmatrix}-1 \\ 0 \\ 2\end{pmatrix} + \tfrac{1}{2}\begin{pmatrix}1 \\ 1 \\ 0\end{pmatrix}. \end{equation}
\begin{equation} |e_2'\rangle = \begin{pmatrix}-\tfrac{1}{2} \\ \tfrac{1}{2} \\ 2\end{pmatrix}. \end{equation}

Normalize. Its squared length is \(\tfrac14+\tfrac14+4=\tfrac92\), so \(\||e_2'\rangle\| = 3/\sqrt2\) and

\begin{equation} |e_2\rangle = \frac{\sqrt2}{3}\begin{pmatrix}-\tfrac12 \\ \tfrac12 \\ 2\end{pmatrix} = \frac{1}{3\sqrt{2}}\begin{pmatrix}-1 \\ 1 \\ 4\end{pmatrix}. \end{equation}

Step 3: Construct \(|e_3\rangle\).

Now subtract the projections onto both previous directions. The two inner products are

\begin{equation} \langle e_1|v_3\rangle = \frac{1}{\sqrt2}(0+1+0) = \frac{1}{\sqrt2}, \qquad \langle e_2|v_3\rangle = \frac{1}{3\sqrt2}(0+1+4) = \frac{5}{3\sqrt2}, \end{equation}

so

\begin{equation} |e_3'\rangle = \begin{pmatrix}0\\1\\1\end{pmatrix} - \frac{1}{2}\begin{pmatrix}1\\1\\0\end{pmatrix} - \frac{5}{18}\begin{pmatrix}-1\\1\\4\end{pmatrix} = \frac{1}{9}\begin{pmatrix}-2\\2\\-1\end{pmatrix}. \end{equation}

Its length is \(\tfrac19\sqrt{4+4+1}=\tfrac13\), giving

\begin{equation} |e_3\rangle = \frac{1}{3}\begin{pmatrix}-2\\2\\-1\end{pmatrix}. \end{equation}

As a check, every pair is orthogonal and every vector has unit length:

\begin{equation} \langle e_1|e_3\rangle = \frac{1}{3\sqrt2}(-2+2+0) = 0, \qquad \langle e_2|e_3\rangle = \frac{1}{9\sqrt2}(2+2-4) = 0 . \end{equation}
  • Gram–Schmidt converts a linearly independent set of vectors into an orthonormal set.

  • In bra–ket notation: projections are written as \(\langle e_i|v\rangle |e_i\rangle\).

  • Resulting vectors \(\{|e_i\rangle\}\) form an orthonormal basis: \(\langle e_i|e_j\rangle = \delta_{ij}\).

  • The construction is the reason an orthonormal basis can always be assumed to exist, which is used freely in quantum mechanics.

3.21Applications of Linear Algebra

Linear algebra earns its place in a physics course for a reason that is easy to miss while learning the mechanics of row reduction: most of physics is linear, or is studied by linearising it. Small oscillations about equilibrium, circuit networks, coupled differential equations, rigid-body rotation and all of quantum mechanics are linear problems, and a linear problem in \(n\) variables is a matrix.

Remark

Notice how often the same two ideas did the work in this chapter. First, a matrix is not a table of numbers but a linear transformation, and the numbers only appear once a basis is chosen. Second, the natural basis for a problem is usually the eigenvector basis, in which the transformation stops mixing coordinates and simply stretches each axis. Almost every application above is an instance of choosing that better basis.

Summary Table

ObjectDefinitionWhat it is for
Augmented matrix\([M \mid \vec b]\)Row reduce to solve \(M\vec x = \vec b\).
RREFPivots \(=1\), zeros above and belowReads off the solution set directly.
Determinant\(\det M = \sum_j (-1)^{1+j} m_{1j}\det M^{(1j)}\)\(\det M \neq 0 \iff M\) invertible.
Inverse\(M M^{-1} = I\)Solves \(\vec x = M^{-1}\vec b\).
Dot product\(\vec a \cdot \vec b = ab\cos\theta = \sum_i a_ib_i\)Projection, work, orthogonality test.
Cross product\(|\vec a \times \vec b| = ab\sin\theta\)Area, torque, angular momentum.
Transpose\((M^{T})_{ij} = M_{ji}\)Symmetric if \(M^{T}=M\).
Hermitian conjugate\(M^{\dagger} = (M^{*})^{T}\)Hermitian if \(M^{\dagger}=M\); real eigenvalues.
Orthogonal matrix\(R^{T}R = I\)Rotations and reflections; preserves length.
Unitary matrix\(U^{\dagger}U = I\)The complex analogue; preserves probability.
Eigenvalue problem\(M\vec x = \lambda \vec x\), \(\det(M-\lambda I)=0\)Normal modes, principal axes, observables.
Diagonalisation\(C^{-1}MC = D\), columns of \(C\) are eigenvectorsDecouples the problem.
Linear independenceOnly the trivial combination gives \(\vec 0\)Tested by \(\det\), or the Wronskian for functions.

For the Interested Reader

If the manipulations in this chapter felt mechanical — row reduce, expand a determinant, solve a characteristic polynomial — the resources below are worth your time, because they explain what those manipulations mean. Everything listed is free.

Videos

The strongest single recommendation in these notes is 3Blue1Brown's Essence of Linear Algebra. It builds the whole subject visually, from the one idea that a matrix is a transformation of space, and it explains the geometry that our algebra leaves implicit. If you watch only two things, watch these:

Video

Vectors — Essence of Linear Algebra, Chapter 1

Video thumbnail for Vectors — Essence of Linear Algebra, Chapter 1Watch on YouTube

Open video on YouTube

Video

Linear transformations and matrices — Essence of Linear Algebra, Chapter 3

Video thumbnail for Linear transformations and matrices — Essence of Linear Algebra, Chapter 3Watch on YouTube

Open video on YouTube

The series happens to run almost section-for-section alongside this chapter. Watch each episode when you reach the matching topic here:

One more, from the same author's Differential Equations series rather than Essence of Linear Algebra, is the natural companion to our Functions of Matrices:

Video

How (and why) to raise \(e\) to the power of a matrix — 3Blue1Brown

Video thumbnail for How (and why) to raise \(e\) to the power of a matrix — 3Blue1BrownWatch on YouTube

Open video on YouTube

Websites

Remark

A note on how to use these. Watch for the geometry first — what a determinant, an eigenvector or a change of basis does to space — and let that picture carry the algebra. In this course we mainly want to diagonalise a matrix to find normal modes, and to recognise when a physical problem is secretly a linear one; the eigenvalue episodes and the change-of-basis episode are the most directly useful for that.