Course map and matrix algebra

Before a computer can solve a network of equations, balance a chemical reaction, or rotate a 3D model, it packs the numbers into a matrix and leans on a handful of algebraic rules. This article opens the "Matrices, systems, and numerical linear algebra" chapter of MA10002 (Mathematics-II) by building that toolkit: addition, scalar multiplication, matrix multiplication, transpose, determinant, adjoint, and inverse, together with the special matrix families — symmetric, skew-symmetric, orthogonal, Hermitian, skew-Hermitian, unitary — and the bilinear form xTAy\mathbf{x}^TA\mathbf{y}. Here matrices are treated purely computationally, as arrays you manipulate by rule, not yet as abstract linear transformations (that viewpoint arrives later, in "Vector spaces, transformations, and eigenvalue problems"). Everything that follows in this chapter — rank, row reduction, solving systems, numerical linear algebra — leans on the identities built here, so fluency now pays off repeatedly downstream.

The core insight

A matrix is manipulated by a fixed algebra — sum, product, transpose, determinant, and inverse A−1=adj⁡A/det⁡AA^{-1}=\operatorname{adj}A/\det A — and every one of these operations obeys precise, sometimes counter-intuitive, order-of-operations rules that the rest of linear algebra depends on.

The core idea

Size and entrywise operations. A matrix AA of size m×nm\times n is a rectangular array of scalars (real or complex) with mm rows and nn columns. Addition and scalar multiplication act entrywise: (A+B)ij=Aij+Bij(A+B)_{ij}=A_{ij}+B_{ij} and (cA)ij=cAij(cA)_{ij}=cA_{ij}, and they require A,BA,B to be the same size.

Matrix multiplication is not entrywise. For AA of size m×nm\times n and BB of size n×pn\times p, the product C=ABC=AB has size m×pm\times p, with each entry a dot product of a row of AA with a column of BB:

Cij=∑k=1nAikBkj.C_{ij}=\sum_{k=1}^n A_{ik}B_{kj}.

where: AikA_{ik} runs along row ii of AA, BkjB_{kj} runs down column jj of BB, and the inner dimension nn must match. Crucially, matrix multiplication is not commutative: AB≠BAAB\neq BA in general, and often only one of the two products is even defined.

Figure
Matrix multiplication as a row dotted with a column to give one entry of the product
C_ij is row i of A dotted with column j of B A (m x n) row i: A_i1 A_i2 ... A_in B (n x p) col j: B_1j..B_nj sum C_ij = sum_k A_ik B_kj C has size m x p; the inner dimension n must match between A and B

Transpose and determinant. The transpose ATA^T swaps rows and columns, (AT)ij=Aji(A^T)_{ij}=A_{ji}. For a square matrix, the determinant det⁡A\det A is a scalar; for 2×22\times2,

det⁡(abcd)=ad−bc.\det\begin{pmatrix}a&b\\c&d\end{pmatrix}=ad-bc.

For an n×nn\times n matrix, cofactor expansion along row ii gives det⁡A=∑j=1n(−1)i+jAijMij\det A=\sum_{j=1}^n(-1)^{i+j}A_{ij}M_{ij}, where MijM_{ij} is the minor formed by deleting row ii and column jj; expanding along any row or column gives the same value, which is a useful hand-check.

Adjoint and inverse. The adjoint (adjugate) adj⁡A\operatorname{adj}A is the transpose of the cofactor matrix. When det⁡A≠0\det A\neq0,

A−1=adj⁡Adet⁡A.A^{-1}=\frac{\operatorname{adj}A}{\det A}.

where: adj⁡A\operatorname{adj}A is built entirely from signed minors of AA, and det⁡A\det A scales the result. A matrix with det⁡A=0\det A=0 has no inverse and is called singular.

Special families. Over R\mathbb{R}: AA is symmetric if A=ATA=A^T, skew-symmetric if A=−ATA=-A^T, orthogonal if ATA=IA^TA=I. Over C\mathbb{C}, replace transpose by conjugate transpose A∗=AˉTA^{*}=\bar A^{T}: Hermitian if A=A∗A=A^{*}, skew-Hermitian if A=−A∗A=-A^{*}, unitary if A∗A=IA^{*}A=I. Real symmetric/skew-symmetric/orthogonal matrices are the real-entry special cases of Hermitian/skew-Hermitian/unitary.

Bilinear and quadratic forms. A bilinear form is xTAy=∑i,jAijxiyj\mathbf{x}^TA\mathbf{y}=\sum_{i,j}A_{ij}x_iy_j, linear in x\mathbf x and in y\mathbf y separately. Setting y=x\mathbf y=\mathbf x gives the quadratic form xTAx\mathbf{x}^TA\mathbf{x}; for symmetric AA it expands cleanly as ∑iAiixi2+2∑i<jAijxixj\sum_i A_{ii}x_i^2+2\sum_{i<j}A_{ij}x_ix_j.

