MathIsimple
LA-4.2
Available

Matrix Operations

Master the arithmetic of matrices: addition, multiplication, and transpose.

Learning Objectives
  • Perform matrix addition and scalar multiplication
  • Compute matrix products using the row-column formula
  • Understand matrix multiplication as composition of linear maps
  • Apply the associative and distributive properties
  • Recognize that matrix multiplication is NOT commutative
  • Compute and apply matrix transposes
  • Work with special matrices: identity, diagonal, triangular
  • Understand block matrix multiplication
  • Work with matrix polynomials
  • Identify zero divisors and non-commutativity examples
Prerequisites
  • Matrix representation of linear maps (LA-4.1)
  • Linear map composition (LA-3.1)
  • Vector space operations
  • Basic arithmetic

1. Matrix Addition and Scalar Multiplication

Before studying matrix multiplication, we define the simpler operations that make the space of matrices into a vector space.

Definition 4.3: Matrix Addition

Let A=(aij)A = (a_{ij}) and B=(bij)B = (b_{ij}) be m×nm \times n matrices over FF. Their sum is:

A+B=(aij+bij)m×nA + B = (a_{ij} + b_{ij})_{m \times n}

Addition is performed entry-by-entry. Matrices must have the same dimensions to be added.

Definition 4.4: Scalar Multiplication

For λF\lambda \in F and A=(aij)A = (a_{ij}):

λA=(λaij)m×n\lambda A = (\lambda a_{ij})_{m \times n}

Each entry is multiplied by the scalar.

Theorem 4.5: Vector Space Structure

The set Fm×nF^{m \times n} of all m×nm \times n matrices over FF forms a vector space with:

  • Zero element: the zero matrix O=(0)m×nO = (0)_{m \times n}
  • Additive inverse: A=(aij)-A = (-a_{ij})
  • Dimension: dimFm×n=mn\dim F^{m \times n} = mn
Remark 4.7: Connection to Linear Maps

These operations correspond to operations on linear maps. If AA represents σ\sigma and BB represents τ\tau, then:

  • A+BA + B represents σ+τ\sigma + \tau
  • λA\lambda A represents λσ\lambda \sigma

2. Matrix Multiplication

Matrix multiplication is defined to match composition of linear maps. This seemingly complex definition is exactly what makes [ST]=[S][T][S \circ T] = [S][T] work.

Definition 4.5: Matrix Multiplication

Let A=(aij)p×mA = (a_{ij})_{p \times m} and B=(bij)m×nB = (b_{ij})_{m \times n}. Their product C=ABC = AB is a p×np \times n matrix with:

cij=k=1maikbkj=ai1b1j+ai2b2j++aimbmjc_{ij} = \sum_{k=1}^{m} a_{ik} b_{kj} = a_{i1}b_{1j} + a_{i2}b_{2j} + \cdots + a_{im}b_{mj}

The (i,j)(i,j) entry is the dot product of row ii of AA with column jj of BB.

Remark 4.8: Dimension Requirements

For ABAB to be defined:

  • Columns of AA must equal rows of BB
  • If AA is p×mp \times m and BB is m×nm \times n, then ABAB is p×np \times n
  • Memory aid: (p×m)(m×n)=p×n(p \times \cancel{m})(\cancel{m} \times n) = p \times n
Theorem 4.6: Multiplication as Composition

Let σL(V1,V2)\sigma \in L(V_1, V_2) and τL(V2,V3)\tau \in L(V_2, V_3) with matrices BB and AA respectively. Then:

M(τσ)=M(τ)M(σ)=ABM(\tau \circ \sigma) = M(\tau) \cdot M(\sigma) = AB
Proof:

Let B1,B2,B3B_1, B_2, B_3 be bases for V1,V2,V3V_1, V_2, V_3. For basis vector εjB1\varepsilon_j \in B_1:

(τσ)(εj)=τ(σ(εj))=τ(k=1mbkjζk)=k=1mbkjτ(ζk)(\tau \circ \sigma)(\varepsilon_j) = \tau(\sigma(\varepsilon_j)) = \tau\left(\sum_{k=1}^m b_{kj} \zeta_k\right) = \sum_{k=1}^m b_{kj} \tau(\zeta_k)
=k=1mbkji=1paikηi=i=1p(k=1maikbkj)ηi= \sum_{k=1}^m b_{kj} \sum_{i=1}^p a_{ik} \eta_i = \sum_{i=1}^p \left(\sum_{k=1}^m a_{ik} b_{kj}\right) \eta_i

The coefficient of ηi\eta_i is kaikbkj=(AB)ij\sum_k a_{ik} b_{kj} = (AB)_{ij}.

3. Properties of Matrix Multiplication

Theorem 4.7: Algebraic Properties

Matrix multiplication satisfies:

  1. Associativity: (AB)C=A(BC)(AB)C = A(BC)
  2. Left distributivity: A(B+C)=AB+ACA(B + C) = AB + AC
  3. Right distributivity: (A+B)C=AC+BC(A + B)C = AC + BC
  4. Scalar compatibility: λ(AB)=(λA)B=A(λB)\lambda(AB) = (\lambda A)B = A(\lambda B)
  5. Identity: AI=IA=AAI = IA = A
Proof:

Associativity: Follows from associativity of function composition: (τσ)ρ=τ(σρ)(\tau \circ \sigma) \circ \rho = \tau \circ (\sigma \circ \rho).

Distributivity: Follows from τ(σ1+σ2)=τσ1+τσ2\tau \circ (\sigma_1 + \sigma_2) = \tau \circ \sigma_1 + \tau \circ \sigma_2.

Alternatively, verify directly using the summation formula for matrix entries.

Remark 4.9: Non-Commutativity

Matrix multiplication is NOT commutative! In general:

ABBAAB \neq BA

Several things can happen:

  • ABAB exists but BABA doesn't (different dimensions)
  • Both exist but have different dimensions
  • Both exist with same dimensions but are unequal
Example 4.6: Non-Commutativity

Let A=(113101)A = \begin{pmatrix} 1 & 1 & -3 \\ 1 & 0 & -1 \end{pmatrix} and B=(031231)B = \begin{pmatrix} 0 & 3 \\ 1 & 2 \\ 3 & 1 \end{pmatrix}.

AB=(8232)(2×2)AB = \begin{pmatrix} -8 & 2 \\ -3 & 2 \end{pmatrix} \quad (2 \times 2)
BA=(3033154310)(3×3)BA = \begin{pmatrix} 3 & 0 & -3 \\ 3 & 1 & -5 \\ 4 & 3 & -10 \end{pmatrix} \quad (3 \times 3)

Not only are ABAB and BABA different, they have different dimensions!

4. Matrix Transpose

Definition 4.6: Transpose

The transpose of A=(aij)m×nA = (a_{ij})_{m \times n} is AT=(aji)n×mA^T = (a_{ji})_{n \times m}:

(AT)ij=Aji(A^T)_{ij} = A_{ji}

Rows become columns and columns become rows.

Theorem 4.8: Transpose Properties

For compatible matrices AA, BB and scalar λ\lambda:

  1. (AT)T=A(A^T)^T = A
  2. (A+B)T=AT+BT(A + B)^T = A^T + B^T
  3. (λA)T=λAT(\lambda A)^T = \lambda A^T
  4. (AB)T=BTAT(AB)^T = B^T A^T (order reverses!)
Proof:

Property 4: We verify that ((AB)T)ij=(BTAT)ij((AB)^T)_{ij} = (B^T A^T)_{ij}:

((AB)T)ij=(AB)ji=kAjkBki((AB)^T)_{ij} = (AB)_{ji} = \sum_k A_{jk} B_{ki}
(BTAT)ij=k(BT)ik(AT)kj=kBkiAjk(B^T A^T)_{ij} = \sum_k (B^T)_{ik} (A^T)_{kj} = \sum_k B_{ki} A_{jk}

These are equal since multiplication in FF is commutative.

Definition 4.7: Symmetric and Skew-Symmetric Matrices

A square matrix AA is:

  • Symmetric if AT=AA^T = A (i.e., aij=ajia_{ij} = a_{ji})
  • Skew-symmetric if AT=AA^T = -A (i.e., aij=ajia_{ij} = -a_{ji})
Theorem 4.9: Symmetric Decomposition

Any square matrix AA can be uniquely written as:

A=S+KA = S + K

where SS is symmetric and KK is skew-symmetric:

S=12(A+AT),K=12(AAT)S = \frac{1}{2}(A + A^T), \quad K = \frac{1}{2}(A - A^T)

5. Special Matrices

Definition 4.8: Identity Matrix