Standing identities. Two reversal rules recur throughout the chapter: transpose of a product reverses order, (AB)T=BTAT(AB)^T=B^TA^T, and so does inverse of a product, (AB)−1=B−1A−1(AB)^{-1}=B^{-1}A^{-1} (both A,BA,B invertible, same order). Determinants are multiplicative, det⁡(AB)=det⁡A det⁡B\det(AB)=\det A\,\det B, which immediately gives det⁡(A−1)=1/det⁡A\det(A^{-1})=1/\det A. It is worth pausing on why the reversal happens, since it is the single most-forgotten sign or order slip in this chapter. Entrywise, ((AB)T)ij=(AB)ji=∑kAjkBki=∑k(BT)ik(AT)kj=(BTAT)ij((AB)^T)_{ij}=(AB)_{ji}=\sum_kA_{jk}B_{ki}=\sum_k(B^T)_{ik}(A^T)_{kj}=(B^TA^T)_{ij}, so the two sides agree term by term; the same bookkeeping, run through the definition of an inverse, forces (AB)−1=B−1A−1(AB)^{-1}=B^{-1}A^{-1} rather than A−1B−1A^{-1}B^{-1}. A closely related pair of matrices, the identity II (ones on the diagonal, zeros elsewhere) and the zero matrix OO, act the way 11 and 00 do for numbers: AI=IA=AAI=IA=A for any square AA of matching size, and A+O=AA+O=A. Unlike ordinary numbers, though, AB=OAB=O does not force A=OA=O or B=OB=O — two nonzero matrices can multiply to give the zero matrix, another reminder that matrix algebra only mimics ordinary arithmetic up to a point, and every identity above needs to be verified from the definitions rather than assumed by analogy with scalars.

Derivation AWhy the adjoint gives the inverse

The goal is to show, starting only from the definition of the cofactor matrix and the cofactor-expansion formula for the determinant, exactly why dividing the adjoint by the determinant produces a genuine two-sided inverse, so that the formula A−1=adj⁡A/det⁡AA^{-1}=\operatorname{adj}A/\det A is not a rule to memorize blindly but a direct consequence of how determinants are built from minors — and why it fails precisely when det⁡A=0\det A=0.

Step 1. Define the cofactor Cij=(−1)i+jMijC_{ij}=(-1)^{i+j}M_{ij}, where MijM_{ij} is the minor obtained by deleting row ii and column jj of AA. The adjoint is the transpose of the cofactor matrix, (adj⁡A)ji=Cij(\operatorname{adj}A)_{ji}=C_{ij}.

Step 2. Look at the product A adj⁡AA\,\operatorname{adj}A entry by entry. The diagonal entry (A adj⁡A)ii=∑jAij(adj⁡A)ji=∑jAijCij(A\,\operatorname{adj}A)_{ii}=\sum_{j}A_{ij}(\operatorname{adj}A)_{ji}=\sum_jA_{ij}C_{ij}, which is exactly the cofactor expansion of det⁡A\det A along row ii. So every diagonal entry equals det⁡A\det A.

Step 3. Look at an off-diagonal entry, (A adj⁡A)ik(A\,\operatorname{adj}A)_{ik} for i≠ki\neq k: this equals ∑jAijCkj\sum_jA_{ij}C_{kj}, which is the cofactor expansion (along row kk) of the determinant of a matrix where row kk has been replaced by a duplicate of row ii. A determinant with two equal rows is zero, so every off-diagonal entry vanishes.

Step 4. Combine Steps 2 and 3: A adj⁡A=(det⁡A) IA\,\operatorname{adj}A=(\det A)\,I, where II is the identity matrix. Dividing both sides by the scalar det⁡A\det A, valid only when det⁡A≠0\det A\neq0, gives A(adj⁡Adet⁡A)=IA\left(\dfrac{\operatorname{adj}A}{\det A}\right)=I, so A−1=adj⁡A/det⁡AA^{-1}=\operatorname{adj}A/\det A by definition of inverse. The same argument applied to (adj⁡A)A(\operatorname{adj}A)A shows it also equals (det⁡A)I(\det A)I, so this is a genuine two-sided inverse, and the whole construction collapses to nothing useful the moment det⁡A=0\det A=0, which is exactly why a singular matrix cannot be inverted.

Worked example

Let A=(2−134)A=\begin{pmatrix}2&-1\\3&4\end{pmatrix}, B=(1025)B=\begin{pmatrix}1&0\\2&5\end{pmatrix}. Find ABAB, det⁡A\det A, A−1A^{-1}, and verify (AB)−1=B−1A−1(AB)^{-1}=B^{-1}A^{-1}.

Step 1. Compute the product using Cij=∑kAikBkjC_{ij}=\sum_kA_{ik}B_{kj}:

AB=(2(1)+(−1)(2)2(0)+(−1)(5)3(1)+4(2)3(0)+4(5))=(0−51120).AB=\begin{pmatrix}2(1)+(-1)(2)&2(0)+(-1)(5)\\3(1)+4(2)&3(0)+4(5)\end{pmatrix}=\begin{pmatrix}0&-5\\11&20\end{pmatrix}.