The n×nn \times n identity matrix InI_n has 1s on the diagonal and 0s elsewhere:

In=(100010001)I_n = \begin{pmatrix} 1 & 0 & \cdots & 0 \\ 0 & 1 & \cdots & 0 \\ \vdots & \vdots & \ddots & \vdots \\ 0 & 0 & \cdots & 1 \end{pmatrix}

Property: AIn=ImA=AAI_n = I_m A = A for any m×nm \times n matrix AA.

Definition 4.9: Diagonal Matrix

A diagonal matrix has non-zero entries only on the main diagonal:

D=diag(d1,d2,,dn)=(d1000d2000dn)D = \text{diag}(d_1, d_2, \ldots, d_n) = \begin{pmatrix} d_1 & 0 & \cdots & 0 \\ 0 & d_2 & \cdots & 0 \\ \vdots & \vdots & \ddots & \vdots \\ 0 & 0 & \cdots & d_n \end{pmatrix}
Theorem 4.10: Diagonal Matrix Properties

For diagonal matrices D=diag(d1,,dn)D = \text{diag}(d_1, \ldots, d_n) and E=diag(e1,,en)E = \text{diag}(e_1, \ldots, e_n):

  • DE=ED=diag(d1e1,,dnen)DE = ED = \text{diag}(d_1 e_1, \ldots, d_n e_n)
  • Dk=diag(d1k,,dnk)D^k = \text{diag}(d_1^k, \ldots, d_n^k)
  • Diagonal matrices commute with each other
Definition 4.10: Scalar Matrix

A scalar matrix is λI=diag(λ,λ,,λ)\lambda I = \text{diag}(\lambda, \lambda, \ldots, \lambda).

Key property: Scalar matrices commute with ALL matrices of the same size.

Definition 4.11: Triangular Matrices

A matrix is:

  • Upper triangular if aij=0a_{ij} = 0 for i>ji > j
  • Lower triangular if aij=0a_{ij} = 0 for i<ji < j

Products of upper (lower) triangular matrices are upper (lower) triangular.

6. Worked Examples

Example 1: Rotation Matrices

Problem: Show that Rθ1Rθ2=Rθ1+θ2R_{\theta_1} R_{\theta_2} = R_{\theta_1 + \theta_2}.

Solution:

Rθ1Rθ2=(cosθ1sinθ1sinθ1cosθ1)(cosθ2sinθ2sinθ2cosθ2)R_{\theta_1} R_{\theta_2} = \begin{pmatrix} \cos\theta_1 & -\sin\theta_1 \\ \sin\theta_1 & \cos\theta_1 \end{pmatrix} \begin{pmatrix} \cos\theta_2 & -\sin\theta_2 \\ \sin\theta_2 & \cos\theta_2 \end{pmatrix}
=(cosθ1cosθ2sinθ1sinθ2cosθ1sinθ2sinθ1cosθ2sinθ1cosθ2+cosθ1sinθ2sinθ1sinθ2+cosθ1cosθ2)= \begin{pmatrix} \cos\theta_1\cos\theta_2 - \sin\theta_1\sin\theta_2 & -\cos\theta_1\sin\theta_2 - \sin\theta_1\cos\theta_2 \\ \sin\theta_1\cos\theta_2 + \cos\theta_1\sin\theta_2 & -\sin\theta_1\sin\theta_2 + \cos\theta_1\cos\theta_2 \end{pmatrix}
=(cos(θ1+θ2)sin(θ1+θ2)sin(θ1+θ2)cos(θ1+θ2))=Rθ1+θ2= \begin{pmatrix} \cos(\theta_1+\theta_2) & -\sin(\theta_1+\theta_2) \\ \sin(\theta_1+\theta_2) & \cos(\theta_1+\theta_2) \end{pmatrix} = R_{\theta_1+\theta_2}
Example 2: Matrix Powers

Problem: Expand (A+λI)n(A + \lambda I)^n.

Solution: Since AA and λI\lambda I commute (A(λI)=(λI)A=λAA(\lambda I) = (\lambda I)A = \lambda A), we can use the binomial theorem:

(A+λI)n=k=0n(nk)Ak(λI)nk=k=0n(nk)λnkAk(A + \lambda I)^n = \sum_{k=0}^{n} \binom{n}{k} A^k (\lambda I)^{n-k} = \sum_{k=0}^{n} \binom{n}{k} \lambda^{n-k} A^k
Example 3: Zero Divisors

Problem: Find non-zero matrices AA, BB with AB=0AB = 0.

Solution:

A=(1111),B=(1111)A = \begin{pmatrix} 1 & 1 \\ 1 & 1 \end{pmatrix}, \quad B = \begin{pmatrix} 1 & -1 \\ -1 & 1 \end{pmatrix}
AB=(111+1111+1)=(0000)AB = \begin{pmatrix} 1-1 & -1+1 \\ 1-1 & -1+1 \end{pmatrix} = \begin{pmatrix} 0 & 0 \\ 0 & 0 \end{pmatrix}

This shows matrices can have zero divisors—unlike real numbers!

Example 4: Column Interpretation

Key insight: Column kk of ABAB equals AA times column kk of BB.

Each column of ABAB is a linear combination of columns of AA:

(AB)k=b1kA1+b2kA2++bmkAm(AB)_{\cdot k} = b_{1k} A_{\cdot 1} + b_{2k} A_{\cdot 2} + \cdots + b_{mk} A_{\cdot m}

This means the column space of ABAB is contained in the column space of AA.

7. Common Mistakes

Mistake 1: Assuming Commutativity

ABBAAB \neq BA in general. Never assume you can swap the order of matrix multiplication. Formulas like (A+B)2=A2+2AB+B2(A + B)^2 = A^2 + 2AB + B^2 are WRONG for matrices.

Mistake 2: Wrong Dimension Check

For ABAB, the COLUMNS of AA must match ROWS of BB. A common error is checking if both matrices are the same size.

Mistake 3: Transpose Order

(AB)T=BTAT(AB)^T = B^T A^T, NOT ATBTA^T B^T. The order reverses! Same for inverse: (AB)1=B1A1(AB)^{-1} = B^{-1} A^{-1}.

Mistake 4: Cancellation

AB=ACAB = AC does NOT imply B=CB = C. Cancellation fails because matrices can have non-trivial null spaces (zero divisors exist).

Mistake 5: Entry-wise Multiplication

Matrix multiplication is NOT entry-by-entry. The formula involves summing products along rows and columns. Entry-wise product (Hadamard product) is a different operation.

8. Matrix Polynomials

Definition 4.12: Matrix Polynomial

For a polynomial p(x)=amxm+am1xm1++a1x+a0p(x) = a_m x^m + a_{m-1} x^{m-1} + \cdots + a_1 x + a_0 and square matrix AA:

p(A)=amAm+am1Am1++a1A+a0Ip(A) = a_m A^m + a_{m-1} A^{m-1} + \cdots + a_1 A + a_0 I

where A0=IA^0 = I and Ak=AAAA^k = A \cdot A \cdots A (kk times).

Theorem 4.11: Polynomial Commutativity

For any polynomials f,gf, g and matrix AA:

f(A)g(A)=g(A)f(A)f(A) g(A) = g(A) f(A)

Matrix polynomials in the same matrix always commute.

Proof:

Since AjAk=Aj+k=AkAjA^j A^k = A^{j+k} = A^k A^j, powers of AA commute. Linearity extends this to all polynomials.

Corollary 4.4: Polynomial Commutativity with Different Matrices

If AB=BAAB = BA, then f(A)g(B)=g(B)f(A)f(A) g(B) = g(B) f(A) for any polynomials f,gf, g.

9. Key Takeaways

Row-Column Formula

(AB)ij=kAikBkj(AB)_{ij} = \sum_k A_{ik} B_{kj} — row ii of AA dotted with column jj of BB.

Composition Connection

[ST]=[S][T][S \circ T] = [S][T]. Matrix multiplication IS composition of linear maps.

Non-Commutativity

ABBAAB \neq BA in general. Order matters! Only scalar matrices commute with everything.

Transpose Reversal

(AB)T=BTAT(AB)^T = B^T A^T. Transpose and inverse both reverse multiplication order.

10. Quick Reference Summary

PropertyFormula
Matrix Product Entry(AB)ij=kAikBkj(AB)_{ij} = \sum_k A_{ik} B_{kj}
Associativity(AB)C=A(BC)(AB)C = A(BC)
DistributivityA(B+C)=AB+ACA(B+C) = AB + AC
Non-CommutativityABBAAB \neq BA in general
Transpose of Product(AB)T=BTAT(AB)^T = B^T A^T
IdentityAI=IA=AAI = IA = A
SymmetricAT=AA^T = A