Step 2. Compute det⁡A=2(4)−(−1)(3)=8+3=11\det A=2(4)-(-1)(3)=8+3=11, nonzero, so AA is invertible.

Step 3. For a 2×22\times2 matrix (abcd)\begin{pmatrix}a&b\\c&d\end{pmatrix} the adjoint is (d−b−ca)\begin{pmatrix}d&-b\\-c&a\end{pmatrix}, so

A−1=111(41−32).A^{-1}=\frac{1}{11}\begin{pmatrix}4&1\\-3&2\end{pmatrix}.

Check: AA−1=111(8+32−212−123+8)=111(110011)=I.AA^{-1}=\frac{1}{11}\begin{pmatrix}8+3&2-2\\12-12&3+8\end{pmatrix}=\frac{1}{11}\begin{pmatrix}11&0\\0&11\end{pmatrix}=I.

Competitive stretch

Step 4. Verify the reversal identity numerically. det⁡B=1(5)−0(2)=5\det B=1(5)-0(2)=5, so B−1=15(50−21)B^{-1}=\frac{1}{5}\begin{pmatrix}5&0\\-2&1\end{pmatrix}. Then B−1A−1=15(50−21)⋅111(41−32)=155(205−110)B^{-1}A^{-1}=\frac{1}{5}\begin{pmatrix}5&0\\-2&1\end{pmatrix}\cdot\frac{1}{11}\begin{pmatrix}4&1\\-3&2\end{pmatrix}=\frac{1}{55}\begin{pmatrix}20&5\\-11&0\end{pmatrix}. Independently, det⁡(AB)=0(20)−(−5)(11)=55\det(AB)=0(20)-(-5)(11)=55, and for (0−51120)\begin{pmatrix}0&-5\\11&20\end{pmatrix} the adjoint is (205−110)\begin{pmatrix}20&5\\-11&0\end{pmatrix}, so (AB)−1=155(205−110)(AB)^{-1}=\frac{1}{55}\begin{pmatrix}20&5\\-11&0\end{pmatrix}. The two computations agree, confirming (AB)−1=B−1A−1=155(205−110)(AB)^{-1}=B^{-1}A^{-1}=\dfrac{1}{55}\begin{pmatrix}20&5\\-11&0\end{pmatrix}.

Common traps

  • Assuming AB=BAAB=BA: matrix multiplication is generally non-commutative, and even when both products exist they can differ.
  • Forgetting the adjoint uses the transpose of the cofactor matrix, not the cofactor matrix itself — a very common 2×22\times2/3×33\times3 slip.
  • Confusing "symmetric" (real, A=ATA=A^T) with "Hermitian" (complex, A=AˉTA=\bar A^T); for a real matrix the two coincide, but a complex matrix must be checked with the conjugate.
  • Getting the order wrong in reversal identities: writing ATBTA^TB^T instead of (AB)T=BTAT(AB)^T=B^TA^T, or A−1B−1A^{-1}B^{-1} instead of (AB)−1=B−1A−1(AB)^{-1}=B^{-1}A^{-1}.
  • Trying to invert a singular matrix (det⁡A=0\det A=0), or dividing by det⁡A\det A without first checking it is nonzero.

Ask the tutor: if you want another 3×33\times3 determinant or a Hermitian-vs-unitary classification worked through step by step, ask the AI tutor to walk through it with you.

Why does matrix multiplication not commute, when ordinary number multiplication does

Because ABAB combines rows of AA with columns of BB: the definition Cij=∑kAikBkjC_{ij}=\sum_kA_{ik}B_{kj} treats the two matrices asymmetrically, pairing row ii of the first factor with column jj of the second. Swapping the order pairs different rows with different columns and generally gives a different result, or is not even defined if the inner dimensions no longer match. Only special pairs of matrices (such as a matrix and its own powers, or a matrix and the identity) happen to commute.

Is the adjoint the same thing as the inverse

No. The adjoint adj⁡A\operatorname{adj}A is built purely from signed minors of AA and exists for every square matrix, invertible or not. The inverse only exists when det⁡A≠0\det A\neq0, and it equals the adjoint scaled by 1/det⁡A1/\det A. If det⁡A=0\det A=0, the adjoint can still be computed but A−1A^{-1} does not exist, since dividing by zero is undefined.

How do I quickly tell if a matrix is symmetric, skew-symmetric, or neither

Write down ATA^T by swapping rows and columns, then compare it entrywise with AA. If every entry matches, A=ATA=A^T and the matrix is symmetric. If every entry is the exact negative (and all diagonal entries are zero, since a diagonal entry must equal its own negative), A=−ATA=-A^T and it is skew-symmetric. If neither pattern holds throughout, the matrix is neither; most matrices you write down at random fall into this last case.

Before this

Where this leads