11. Block Matrices

Definition 4.13: Block Matrix

A block matrix (or partitioned matrix) is a matrix viewed as composed of smaller matrices (blocks):

A=(A11A12A21A22)A = \begin{pmatrix} A_{11} & A_{12} \\ A_{21} & A_{22} \end{pmatrix}

where each AijA_{ij} is itself a matrix.

Theorem 4.12: Block Multiplication

If AA and BB are partitioned compatibly, then:

(A11A12A21A22)(B11B12B21B22)=(A11B11+A12B21A11B12+A12B22A21B11+A22B21A21B12+A22B22)\begin{pmatrix} A_{11} & A_{12} \\ A_{21} & A_{22} \end{pmatrix} \begin{pmatrix} B_{11} & B_{12} \\ B_{21} & B_{22} \end{pmatrix} = \begin{pmatrix} A_{11}B_{11} + A_{12}B_{21} & A_{11}B_{12} + A_{12}B_{22} \\ A_{21}B_{11} + A_{22}B_{21} & A_{21}B_{12} + A_{22}B_{22} \end{pmatrix}

The formula looks like scalar multiplication, but order matters within each term!

Remark 4.10: Compatible Partitioning

For block multiplication to work:

  • Column partitions of AA must match row partitions of BB
  • Each block product AikBkjA_{ik}B_{kj} must be well-defined
Example 4.7: Block Diagonal Matrices

Block diagonal matrices have a particularly simple structure:

(A00B)(C00D)=(AC00BD)\begin{pmatrix} A & 0 \\ 0 & B \end{pmatrix} \begin{pmatrix} C & 0 \\ 0 & D \end{pmatrix} = \begin{pmatrix} AC & 0 \\ 0 & BD \end{pmatrix}

Block diagonal matrices form a subalgebra: sums and products of block diagonal matrices are block diagonal.

12. Row and Column Interpretations

Matrix multiplication can be understood from multiple perspectives, each providing useful insights.

Theorem 4.13: Column View of Matrix Product

If B=(b1,b2,,bn)B = (b_1, b_2, \ldots, b_n) where bjb_j are the columns of BB, then:

AB=(Ab1,Ab2,,Abn)AB = (Ab_1, Ab_2, \ldots, Ab_n)

Each column of ABAB is AA times the corresponding column of BB.

Theorem 4.14: Row View of Matrix Product

If A=(a1Ta2TapT)A = \begin{pmatrix} a_1^T \\ a_2^T \\ \vdots \\ a_p^T \end{pmatrix} where aiTa_i^T are the rows of AA, then:

AB=(a1TBa2TBapTB)AB = \begin{pmatrix} a_1^T B \\ a_2^T B \\ \vdots \\ a_p^T B \end{pmatrix}

Each row of ABAB is the corresponding row of AA times BB.

Corollary 4.5: Column Space Inclusion

The column space of ABAB is contained in the column space of AA:

col(AB)col(A)\text{col}(AB) \subseteq \text{col}(A)
Corollary 4.6: Row Space Inclusion

The row space of ABAB is contained in the row space of BB:

row(AB)row(B)\text{row}(AB) \subseteq \text{row}(B)
Theorem 4.15: Outer Product Representation

Matrix multiplication can also be written as a sum of outer products:

AB=k=1makbkAB = \sum_{k=1}^m a_{\cdot k} b_{k \cdot}

where aka_{\cdot k} is column kk of AA and bkb_{k \cdot} is row kk of BB.

13. Additional Examples

Example: Nilpotent Matrix

Problem: Show that N=(010001000)N = \begin{pmatrix} 0 & 1 & 0 \\ 0 & 0 & 1 \\ 0 & 0 & 0 \end{pmatrix} is nilpotent.

Solution:

N2=(001000000),N3=(000000000)=ON^2 = \begin{pmatrix} 0 & 0 & 1 \\ 0 & 0 & 0 \\ 0 & 0 & 0 \end{pmatrix}, \quad N^3 = \begin{pmatrix} 0 & 0 & 0 \\ 0 & 0 & 0 \\ 0 & 0 & 0 \end{pmatrix} = O

NN is nilpotent of index 3: N3=0N^3 = 0 but N20N^2 \neq 0.

Example: Idempotent Matrix

Problem: Show that projection matrices are idempotent (P2=PP^2 = P).

Solution: For projection onto the line y=xy = x:

P=(1/21/21/21/2)P = \begin{pmatrix} 1/2 & 1/2 \\ 1/2 & 1/2 \end{pmatrix}
P2=(1/4+1/41/4+1/41/4+1/41/4+1/4)=(1/21/21/21/2)=PP^2 = \begin{pmatrix} 1/4 + 1/4 & 1/4 + 1/4 \\ 1/4 + 1/4 & 1/4 + 1/4 \end{pmatrix} = \begin{pmatrix} 1/2 & 1/2 \\ 1/2 & 1/2 \end{pmatrix} = P

Projecting twice is the same as projecting once.

Example: Involutory Matrix

Problem: Verify that A=(0110)A = \begin{pmatrix} 0 & 1 \\ 1 & 0 \end{pmatrix} is involutory (A2=IA^2 = I).

Solution:

A2=(0110)(0110)=(1001)=IA^2 = \begin{pmatrix} 0 & 1 \\ 1 & 0 \end{pmatrix}\begin{pmatrix} 0 & 1 \\ 1 & 0 \end{pmatrix} = \begin{pmatrix} 1 & 0 \\ 0 & 1 \end{pmatrix} = I

This is the swap/reflection matrix. Reflecting twice returns to the original.

Example: Matrix Equation

Problem: Solve A23A+2I=0A^2 - 3A + 2I = 0 for information about AA.

Solution: Factor: (AI)(A2I)=0(A - I)(A - 2I) = 0.

This means eigenvalues of AA are among {1,2}\{1, 2\}.

If AA is diagonalizable, then A=PDP1A = PDP^{-1} where DD has only 1s and 2s on the diagonal.

14. Theoretical Insights

Theorem 4.16: Ring Structure

The set of n×nn \times n matrices Mn(F)M_n(F) forms a ring with:

  • Additive identity: Zero matrix OO
  • Multiplicative identity: Identity matrix II
  • This ring is non-commutative for n2n \geq 2
  • This ring has zero divisors for n2n \geq 2
Remark 4.11: Differences from Number Rings

Unlike the ring of integers or real numbers:

  • AB=0AB = 0 does NOT imply A=0A = 0 or B=0B = 0
  • AB=ACAB = AC does NOT imply B=CB = C
  • AB=BAAB = BA is NOT generally true
  • (A+B)2A2+2AB+B2(A + B)^2 \neq A^2 + 2AB + B^2 in general
Theorem 4.17: Trace Properties

The trace function tr:Mn(F)F\text{tr}: M_n(F) \to F satisfies:

  • tr(A+B)=tr(A)+tr(B)\text{tr}(A + B) = \text{tr}(A) + \text{tr}(B)
  • tr(λA)=λtr(A)\text{tr}(\lambda A) = \lambda \text{tr}(A)
  • tr(AB)=tr(BA)\text{tr}(AB) = \text{tr}(BA) (trace of product is symmetric!)
Proof:

For the third property:

tr(AB)=i(AB)ii=ikAikBki\text{tr}(AB) = \sum_i (AB)_{ii} = \sum_i \sum_k A_{ik} B_{ki}
tr(BA)=i(BA)ii=ikBikAki=kiAkiBik\text{tr}(BA) = \sum_i (BA)_{ii} = \sum_i \sum_k B_{ik} A_{ki} = \sum_k \sum_i A_{ki} B_{ik}

Relabeling indices shows these are equal.

15. Challenge Problems

Challenge 1: Trace of Commutator

Prove that tr(ABBA)=0\text{tr}(AB - BA) = 0 for any A,BMn(F)A, B \in M_n(F). Conclude that there are no matrices with ABBA=IAB - BA = I.

Challenge 2: Characterize Commutativity

Prove that if AA commutes with every BMn(F)B \in M_n(F), then A=λIA = \lambda I for some λF\lambda \in F.

Challenge 3: Nilpotent Powers

Let NN be nilpotent with Nk=0N^k = 0. Show that (IN)1=I+N+N2++Nk1(I - N)^{-1} = I + N + N^2 + \cdots + N^{k-1}.

Challenge 4: Product of Symmetric Matrices

If AA and BB are symmetric, when is ABAB symmetric? Prove that ABAB is symmetric if and only if AB=BAAB = BA.

16. Connections to Linear Maps

Matrix operations directly correspond to operations on linear maps. This connection is the foundation of computational linear algebra.

Addition: Sum of Maps

If [σ]=A[\sigma] = A and [τ]=B[\tau] = B, then:

[σ+τ]=A+B[\sigma + \tau] = A + B

Adding matrices corresponds to adding the linear maps they represent.

Multiplication: Composition

If [σ]=B[\sigma] = B and [τ]=A[\tau] = A, then:

[τσ]=AB[\tau \circ \sigma] = AB

Matrix multiplication IS composition. The non-commutativity reflects that composition of maps is generally non-commutative.

Scalar Multiplication

If [σ]=A[\sigma] = A, then:

[λσ]=λA[\lambda \sigma] = \lambda A

Scalar multiplication of the matrix corresponds to scalar multiplication of the map.

Invertibility

If σ\sigma is an isomorphism with [σ]=A[\sigma] = A, then:

[σ1]=A1[\sigma^{-1}] = A^{-1}

The inverse map corresponds to the inverse matrix.

17. Additional Practice Problems

Problem 1

Compute (1234)(5678)\begin{pmatrix} 1 & 2 \\ 3 & 4 \end{pmatrix} \begin{pmatrix} 5 & 6 \\ 7 & 8 \end{pmatrix}.

Problem 2

Find matrices AA, BB such that ABBAAB \neq BA but A+B=B+AA + B = B + A.

Problem 3

Show that (AT)T=A(A^T)^T = A for any matrix AA.

Problem 4

If A2=AA^2 = A (idempotent), show that (IA)2=IA(I - A)^2 = I - A.

Problem 5

Prove that if AA and BB are upper triangular, then ABAB is upper triangular.

Problem 6

Find the general form of all 2×22 \times 2 matrices that commute with (1002)\begin{pmatrix} 1 & 0 \\ 0 & 2 \end{pmatrix}.

Problem 7

Show that tr(ATA)0\text{tr}(A^T A) \geq 0 for any real matrix AA, with equality iff A=0A = 0.

Problem 8

Compute A100A^{100} where A=(1101)A = \begin{pmatrix} 1 & 1 \\ 0 & 1 \end{pmatrix}.

18. Study Tips

Check Dimensions First

Before any multiplication, verify dimensions match. (m×n)(n×p)=m×p(m \times n)(n \times p) = m \times p. The inner dimensions must be equal.

Think Geometrically

Visualize what the matrices do as transformations. Rotation, reflection, scaling—these help build intuition for why certain properties hold.

Use the Column View

Remember: column jj of ABAB is AA times column jj of BB. This simplifies many proofs and computations.

Never Assume Commutativity

Until you prove AB=BAAB = BA for specific matrices, always preserve order. Most algebraic identities from scalars need modification for matrices.

19. Historical Notes

Cayley and Matrix Multiplication: Arthur Cayley introduced the modern definition of matrix multiplication in 1858. He recognized that it corresponds to composition of linear transformations, which is why the formula is more complex than entry-wise multiplication.

Non-Commutativity: The fact that ABBAAB \neq BA was initially surprising to mathematicians used to commutative number systems. However, this mirrors the non-commutativity of geometric operations: rotating then reflecting differs from reflecting then rotating.

Notation: The notation ATA^T for transpose was introduced later. Earlier texts used AA' or A~\tilde{A}. In physics, AA^\dagger(dagger) denotes the conjugate transpose.

Computational Importance: Matrix multiplication is one of the most important operations in scientific computing. The naive O(n3)O(n^3) algorithm was long believed optimal until Strassen discovered an O(n2.81)O(n^{2.81}) algorithm in 1969.

Modern Applications: Today, matrix operations underpin virtually all of machine learning (neural networks are sequences of matrix multiplications), computer graphics (transformations), physics simulations, and data science.

20. Geometric View of Matrix Operations

Multiplication as Transformation Composition

When you multiply matrices ABAB, you're composing two geometric transformations:

  • First apply transformation BB (right matrix acts first)
  • Then apply transformation AA

This explains non-commutativity: rotating 90° then reflecting horizontally gives a different result than reflecting first then rotating.

Column Picture

The columns of AA show where the standard basis vectors land:

Aej=column j of AA e_j = \text{column } j \text{ of } A

The entire transformation is determined by where it sends the basis vectors.

Transpose as Reflection

Geometrically, transpose reflects the matrix across its main diagonal. For symmetric matrices (A=ATA = A^T), the matrix is unchanged by this reflection.

In inner product spaces, transpose relates to the adjoint: Ax,y=x,ATy\langle Ax, y \rangle = \langle x, A^T y \rangle.

What's Next?

Now that you understand matrix operations, the next topics extend these foundations:

  • Matrix Inverse: When does A1A^{-1} exist and how to compute it
  • Elementary Matrices: Building blocks for Gaussian elimination
  • Matrix Rank: The fundamental dimension connecting all matrix concepts
  • Determinants: A scalar that captures key properties of square matrices

These topics complete our understanding of matrix algebra and prepare us for eigenvalue theory.

Matrix Operations Practice
12
Questions
0
Correct
0%
Accuracy
1
If AA is 3×43 \times 4 and BB is 4×24 \times 2, what size is ABAB?
Easy
Not attempted
2
Is matrix multiplication commutative?
Easy
Not attempted
3
(AB)T=?(AB)^T = ?
Medium
Not attempted
4
If AA is m×nm \times n, what size is ATA^T?
Easy
Not attempted
5
(A+B)C=?(A + B)C = ?
Easy
Not attempted
6
If AA is symmetric, then A=?A = ?
Easy
Not attempted
7
(ABC)=?(ABC) = ?
Easy
Not attempted
8
If AA is 2×32 \times 3 and BB is 2×32 \times 3, is ABAB defined?
Easy
Not attempted
9
What is the (i,j)(i,j) entry of ABAB?
Medium
Not attempted
10
If A0A \neq 0 and B0B \neq 0, is AB0AB \neq 0?
Medium
Not attempted
11
(A+B)2=?(A + B)^2 = ?
Hard
Not attempted
12
Which matrices commute with ALL n×nn \times n matrices?
Hard
Not attempted

Frequently Asked Questions

Why does matrix multiplication work the way it does?

It's designed so that $[S \circ T] = [S][T]$—the matrix of a composition is the product of matrices. The row-column dot product formula follows directly from how coordinates transform under composition of linear maps.

Why isn't matrix multiplication commutative?

Geometrically: rotate then reflect ≠ reflect then rotate. Algebraically: the composition of linear maps isn't commutative, and matrix multiplication represents composition. Even when both $AB$ and $BA$ are defined, they usually give different results.

What are block matrices good for?

They simplify large matrix computations and reveal structure. If matrices have compatible block partitions, you can multiply blocks like scalar entries (with care about order). Block diagonal matrices are particularly useful for decomposing problems.

What's the computational complexity of matrix multiplication?

Naive: $O(n^3)$. Best known (Coppersmith-Winograd variants): $O(n^{2.37...})$. In practice, optimized $O(n^3)$ algorithms (like Strassen's $O(n^{2.81})$) are often used due to lower constants.

When can I commute matrices?

Scalar matrices $\lambda I$ commute with everything. Diagonal matrices commute with each other. More generally, matrices commute if they share an eigenbasis—such matrices are simultaneously diagonalizable.

Why is $(AB)^T = B^T A^T$ (reversed order)?

Think of it as 'reversing the path.' Transposing swaps rows and columns. When you transpose a product, the roles of 'taking rows of A' and 'taking columns of B' get swapped, which reverses the multiplication order.

Can non-zero matrices multiply to give zero?

Yes! These are called zero divisors. For example, if $A$ has a non-trivial null space and $B$'s columns lie in that null space, then $AB = 0$ even though $A, B \neq 0$. This is fundamentally different from real number multiplication.

What is a matrix polynomial?

If $p(x) = a_n x^n + \cdots + a_1 x + a_0$, then $p(A) = a_n A^n + \cdots + a_1 A + a_0 I$. Matrix polynomials are central to the Cayley-Hamilton theorem and matrix functions.

What's the identity matrix's role?

The identity matrix $I$ satisfies $AI = IA = A$ for any compatible matrix $A$. It represents the identity linear map. In matrix multiplication, it plays the role that 1 plays in number multiplication.

How do I multiply matrices by hand efficiently?

For each entry $(i,j)$ of the result, compute the dot product of row $i$ of the first matrix with column $j$ of the second. Organize your work systematically and double-check dimensions first.