Matrices and matrix algebra
Unit I: Matrices and linear systems · Topic 1 of 23
Key idea
A matrix is a rectangular array of numbers with \(m\) rows and \(n\) columns; the entry in row \(i\), column \(j\) is \(a_{ij}\). Matrices add and scale entry by entry, but multiplication is row times column, and that one rule produces almost everything that is surprising about them: products need not commute, a product can be zero without either factor being zero, and you cannot cancel.
Product. \(A\) is \(m\times n\) and \(B\) is \(n\times p\); then \(AB\) is \(m\times p\) with
\[(AB)_{ij} = \sum_{k=1}^{n} a_{ik}b_{kj}\] \[= (\text{row } i \text{ of } A)\cdot(\text{column } j \text{ of } B).\]For instance, with \(A = \begin{bmatrix} 1 & 2 & 0 \\ -1 & 3 & 1 \end{bmatrix}\) (\(2\times 3\)) and \(B = \begin{bmatrix} 2 & 1 \\ 0 & 4 \\ 5 & -2 \end{bmatrix}\) (\(3\times 2\)), the inner sizes agree (\(3 = 3\)), so \(AB\) exists and is \(2\times 2\). Entry \((1,1)\) is row 1 of \(A\) against column 1 of \(B\): \(1\cdot 2 + 2\cdot 0 + 0\cdot 5 = 2\); entry \((1,2)\) is \(1\cdot 1 + 2\cdot 4 + 0\cdot(-2) = 9\); entry \((2,1)\) is \(-1\cdot 2 + 3\cdot 0 + 1\cdot 5 = 3\); entry \((2,2)\) is \(-1\cdot 1 + 3\cdot 4 + 1\cdot(-2) = 9\):
\[AB = \begin{bmatrix} 2 & 9 \\ 3 & 9 \end{bmatrix}\]while \(BA\) is \(3\times 3\), a different shape altogether.
Rules that hold.
\[A(BC) = (AB)C\] \[A(B + C) = AB + AC\] \[(AB)^T = B^T A^T\] \[(A^T)^T = A\] \[(kA)^T = kA^T.\]Rules that fail. In general \(AB \ne BA\); \(AB = 0\) does not force \(A = 0\) or \(B = 0\); \(AB = AC\) does not force \(B = C\). Hence
\[(A + B)^2 = A^2 + AB + BA + B^2\]which is not \(A^2 + 2AB + B^2\) unless \(A\) and \(B\) commute.
Trace \(\operatorname{tr} A = \sum a_{ii}\) (square matrices); \(\operatorname{tr}(AB) = \operatorname{tr}(BA)\) even when \(AB \ne BA\), because both equal \(\sum_{i,k} a_{ik}b_{ki}\).
- \(I_n\) identity: ones on the diagonal, \(AI = IA = A\).
- Diagonal nonzero entries only on the diagonal; products and powers are entrywise.
- Scalar \(kI\) commutes with every matrix, and these are the only matrices that do.
- Triangular upper: zeros below the diagonal; lower: zeros above. Determinant is the product of the diagonal.
- Symmetric \(A^T = A\). Skew-symmetric \(A^T = -A\) (zero diagonal).
- Orthogonal \(Q^TQ = I\), so \(Q^{-1} = Q^T\).
- Idempotent \(P^2 = P\) (projections). Nilpotent \(N^k = 0\) for some \(k\).
For any square \(A\), \(A + A^T\) is symmetric, \(A - A^T\) is skew-symmetric, and \(A = \tfrac12(A + A^T) + \tfrac12(A - A^T)\).
How to work it
- Check the shapes: the number of columns of the left factor must equal the number of rows of the right factor. If not, the product is undefined.
- The answer has as many rows as the left factor and as many columns as the right factor.
- Entry \((i,j)\): run along row \(i\) of the left factor and down column \(j\) of the right factor, multiply pairs and add.
- Compute \(BA\) separately if asked; do not assume it equals \(AB\) or even has the same shape.
Let \(C = \begin{bmatrix} 0 & 1 \\ 0 & 0 \end{bmatrix}\) and \(D = \begin{bmatrix} 1 & 0 \\ 0 & 0 \end{bmatrix}\). Then
\[CD = \begin{bmatrix} 0 & 0 \\ 0 & 0 \end{bmatrix}\] \[DC = \begin{bmatrix} 0 & 1 \\ 0 & 0 \end{bmatrix}\]so \(CD \ne DC\), and \(CD = 0\) although neither factor is zero.
By contrast \(A = aI = \begin{bmatrix} a & 0 \\ 0 & a \end{bmatrix}\) satisfies \(AB = aB = BA\) for every \(B\). Conversely, if \(AB = BA\) for all \(B\), testing \(B = \begin{bmatrix} 1 & 0 \\ 0 & 0 \end{bmatrix}\) forces the off-diagonal entries of \(A\) to vanish, and testing \(B = \begin{bmatrix} 0 & 1 \\ 0 & 0 \end{bmatrix}\) forces the diagonal entries to be equal: only scalar matrices commute with everything.
Watch out. Transposing a product reverses the order: \((AB)^T = B^TA^T\), and the same for inverses, \((AB)^{-1} = B^{-1}A^{-1}\). Writing \(A^TB^T\) is the single most common algebra slip.
Practice: problem 1 · Challenge: problems 36, 40, 41, 48, 51, 117, 127 (the practice groups are the last entries in the contents).
Linear systems and Gauss elimination
Unit I: Matrices and linear systems · Topic 2 of 23
Key idea
A system of \(m\) linear equations in \(n\) unknowns is one matrix equation \(A\mathbf{x} = \mathbf{b}\). Gauss elimination applies row operations to the augmented matrix \([A \mid \mathbf{b}]\) until it is in row echelon form, then solves from the bottom up. Row operations never change the solution set, so the triangular system has exactly the same solutions as the original.
- Swap interchange two rows, \(R_i \leftrightarrow R_j\).
- Scale multiply a row by a nonzero constant, \(R_i \to kR_i\).
- Replace add a multiple of one row to another, \(R_i \to R_i + kR_j\).
Row echelon form (REF): all-zero rows at the bottom; the leading (first nonzero) entry of each row, the pivot, lies strictly to the right of the pivot above it; entries below each pivot are zero.
Reduced row echelon form (RREF): in addition every pivot equals 1 and is the only nonzero entry in its column. The RREF of a matrix is unique; its REF is not.
Pivot columns correspond to basic variables; the remaining columns of \(A\) correspond to free variables, which may take any value.
- No solution a row of the form \([\,0\ 0\ \cdots\ 0 \mid c\,]\) with \(c \ne 0\) appears (the equation \(0 = c\)). Equivalently \(\operatorname{rank}[A\mid\mathbf{b}] \gt \operatorname{rank} A\).
- Exactly one consistent and every column of \(A\) is a pivot column (\(\operatorname{rank} A = n\)): no free variables.
- Infinitely many consistent with at least one free variable (\(\operatorname{rank} A \lt n\)); the solution set has \(n - \operatorname{rank}A\) parameters.
Homogeneous systems \(A\mathbf{x} = \mathbf{0}\) are always consistent (\(\mathbf{x} = \mathbf{0}\) works). They have nontrivial solutions exactly when there is a free variable, which is automatic when there are more unknowns than equations.
A square system has a unique solution for every right-hand side exactly when \(A\) is invertible (\(\det A \ne 0\)).
How to work it
- Write the augmented matrix \([A\mid\mathbf{b}]\). Keep the bar so you do not row reduce the right-hand side separately.
- Working left to right, choose a pivot in the current column (swap rows if the entry is zero) and use row replacement to make every entry below it zero.
- Move to the next row and the next column that still has a nonzero entry below the staircase; repeat until the matrix is in echelon form.
- Check for a row \([0 \cdots 0 \mid c]\), \(c \ne 0\): if present, stop, there is no solution.
- Otherwise solve the last nonzero equation for its pivot variable and substitute upward. Free variables become parameters \(s, t, \dots\).
Solve \(x + y + z = 6,\ 2x - y + z = 3,\ x + 2y + 3z = 14\).
\[\left[\begin{array}{ccc|c} 1 & 1 & 1 & 6 \\ 2 & -1 & 1 & 3 \\ 1 & 2 & 3 & 14 \end{array}\right] \xrightarrow{R_2 - 2R_1,\ R_3 - R_1} \left[\begin{array}{ccc|c} 1 & 1 & 1 & 6 \\ 0 & -3 & -1 & -9 \\ 0 & 1 & 2 & 8 \end{array}\right]\]Swap \(R_2 \leftrightarrow R_3\) to get a convenient pivot, then \(R_3 + 3R_2\):
\[\left[\begin{array}{ccc|c} 1 & 1 & 1 & 6 \\ 0 & 1 & 2 & 8 \\ 0 & 0 & 5 & 15 \end{array}\right]\]Back substitution: \(z = 3\), then \(y = 8 - 2(3) = 2\), then \(x = 6 - 2 - 3 = 1\). Three pivots, no free variables: the unique solution is \((1, 2, 3)\). Check in the second equation: \(2 - 2 + 3 = 3\).
With a free variable. Solve \(x + 2y - z = 1,\ 2x + 4y - 2z = 2,\ x + 2y + z = 3\). \(R_2 - 2R_1\) gives a zero row and \(R_3 - R_1\) gives \((0, 0, 2 \mid 2)\); swap them so the zero row is at the bottom:
\[\left[\begin{array}{ccc|c} 1 & 2 & -1 & 1 \\ 0 & 0 & 2 & 2 \\ 0 & 0 & 0 & 0 \end{array}\right]\]Pivots in columns 1 and 3, so \(y\) is free: set \(y = t\). Then \(z = 1\) and \(x = 1 - 2t + 1 = 2 - 2t\), so the solutions are \((2 - 2t, t, 1)\) for every real \(t\), a line. Check the third equation: \((2 - 2t) + 2t + 1 = 3\). Had the second equation read \(2x + 4y - 2z = 3\), the step \(R_2 - 2R_1\) would have produced \((0, 0, 0 \mid 1)\), i.e. \(0 = 1\): no solution.
Homogeneous. \(x + y + z = 0,\ x - y + 2z = 0\): two equations, three unknowns, so a free variable is guaranteed. \(R_2 - R_1\) gives \((0, -2, 1 \mid 0)\), so \(y = \tfrac12 z\) and \(x = -y - z = -\tfrac32 z\); with \(z = 2t\) the solutions are \(t(-3, 1, 2)\), a line through the origin. Check: \(-3 + 1 + 2 = 0\) and \(-3 - 1 + 4 = 0\). Continuing to RREF here means scaling \(R_2\) by \(-\tfrac12\) and clearing above the pivot, which gives \(\left[\begin{array}{ccc|c} 1 & 0 & \tfrac32 & 0 \\ 0 & 1 & -\tfrac12 & 0 \end{array}\right]\), the same answer read off directly.
Watch out. Row operations are legal on the augmented matrix only; never do column operations when solving a system, and never multiply a row by zero. If a pivot position is zero, swap in a lower row rather than skipping the column.
Practice: problem 2 · Challenge: problem 47 (the practice groups are the last entries in the contents).
Existence, uniqueness and the shape of the solution set
Unit I: Matrices and linear systems · Topic 3 of 23
Key idea
Once a system is in reduced form, its solution set has a definite shape: a particular solution plus every solution of the associated homogeneous system. That is why solution sets are points, lines, planes or higher flats, never anything curved, and why "find all solutions" always means "write the free variables as parameters."
If \(A\mathbf{x}_p = \mathbf{b}\), then every solution of \(A\mathbf{x} = \mathbf{b}\) is
\[\mathbf{x} = \mathbf{x}_p + \mathbf{x}_h\] \[A\mathbf{x}_h = \mathbf{0}\]because \(A(\mathbf{x} - \mathbf{x}_p) = \mathbf{b} - \mathbf{b} = \mathbf{0}\). The homogeneous solutions form a subspace (the null space of \(A\)) of dimension \(n - \operatorname{rank}A\), and the full solution set is that subspace shifted by \(\mathbf{x}_p\).
Parametric vector form. With free variables \(x_{j_1} = s, x_{j_2} = t, \dots\):
\[\mathbf{x} = \mathbf{x}_p + s\,\mathbf{v}_1 + t\,\mathbf{v}_2 + \cdots\]where \(\mathbf{v}_1, \mathbf{v}_2, \dots\) are the solutions of \(A\mathbf{x} = \mathbf{0}\) obtained by setting one free variable to 1 and the others to 0.
When the coefficients or right-hand sides contain letters, row reduce exactly as usual, keeping the letters symbolic. Each zero row of the coefficient part produces a consistency condition: the corresponding right-hand entry must be zero.
- Condition fails no solution for those parameter values.
- Condition holds solutions exist; count free variables to decide whether there is one or infinitely many.
- Pivot contains a letter split into cases: the letter equal to zero (pivot lost) and nonzero.
For example, take \(x + y + z = 1,\ x + 2y + z = 2,\ 2x + 3y + az = b\). \(R_2 - R_1\) gives \((0, 1, 0 \mid 1)\), \(R_3 - 2R_1\) gives \((0, 1, a - 2 \mid b - 2)\), and then \(R_3 - R_2\) leaves the last row \((0, 0, a - 2 \mid b - 3)\). If \(a \ne 2\) there are three pivots and exactly one solution for every \(b\). If \(a = 2\) the last row reads \(0 = b - 3\): infinitely many solutions when \(b = 3\) (one free variable, \(z\)) and no solution when \(b \ne 3\).
Geometrically, three equations in three unknowns describe three planes; a unique solution is a common point, infinitely many means they share a line or coincide, and no solution means at least two are parallel or the three form a triangular prism.
How to work it
- Row reduce to RREF. Identify pivot columns (basic variables) and non-pivot columns (free variables).
- If a row reads \(0 = c\) with \(c \ne 0\), report no solution and stop.
- Solve each nonzero row for its basic variable in terms of the free variables.
- Assign parameters to the free variables and collect the vector as (constant vector) + parameter \(\times\) (vector) for each parameter.
- Check: the constant vector must satisfy the original system, and each parameter vector must satisfy the homogeneous system.
Suppose a system in \(x_1, x_2, x_3, x_4\) reduces to
\[\left[\begin{array}{cccc|c} 1 & 2 & 0 & 1 & 3 \\ 0 & 0 & 1 & -2 & 1 \\ 0 & 0 & 0 & 0 & 0 \end{array}\right].\]Pivot columns 1 and 3; free variables \(x_2 = s\), \(x_4 = t\). Then \(x_1 = 3 - 2s - t\) and \(x_3 = 1 + 2t\):
\[\mathbf{x} = \begin{bmatrix} 3 \\ 0 \\ 1 \\ 0 \end{bmatrix} + s\begin{bmatrix} -2 \\ 1 \\ 0 \\ 0 \end{bmatrix} + t\begin{bmatrix} -1 \\ 0 \\ 2 \\ 1 \end{bmatrix}.\]The solution set is a plane in \(\mathbb{R}^4\) through the particular solution \((3,0,1,0)\), parallel to the null space spanned by the two parameter vectors. Had the last row been \([0\ 0\ 0\ 0 \mid 2]\), there would be no solution at all.
Watch out. "Rank of \(A\) equals rank of \([A\mid\mathbf{b}]\)" is the test for existence; "rank equals the number of unknowns" is the test for uniqueness. Students often check only one of the two.
Practice: problems 2, 3 · Challenge: problems 35, 39, 42, 49, 54, 62, 73, 119, 128 (the practice groups are the last entries in the contents).
Inverse of a matrix and Gauss–Jordan elimination
Unit I: Matrices and linear systems · Topic 4 of 23
Key idea
A square matrix \(A\) is invertible (nonsingular) if there is a matrix \(A^{-1}\) with \(AA^{-1} = A^{-1}A = I\). The inverse, when it exists, is unique, and it turns \(A\mathbf{x} = \mathbf{b}\) into \(\mathbf{x} = A^{-1}\mathbf{b}\). Gauss–Jordan elimination computes it by row reducing \([A \mid I]\) all the way to \([I \mid A^{-1}]\).
Swap the diagonal, negate the off-diagonal, divide by the determinant.
For \(\begin{bmatrix} 2 & 5 \\ 1 & 3 \end{bmatrix}\): \(ad - bc = 6 - 5 = 1\), so the inverse is \(\begin{bmatrix} 3 & -5 \\ -1 & 2 \end{bmatrix}\); check \(\begin{bmatrix} 2 & 5 \\ 1 & 3 \end{bmatrix}\begin{bmatrix} 3 & -5 \\ -1 & 2 \end{bmatrix} = \begin{bmatrix} 6 - 5 & -10 + 10 \\ 3 - 3 & -5 + 6 \end{bmatrix} = I\). When \(ad - bc = 0\), as for \(\begin{bmatrix} 2 & 4 \\ 1 & 2 \end{bmatrix}\), the formula divides by zero and there is no inverse at all.
\[(AB)^{-1} = B^{-1}A^{-1}\] \[(A^{-1})^{-1} = A\] \[(A^T)^{-1} = (A^{-1})^T\] \[(kA)^{-1} = \tfrac{1}{k}A^{-1}\] \[(A^n)^{-1} = (A^{-1})^n.\]For square matrices a one-sided inverse is two-sided: \(AB = I\) already implies \(BA = I\). (If \(B\mathbf{x} = \mathbf{0}\) then \(\mathbf{x} = AB\mathbf{x} = \mathbf{0}\), so \(B\) has trivial kernel and is invertible; multiplying \(AB = I\) on the right by \(B^{-1}\) gives \(A = B^{-1}\).) This fails for non-square matrices, where a one-sided inverse can exist without a two-sided one.
Triangular matrices with nonzero diagonal are invertible, and the inverse is triangular of the same kind. A matrix of the form \(I + N\) with \(N^k = 0\) has inverse \(I - N + N^2 - \cdots \pm N^{k-1}\).
- Algebra \(A\) is invertible; \(A^T\) is invertible; \(\det A \ne 0\).
- Systems \(A\mathbf{x} = \mathbf{b}\) has exactly one solution for every \(\mathbf{b}\); \(A\mathbf{x} = \mathbf{0}\) has only the trivial solution.
- Row reduction the RREF of \(A\) is \(I_n\); \(A\) has \(n\) pivots; \(\operatorname{rank} A = n\).
- Columns and rows the columns are linearly independent; they span \(\mathbb{R}^n\); they form a basis. Same for the rows.
- Maps \(T(\mathbf{x}) = A\mathbf{x}\) is one-to-one; it is onto.
- Eigenvalues \(0\) is not an eigenvalue of \(A\); \(\ker A = \{\mathbf{0}\}\).
Using the theorem: for \(\begin{bmatrix} 1 & 2 \\ 2 & 4 \end{bmatrix}\), \(\det = 4 - 4 = 0\), so every statement fails at once: the columns are dependent (the second is twice the first), \(A\mathbf{x} = \mathbf{0}\) has the nontrivial solution \((-2, 1)\), the rank is \(1\), and \(0\) is an eigenvalue. One failed test settles every other question about invertibility.
If any one of these fails they all fail, and \(A\) is singular.
How to work it
- Form the \(n\times 2n\) matrix \([A \mid I]\).
- Row reduce the left half to RREF, applying every operation to the whole row (both halves).
- If the left half reaches \(I\), the right half is \(A^{-1}\). If a zero row appears on the left, \(A\) is singular.
- Verify one product, \(AA^{-1} = I\), before using the answer.
Why it works: each row operation is multiplication on the left by an elementary matrix, so the whole reduction is one matrix \(E\) applied to both halves. The left half becoming \(I\) says \(EA = I\), and the right half is \(EI = E\); hence the right half is \(E = A^{-1}\).
Invert \(A = \begin{bmatrix} 1 & 1 & 0 \\ 0 & 1 & 1 \\ 1 & 0 & 1 \end{bmatrix}\).
\[\left[\begin{array}{ccc|ccc} 1 & 1 & 0 & 1 & 0 & 0 \\ 0 & 1 & 1 & 0 & 1 & 0 \\ 1 & 0 & 1 & 0 & 0 & 1 \end{array}\right] \xrightarrow{R_3 - R_1} \left[\begin{array}{ccc|ccc} 1 & 1 & 0 & 1 & 0 & 0 \\ 0 & 1 & 1 & 0 & 1 & 0 \\ 0 & -1 & 1 & -1 & 0 & 1 \end{array}\right]\] \[\xrightarrow{R_3 + R_2} \left[\begin{array}{ccc|ccc} 1 & 1 & 0 & 1 & 0 & 0 \\ 0 & 1 & 1 & 0 & 1 & 0 \\ 0 & 0 & 2 & -1 & 1 & 1 \end{array}\right] \xrightarrow{R_3/2,\ R_2 - R_3,\ R_1 - R_2} \left[\begin{array}{ccc|ccc} 1 & 0 & 0 & \tfrac12 & -\tfrac12 & \tfrac12 \\ 0 & 1 & 0 & \tfrac12 & \tfrac12 & -\tfrac12 \\ 0 & 0 & 1 & -\tfrac12 & \tfrac12 & \tfrac12 \end{array}\right]\] \[A^{-1} = \frac12\begin{bmatrix} 1 & -1 & 1 \\ 1 & 1 & -1 \\ -1 & 1 & 1 \end{bmatrix}.\]Check the first row of \(AA^{-1}\): \(\tfrac12(1 + 1,\ -1 + 1,\ 1 - 1) = (1, 0, 0)\).
Watch out. \(\dfrac{1}{A}\) means nothing; write \(A^{-1}\). And \((A + B)^{-1} \ne A^{-1} + B^{-1}\): the sum of two invertible matrices need not even be invertible (\(I + (-I) = 0\)).
Practice: problems 4, 5 · Challenge: problems 37, 40, 47, 50, 54, 78, 115, 116, 128, 132 (the practice groups are the last entries in the contents).
Determinants
Unit I: Matrices and linear systems · Topic 5 of 23
Key idea
The determinant is a single number attached to a square matrix. It is zero exactly when the matrix is singular, it measures how the matrix scales volume, and it is the key to eigenvalues through \(\det(A - \lambda I)\). Compute it by cofactor expansion along a row or column with many zeros, or by row reducing to triangular form and tracking the operations.
Cofactor expansion along any row \(i\) (or column \(j\)):
\[\det A = \sum_{j=1}^{n} a_{ij}C_{ij}\] \[C_{ij} = (-1)^{i+j}M_{ij}\]\(M_{ij}\) being the determinant of the matrix with row \(i\) and column \(j\) deleted. The signs \((-1)^{i+j}\) form a checkerboard starting with \(+\).
Row operations. Swapping two rows changes the sign; multiplying a row by \(k\) multiplies the determinant by \(k\); adding a multiple of one row to another leaves it unchanged. A triangular matrix has determinant equal to the product of its diagonal entries.
Pattern (permutation) formula. \(\det A\) is the sum, over all ways of choosing one entry from each row and each column, of the product of the chosen entries times the sign of the pattern (\(+\) for an even number of inversions, \(-\) for odd). Useful when a matrix has very few nonzero entries. For \(2\times 2\) there are two patterns: \(a_{11}a_{22}\) (no inversions, sign \(+\)) and \(a_{12}a_{21}\) (one inversion, sign \(-\)), which is \(ad - bc\).
- Products \(\det(AB) = \det A \det B\), so \(\det(A^k) = (\det A)^k\) and \(\det(A^{-1}) = 1/\det A\).
- Transpose \(\det A^T = \det A\): everything true for rows is true for columns.
- Scalars \(\det(kA) = k^n\det A\) for an \(n\times n\) matrix (every row is scaled).
- Zero \(\det A = 0\) iff the rows (or columns) are linearly dependent, e.g. a repeated row, a zero row, or one row a combination of others.
- Blocks for a block triangular matrix \(\det\begin{bmatrix} P & R \\ 0 & Q \end{bmatrix} = \det P \det Q\).
- Eigenvalues \(\det A = \lambda_1\lambda_2\cdots\lambda_n\) (with multiplicity), and \(\det(S^{-1}AS) = \det A\).
- Orthogonal \(\det Q = \pm 1\). Projection (not the identity) \(\det P = 0\).
- Vandermonde the matrix with rows \(1, x_i, x_i^2, \dots\) (or its transpose) has determinant \(\prod_{i \lt j}(x_j - x_i)\), the product of all differences of the nodes: for nodes \(1, 2, 3\) it is \((2 - 1)(3 - 1)(3 - 2) = 2\). It is nonzero exactly when the nodes are distinct, which is why a polynomial of degree \(\lt n\) is determined by its values at \(n\) distinct points.
How to work it
- Look for a row or column with the most zeros and expand along it; one nonzero entry means the determinant is that entry times its cofactor.
- If the matrix is triangular or block triangular, multiply the diagonal entries or the block determinants.
- Otherwise row reduce to triangular form, recording each swap (sign change) and each scaling (factor), then multiply the diagonal.
- For matrices with structure (rank one plus a multiple of \(I\), circulant, symmetric with a known eigenbasis) use the eigenvalues: the determinant is their product.
Cofactor expansion. Along the first row of \(\begin{bmatrix} 2 & 1 & 3 \\ 0 & -1 & 4 \\ 1 & 2 & 0 \end{bmatrix}\):
\[2\begin{vmatrix} -1 & 4 \\ 2 & 0 \end{vmatrix} - 1\begin{vmatrix} 0 & 4 \\ 1 & 0 \end{vmatrix} + 3\begin{vmatrix} 0 & -1 \\ 1 & 2 \end{vmatrix} = 2(-8) - (-4) + 3(1) = -9.\]Any row or column gives the same answer provided the checkerboard signs are respected. Along column 2 the signs are \(-, +, -\): \(-1\cdot(0\cdot 0 - 4\cdot 1) + (-1)\cdot(2\cdot 0 - 3\cdot 1) - 2\cdot(2\cdot 4 - 3\cdot 0) = 4 + 3 - 16 = -9\).
Block structure. \(\det\begin{bmatrix} 1 & 2 & 5 & 7 \\ 3 & 4 & 6 & 8 \\ 0 & 0 & 2 & 1 \\ 0 & 0 & 1 & 3 \end{bmatrix} = \det\begin{bmatrix} 1 & 2 \\ 3 & 4 \end{bmatrix}\det\begin{bmatrix} 2 & 1 \\ 1 & 3 \end{bmatrix} = (-2)(5) = -10.\)
Eigenvalues. \(D = 10I + M\) where every row of \(M\) is \((1, 2, 3)\). \(M\) has rank one, so its eigenvalues are \(\operatorname{tr}M = 6\) and \(0, 0\); those of \(D\) are \(16, 10, 10\), and \(\det D = 1600\).
Row reduction. For \(\begin{bmatrix} 0 & 2 & 4 \\ 1 & 1 & 1 \\ 2 & 3 & 5 \end{bmatrix}\): swap \(R_1 \leftrightarrow R_2\) to get a nonzero pivot (the determinant changes sign), then \(R_3 - 2R_1\) gives \((0, 1, 3)\); factor \(2\) out of \(R_2 = (0, 2, 4)\) to leave \((0, 1, 2)\) (the determinant is \(2\) times the new one); then \(R_3 - R_2\) gives \((0, 0, 1)\). The triangular matrix has diagonal \(1, 1, 1\), so
\[\det = (-1)\cdot 2\cdot(1\cdot 1\cdot 1) = -2\]agreeing with the cofactor expansion along the first row, \(0 - 2(5 - 2) + 4(3 - 2) = -2\). Only swaps and scalings leave a trace; row replacements are free.
Watch out. \(\det(A + B) \ne \det A + \det B\) and \(\det(kA) \ne k\det A\). When you factor \(k\) out of a row during row reduction, remember to multiply the final product by \(k\), not divide.
Practice: problems 4, 6, 7, 8 · Challenge: problems 35, 37, 38, 39, 43, 44, 45, 46, 52, 53, 90, 111, 116, 122, 131 (the practice groups are the last entries in the contents).
Cramer’s rule and the adjugate
Unit I: Matrices and linear systems · Topic 6 of 23
Key idea
Cramer’s rule writes each unknown of a square system \(A\mathbf{x} = \mathbf{b}\) as a ratio of two determinants, and the adjugate formula writes \(A^{-1}\) in terms of cofactors. Both are exact and both are convenient for \(2\times 2\) and \(3\times 3\) problems or when the coefficients are symbols; for anything bigger, row reduction is far less work.
Cramer’s rule. If \(A\) is \(n\times n\) with \(\det A \ne 0\), the unique solution of \(A\mathbf{x} = \mathbf{b}\) is
\[x_i = \frac{\det A_i}{\det A}\] \[i = 1, \dots, n\]where \(A_i\) is \(A\) with its \(i\)-th column replaced by \(\mathbf{b}\).
Adjugate (adjoint) inverse. With \(C = [C_{ij}]\) the matrix of cofactors,
\[\operatorname{adj}(A) = C^T\] \[A^{-1} = \frac{1}{\det A}\operatorname{adj}(A).\]Entry \((i,j)\) of \(A^{-1}\) is \(C_{ji}/\det A\): the cofactor of the transposed position.
For \(3\times 3\) matrices the adjugate route needs nine \(2\times 2\) determinants plus one \(3\times 3\); row reduction is usually faster unless the entries are symbolic.
- Use it for one unknown out of several, for coefficients containing parameters, and to see how a solution depends on the data (each \(x_i\) is a rational function of the entries).
- Avoid it for numerical \(4\times 4\) systems and larger: \(n + 1\) determinants of size \(n\) cost far more than one elimination.
- Requirement \(\det A \ne 0\). If \(\det A = 0\) the rule says nothing; the system then has no solution or infinitely many, and you must row reduce.
The adjugate formula also gives the \(2\times 2\) inverse at once: the cofactor matrix of \(\begin{bmatrix} a & b \\ c & d \end{bmatrix}\) is \(\begin{bmatrix} d & -c \\ -b & a \end{bmatrix}\), whose transpose over \(ad - bc\) is the familiar formula.
With a parameter: \(ax + y = 1,\ x + ay = 0\) has \(D = a^2 - 1\), \(D_x = \begin{vmatrix} 1 & 1 \\ 0 & a \end{vmatrix} = a\), \(D_y = \begin{vmatrix} a & 1 \\ 1 & 0 \end{vmatrix} = -1\), so \(x = \dfrac{a}{a^2 - 1}\), \(y = \dfrac{-1}{a^2 - 1}\) for every \(a \ne \pm 1\); at \(a = \pm 1\) the rule is silent and row reduction shows there is no solution.
\(A\,\operatorname{adj}(A) = (\det A)I\) holds for every square matrix, invertible or not.
How to work it
- Compute \(D = \det A\). If \(D = 0\), stop: Cramer does not apply.
- For the unknown \(x_i\), build \(A_i\) by replacing column \(i\) of \(A\) with \(\mathbf{b}\).
- Compute \(\det A_i\) and divide: \(x_i = \det A_i / D\).
- Substitute the answers into one original equation as a check.
\(2x + y = 7,\ x - 3y = -7\): \(D = \begin{vmatrix} 2 & 1 \\ 1 & -3 \end{vmatrix} = -7\), so
\[x = \frac{\begin{vmatrix} 7 & 1 \\ -7 & -3 \end{vmatrix}}{-7} = \frac{-21 + 7}{-7} = 2\] \[y = \frac{\begin{vmatrix} 2 & 7 \\ 1 & -7 \end{vmatrix}}{-7} = \frac{-14 - 7}{-7} = 3.\]For \(x + y + z = 6,\ 2x - y + z = 3,\ x + 2y + 3z = 14\) (solved by elimination on an earlier tab), \(D = \begin{vmatrix} 1 & 1 & 1 \\ 2 & -1 & 1 \\ 1 & 2 & 3 \end{vmatrix} = -5\) and
\[z = \frac{1}{-5}\begin{vmatrix} 1 & 1 & 6 \\ 2 & -1 & 3 \\ 1 & 2 & 14 \end{vmatrix} = \frac{1(-14 - 6) - 1(28 - 3) + 6(4 + 1)}{-5} = \frac{-15}{-5} = 3\]agreeing with the earlier answer without computing \(x\) and \(y\).
Adjugate. For \(A = \begin{bmatrix} 1 & 1 & 0 \\ 0 & 1 & 1 \\ 1 & 0 & 1 \end{bmatrix}\), inverted by row reduction on the previous tab, \(\det A = 1(1 - 0) - 1(0 - 1) + 0 = 2\), and the nine cofactors (minor with the checkerboard sign) are \(C_{11} = 1\), \(C_{12} = -(0 - 1) = 1\), \(C_{13} = 0 - 1 = -1\), \(C_{21} = -(1 - 0) = -1\), \(C_{22} = 1\), \(C_{23} = -(0 - 1) = 1\), \(C_{31} = 1\), \(C_{32} = -(1 - 0) = -1\), \(C_{33} = 1\). Transposing the cofactor matrix and dividing by \(\det A\),
\[A^{-1} = \frac{1}{2}\begin{bmatrix} 1 & -1 & 1 \\ 1 & 1 & -1 \\ -1 & 1 & 1 \end{bmatrix}\]the same matrix as before. Note that the entry in row 1, column 2 is \(C_{21}/\det A = -\tfrac12\), not \(C_{12}/\det A\).
Watch out. Replace the column, not the row, and replace the column of the unknown you want. Students also forget that the adjugate is the transpose of the cofactor matrix; for a symmetric cofactor matrix the slip is invisible, for others it is fatal.
Practice: problem 9 · Challenge: problems 46, 50 (the practice groups are the last entries in the contents).
LU factorization
Unit I: Matrices and linear systems · Topic 7 of 23
Key idea
Gauss elimination without row swaps factors \(A = LU\): \(U\) is the upper triangular echelon form and \(L\) is unit lower triangular, holding the multipliers used along the way. The factorization stores the whole elimination, so a system with a new right-hand side is solved by two triangular substitutions instead of a fresh elimination.
Eliminate below the pivots using only \(R_i \to R_i - m_{ij}R_j\). Then
\[A = LU\] \[U = \text{the echelon form}\] \[L = \begin{bmatrix} 1 & 0 & 0 \\ m_{21} & 1 & 0 \\ m_{31} & m_{32} & 1 \end{bmatrix}\]with \(m_{ij} = \dfrac{\text{entry to be cleared}}{\text{pivot}}\) placed in row \(i\), column \(j\) of \(L\) (the multiplier itself, with its sign as subtracted).
Solving \(A\mathbf{x} = \mathbf{b}\). Write \(LU\mathbf{x} = \mathbf{b}\), set \(U\mathbf{x} = \mathbf{y}\):
\[L\mathbf{y} = \mathbf{b} \ \text{(forward substitution)}\] \[U\mathbf{x} = \mathbf{y} \ \text{(back substitution)}.\]With row swaps. If a zero pivot forces interchanges, collect them in a permutation matrix \(P\) and factor \(PA = LU\).
- Many right-hand sides elimination costs about \(n^3/3\) operations once; each new \(\mathbf{b}\) then costs about \(n^2\). Design problems, iterative schemes and inverses all reuse \(L\) and \(U\).
- Determinant \(\det A = \det L \det U = u_{11}u_{22}\cdots u_{nn}\) (times \(\pm 1\) for the swaps in \(P\)).
- Existence \(A = LU\) with no swaps exists exactly when every pivot met during elimination is nonzero, equivalently when all leading principal minors are nonzero. Then the factorization with unit diagonal \(L\) is unique.
- Variants \(LDU\) (unit diagonals on both, pivots in \(D\)); for symmetric positive definite \(A\), the Cholesky form \(A = R^TR\). For the example below, \(D = \operatorname{diag}(2, -8, 1)\) and the unit upper factor is \(D^{-1}U = \begin{bmatrix} 1 & \tfrac12 & \tfrac12 \\ 0 & 1 & \tfrac14 \\ 0 & 0 & 1 \end{bmatrix}\): divide each row of \(U\) by its pivot.
\(L\) is never computed by inverting anything: its entries are simply the multipliers you already wrote down.
How to work it
- Run elimination on \(A\) (not augmented), recording each multiplier \(m_{ij}\) as you clear entry \((i, j)\). Never swap rows unless forced; if forced, track \(P\).
- Read off \(U\) (the final echelon matrix) and \(L\) (ones on the diagonal, multipliers below).
- Check \(LU = A\) by multiplying one or two rows.
- Forward substitute \(L\mathbf{y} = \mathbf{b}\) from the top, then back substitute \(U\mathbf{x} = \mathbf{y}\) from the bottom.
\(A = \begin{bmatrix} 2 & 1 & 1 \\ 4 & -6 & 0 \\ -2 & 7 & 2 \end{bmatrix}\), \(\mathbf{b} = \begin{bmatrix} 5 \\ -2 \\ 9 \end{bmatrix}\).
\(R_2 - 2R_1\) (\(m_{21} = 2\)) gives \((0, -8, -2)\); \(R_3 - (-1)R_1\) (\(m_{31} = -1\)) gives \((0, 8, 3)\); \(R_3 - (-1)R_2\) (\(m_{32} = -1\)) gives \((0, 0, 1)\).
\[L = \begin{bmatrix} 1 & 0 & 0 \\ 2 & 1 & 0 \\ -1 & -1 & 1 \end{bmatrix}\] \[U = \begin{bmatrix} 2 & 1 & 1 \\ 0 & -8 & -2 \\ 0 & 0 & 1 \end{bmatrix}.\]Forward: \(y_1 = 5\); \(2(5) + y_2 = -2 \Rightarrow y_2 = -12\); \(-5 + 12 + y_3 = 9 \Rightarrow y_3 = 2\).
Back: \(x_3 = 2\); \(-8x_2 - 4 = -12 \Rightarrow x_2 = 1\); \(2x_1 + 1 + 2 = 5 \Rightarrow x_1 = 1\). So \(\mathbf{x} = (1, 1, 2)\); check row 3 of \(A\): \(-2 + 7 + 4 = 9\). Also \(\det A = 2(-8)(1) = -16\).
With a forced swap. \(A = \begin{bmatrix} 0 & 2 & 1 \\ 1 & 1 & 0 \\ 2 & 1 & 3 \end{bmatrix}\) has a zero in the first pivot position, so swap rows 1 and 2 first and record it in \(P\): \(PA = \begin{bmatrix} 1 & 1 & 0 \\ 0 & 2 & 1 \\ 2 & 1 & 3 \end{bmatrix}\) with \(P = \begin{bmatrix} 0 & 1 & 0 \\ 1 & 0 & 0 \\ 0 & 0 & 1 \end{bmatrix}\). Now eliminate as usual: \(R_3 - 2R_1\) (\(m_{31} = 2\)) gives \((0, -1, 3)\), and \(R_3 - (-\tfrac12)R_2\) (\(m_{32} = -\tfrac12\)) gives \((0, 0, \tfrac72)\). So
\[PA = LU,\qquad L = \begin{bmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 2 & -\tfrac12 & 1 \end{bmatrix},\qquad U = \begin{bmatrix} 1 & 1 & 0 \\ 0 & 2 & 1 \\ 0 & 0 & \tfrac72 \end{bmatrix}\]and \(\det A = -\det(PA) = -(1\cdot 2\cdot\tfrac72) = -7\), the minus sign coming from the one swap. To solve \(A\mathbf{x} = \mathbf{b}\), apply the same swap to \(\mathbf{b}\) and then substitute through \(L\) and \(U\) as before.
Watch out. The multiplier goes into \(L\) with the sign you subtracted: clearing with \(R_3 + R_1\) means \(m_{31} = -1\). Writing \(+1\) there makes \(LU \ne A\), which is why the quick multiplication check in the steps is not optional.
Practice: problem 10 · Challenge: problem 45 (the practice groups are the last entries in the contents).
Vector spaces and subspaces
Unit II: Vector spaces · Topic 8 of 23
Key idea
A vector space is any set where you can add two elements and multiply an element by a scalar, and where those operations obey the familiar rules of \(\mathbb{R}^n\). The payoff is that one theory covers arrows, matrices, polynomials, functions and the solutions of linear equations alike. A subspace is a subset that is a vector space in its own right, and there is a three-line test for it.
\(V\) with operations \(\mathbf{u} + \mathbf{v}\) and \(c\mathbf{v}\) is a vector space if sums and scalar multiples stay in \(V\) and: addition is commutative and associative; there is a zero vector \(\mathbf{0}\); every \(\mathbf{v}\) has a negative; \(c(\mathbf{u} + \mathbf{v}) = c\mathbf{u} + c\mathbf{v}\); \((c + d)\mathbf{v} = c\mathbf{v} + d\mathbf{v}\); \(c(d\mathbf{v}) = (cd)\mathbf{v}\); \(1\mathbf{v} = \mathbf{v}\).
- \(\mathbb{R}^n\) column vectors with \(n\) real entries; \(\mathbb{C}^n\) with complex entries.
- \(M_{m\times n}\) all \(m\times n\) matrices.
- \(P_n\) polynomials of degree at most \(n\) (the zero polynomial included).
- \(C[a,b]\), \(C^\infty\) continuous or smooth functions on an interval.
- Solution spaces all solutions of \(A\mathbf{x} = \mathbf{0}\); all solutions of a homogeneous linear differential equation such as \(y'' + y = 0\).
Consequences of the axioms: \(0\mathbf{v} = \mathbf{0}\), \(c\mathbf{0} = \mathbf{0}\), \((-1)\mathbf{v} = -\mathbf{v}\), and the zero vector is unique. For instance \(0\mathbf{v} = (0 + 0)\mathbf{v} = 0\mathbf{v} + 0\mathbf{v}\), and adding the negative of \(0\mathbf{v}\) to both sides leaves \(\mathbf{0} = 0\mathbf{v}\).
\(W \subseteq V\) is a subspace iff
\[\mathbf{0} \in W\] \[\mathbf{u}, \mathbf{v} \in W \Rightarrow \mathbf{u} + \mathbf{v} \in W\] \[\mathbf{v} \in W,\ c \in \mathbb{R} \Rightarrow c\mathbf{v} \in W.\]Equivalently, \(W\) is nonempty and closed under linear combinations \(a\mathbf{u} + b\mathbf{v}\).
- Subspaces lines and planes through the origin; \(\{\mathbf{x} : A\mathbf{x} = \mathbf{0}\}\); the span of any set of vectors; polynomials with \(f(1) = 0\); symmetric matrices; even functions.
- Not subspaces a line or plane missing the origin (\(x_1 + x_2 = 1\): no zero vector); \(\{|x_1| = |x_2|\}\) (closed under scaling but \((1,1) + (1,-1) = (2,0)\) escapes); \(\{x_1x_2 \ge 0\}\) (two quadrants: fails addition); polynomials of degree exactly \(n\) (no zero polynomial); invertible matrices (no zero matrix).
To prove "not a subspace" one counterexample suffices; to prove "subspace" you must argue for arbitrary elements.
How to work it
- Check the zero vector first: if \(\mathbf{0}\notin W\), you are done (not a subspace).
- Take two arbitrary elements of \(W\) (write them with the defining property) and show their sum has the property.
- Take an arbitrary element and an arbitrary scalar \(c\) and show the multiple has the property. Absolute values, squares, products of coordinates and inequalities are the usual places where this fails.
- If any check fails, exhibit the specific vectors that break it.
\(U = \{(x, y, z) : x + y + z = 0\}\) is a subspace of \(\mathbb{R}^3\). \(\mathbf{0}\) satisfies \(0 + 0 + 0 = 0\). If \(\mathbf{u} = (x_1, y_1, z_1)\) and \(\mathbf{v} = (x_2, y_2, z_2)\) are in \(U\), then \((x_1 + x_2) + (y_1 + y_2) + (z_1 + z_2) = 0 + 0 = 0\), and \(cx_1 + cy_1 + cz_1 = c\cdot 0 = 0\). Both closures hold, so \(U\) is a subspace (a plane through the origin).
\(N = \{(x, y) : xy = 0\}\) is not a subspace of \(\mathbb{R}^2\). It contains \(\mathbf{0}\) and is closed under scaling, but \((1, 0) \in N\) and \((0, 1) \in N\) while \((1, 0) + (0, 1) = (1, 1) \notin N\) since \(1\cdot 1 \ne 0\). The union of the two axes fails the addition test.
Beyond \(\mathbb{R}^n\). The symmetric \(2\times 2\) matrices form a subspace of \(M_{2\times 2}\): the zero matrix is symmetric; if \(A^T = A\) and \(B^T = B\) then \((A + B)^T = A^T + B^T = A + B\) and \((cA)^T = cA^T = cA\). The same three lines, with "symmetric" replaced by any property that is preserved by sums and multiples, is the whole proof. The invertible \(2\times 2\) matrices are not a subspace: the zero matrix is not invertible, and even ignoring that, \(I + (-I) = 0\) shows the sum of two invertible matrices can fail to be invertible.
Watch out. Closure under scalar multiplication alone is not enough: \(|x_1| = |x_2|\) and \(xy = 0\) both pass it and both fail addition. Conversely a set closed under addition but not under negatives (the first quadrant) is not a subspace either.
Practice: problems 11, 12 · Challenge: problems 55, 56, 57, 119 (the practice groups are the last entries in the contents).
Span, linear combinations and independence
Unit II: Vector spaces · Topic 9 of 23
Key idea
A linear combination of \(\mathbf{v}_1, \dots, \mathbf{v}_k\) is \(c_1\mathbf{v}_1 + \cdots + c_k\mathbf{v}_k\); the set of all of them is the span, always a subspace. The vectors are linearly independent when the only combination that gives \(\mathbf{0}\) is the trivial one, which is the same as saying none of them is a combination of the others. Both questions reduce to a system of linear equations.
\(\mathbf{w} \in \operatorname{span}\{\mathbf{v}_1, \dots, \mathbf{v}_k\}\) iff the system \([\mathbf{v}_1 \cdots \mathbf{v}_k]\mathbf{c} = \mathbf{w}\) is consistent.
Independence:
\[c_1\mathbf{v}_1 + \cdots + c_k\mathbf{v}_k = \mathbf{0}\] \[\Longrightarrow\ c_1 = \cdots = c_k = 0.\]Test. Put the vectors as columns of \(A\) and row reduce. Independent iff every column is a pivot column (\(\operatorname{rank} A = k\)); dependent iff some column is free, and the free-variable solution of \(A\mathbf{c} = \mathbf{0}\) gives an explicit dependence.
For \(n\) vectors in \(\mathbb{R}^n\): independent iff \(\det A \ne 0\).
More than \(n\) vectors in \(\mathbb{R}^n\) are always dependent; fewer than \(n\) can never span \(\mathbb{R}^n\).
- Zero any set containing \(\mathbf{0}\) is dependent.
- Two vectors dependent iff one is a multiple of the other (parallel).
- Subsets every subset of an independent set is independent; every superset of a dependent set is dependent.
- Adding a vector \(\{\mathbf{v}_1, \dots, \mathbf{v}_k, \mathbf{w}\}\) is independent iff the \(\mathbf{v}_i\) are and \(\mathbf{w}\notin\operatorname{span}\{\mathbf{v}_i\}\).
- Polynomials set the combination equal to the zero polynomial and compare coefficients of each power of \(x\). E.g. \(a(1 + x) + b(1 - x) + cx^2 = 0\) gives \(c = 0\) (from \(x^2\)), \(a - b = 0\) (from \(x\)) and \(a + b = 0\) (constants), so \(a = b = c = 0\): independent.
- Functions a nonzero Wronskian \(W(f_1, \dots, f_k)\) (the determinant of the functions and their successive derivatives) at one point proves independence, e.g. \(W(e^t, e^{2t}) = \begin{vmatrix} e^t & e^{2t} \\ e^t & 2e^{2t} \end{vmatrix} = e^{3t} \ne 0\); \(e^{\lambda t}\) and \(te^{\lambda t}\) are independent, so are \(\sin t\) and \(\cos t\).
- Abstract proofs assume a combination equals \(\mathbf{0}\), regroup it as a combination of the vectors known to be independent, and read off that all coefficients vanish.
How to work it
- Write the vectors as the columns of a matrix \(A\).
- Row reduce \(A\) (not augmented: the right-hand side is \(\mathbf{0}\) and stays \(\mathbf{0}\)).
- Count pivots. Pivots in every column: independent. A free column: dependent.
- If dependent and asked for a relation, solve \(A\mathbf{c} = \mathbf{0}\) with the free variable set to 1 and write the resulting equation among the vectors.
\(\mathbf{v}_1 = (1, 2, 3)\), \(\mathbf{v}_2 = (2, 3, 4)\), \(\mathbf{v}_3 = (3, 4, 5)\):
\[\det\begin{bmatrix} 1 & 2 & 3 \\ 2 & 3 & 4 \\ 3 & 4 & 5 \end{bmatrix} = 1(15 - 16) - 2(10 - 12) + 3(8 - 9) = -1 + 4 - 3 = 0\]so they are dependent. Row reducing \([\mathbf{v}_1\ \mathbf{v}_2\ \mathbf{v}_3]\mathbf{c} = \mathbf{0}\) gives \(c_1 = c_3\), \(c_2 = -2c_3\); with \(c_3 = 1\): \(\mathbf{v}_1 - 2\mathbf{v}_2 + \mathbf{v}_3 = \mathbf{0}\). Indeed \(\mathbf{v}_2\) is the average of the other two, and the span is only a plane.
\(\mathbf{w}_1 = (1, 0, 1)\), \(\mathbf{w}_2 = (0, 1, 1)\), \(\mathbf{w}_3 = (1, 1, 0)\): the determinant is \(1(0 - 1) - 0 + 1(0 - 1) = -2 \ne 0\), so they are independent and span all of \(\mathbb{R}^3\).
Is a vector in the span? To decide whether \(\mathbf{w} = (1, 1, 1)\) lies in \(\operatorname{span}\{\mathbf{v}_1, \mathbf{v}_2\}\), row reduce the augmented matrix \([\mathbf{v}_1\ \mathbf{v}_2 \mid \mathbf{w}]\):
\[\left[\begin{array}{cc|c} 1 & 2 & 1 \\ 2 & 3 & 1 \\ 3 & 4 & 1 \end{array}\right] \xrightarrow{R_2 - 2R_1,\ R_3 - 3R_1} \left[\begin{array}{cc|c} 1 & 2 & 1 \\ 0 & -1 & -1 \\ 0 & -2 & -2 \end{array}\right] \xrightarrow{R_3 - 2R_2} \left[\begin{array}{cc|c} 1 & 2 & 1 \\ 0 & -1 & -1 \\ 0 & 0 & 0 \end{array}\right]\]Consistent, so yes: \(c_2 = 1\) and \(c_1 = 1 - 2 = -1\), i.e. \(\mathbf{w} = -\mathbf{v}_1 + \mathbf{v}_2\). With \(\mathbf{w} = (0, 0, 1)\) instead, the same operations end in the row \((0\ \ 0 \mid 1)\), so that vector is not in the span.
Watch out. "Independent" is a property of the set, not of individual vectors, and it is not the same as "pairwise non-parallel": \((1,0), (0,1), (1,1)\) are pairwise non-parallel yet dependent.
Practice: problems 13, 16, 30 · Challenge: problems 58, 59, 68, 74 (the practice groups are the last entries in the contents).
Basis and dimension
Unit II: Vector spaces · Topic 10 of 23
Key idea
A basis of a vector space is a linearly independent set that spans it: just enough vectors to reach everything, with no redundancy. Every vector then has unique coordinates with respect to the basis, every basis of a given space has the same number of vectors, and that number is the dimension.
\(\mathcal{B} = \{\mathbf{b}_1, \dots, \mathbf{b}_n\}\) is a basis of \(V\) iff it is independent and \(\operatorname{span}\mathcal{B} = V\). Then every \(\mathbf{v} \in V\) is uniquely
\[\mathbf{v} = c_1\mathbf{b}_1 + \cdots + c_n\mathbf{b}_n\] \[[\mathbf{v}]_{\mathcal{B}} = \begin{bmatrix} c_1 \\ \vdots \\ c_n \end{bmatrix}.\]\(\dim V = n\), the size of any basis.
- \(\mathbb{R}^n\) standard basis \(\mathbf{e}_1, \dots, \mathbf{e}_n\); dimension \(n\).
- \(P_n\) basis \(1, x, x^2, \dots, x^n\); dimension \(n + 1\).
- \(M_{m\times n}\) the matrices \(E_{ij}\) with a single 1; dimension \(mn\). Symmetric \(n\times n\): \(n(n+1)/2\).
- \(\{\mathbf{0}\}\) dimension 0 (the empty basis).
- Count in an \(n\)-dimensional space, any \(n\) independent vectors form a basis, and any \(n\) spanning vectors form a basis. You only check one of the two properties.
- Extend any independent set can be enlarged to a basis; any spanning set contains a basis (drop vectors that are combinations of the others).
- Subspaces if \(W \subseteq V\) then \(\dim W \le \dim V\), with equality iff \(W = V\).
- Constraints a subspace of \(\mathbb{R}^n\) cut out by \(k\) independent homogeneous linear equations has dimension \(n - k\); one equation gives a hyperplane of dimension \(n - 1\).
- Images an invertible matrix maps a basis to a basis; a basis of a span is found by row reducing and keeping the pivot columns (original vectors).
- Sums and intersections for subspaces \(U, W\) of \(V\), \(U + W = \{\mathbf{u} + \mathbf{w}\}\) is the smallest subspace containing both (spanned by a basis of \(U\) together with a basis of \(W\)), \(U \cap W\) is a subspace, and \(\dim(U + W) = \dim U + \dim W - \dim(U \cap W)\), the vector-space version of inclusion–exclusion: the two bases overlap in exactly a basis of the intersection. When \(U \cap W = \{\mathbf{0}\}\) the sum is direct, written \(U \oplus W\), and every vector of it splits uniquely as \(\mathbf{u} + \mathbf{w}\).
A basis is an ordered set when coordinates are involved: swapping two basis vectors swaps two coordinates.
How to work it
- Write the defining equations as a homogeneous system and row reduce.
- Solve for the basic variables in terms of the free variables.
- Set one free variable to 1 and the rest to 0, one at a time; each choice gives a basis vector.
- The number of free variables is the dimension. Check independence (automatic, since each vector has a 1 where the others have 0).
Basis of \(W = \{(x, y, z, w) : x + y + z + w = 0\}\). One equation, \(x = -y - z - w\), with \(y, z, w\) free:
\[\begin{bmatrix} -1 \\ 1 \\ 0 \\ 0 \end{bmatrix},\quad \begin{bmatrix} -1 \\ 0 \\ 1 \\ 0 \end{bmatrix},\quad \begin{bmatrix} -1 \\ 0 \\ 0 \\ 1 \end{bmatrix}\] \[\dim W = 4 - 1 = 3.\]Coordinates. In the basis \(\mathbf{b}_1 = (1, 1)\), \(\mathbf{b}_2 = (1, -1)\) of \(\mathbb{R}^2\), the vector \((2, 3)\) has coordinates from \(c_1 + c_2 = 2\), \(c_1 - c_2 = 3\): \(c_1 = \tfrac52\), \(c_2 = -\tfrac12\), so \([(2,3)]_{\mathcal{B}} = (\tfrac52, -\tfrac12)\). Check: \(\tfrac52(1,1) - \tfrac12(1,-1) = (2, 3)\).
Basis from a spanning set. For \(\operatorname{span}\{(1, 2, 3), (2, 3, 4), (3, 4, 5)\}\), the matrix with these vectors as columns row reduces (\(R_2 - 2R_1\), \(R_3 - 3R_1\), \(R_3 - 2R_2\), then \(-R_2\) and \(R_1 - 2R_2\)) to
\[\begin{bmatrix} 1 & 0 & -1 \\ 0 & 1 & 2 \\ 0 & 0 & 0 \end{bmatrix}.\]Pivots in columns 1 and 2, so the original vectors \((1, 2, 3)\) and \((2, 3, 4)\) form a basis and the span has dimension \(2\). The free column tells you exactly why the third vector is dropped: \((3, 4, 5) = -1\cdot(1, 2, 3) + 2\cdot(2, 3, 4)\), with the coefficients read from column 3 of the reduced matrix.
Coordinates in \(P_2\). In the standard basis \(\{1, x, x^2\}\), \(p = 2 + 3x - x^2\) has coordinates \((2, 3, -1)\). In the basis \(\{1, x - 1, (x - 1)^2\}\), solve \(2 + 3x - x^2 = a + b(x - 1) + c(x - 1)^2\) by comparing coefficients: \(x^2\) gives \(c = -1\); \(x\) gives \(b - 2c = 3\), so \(b = 1\); constants give \(a - b + c = 2\), so \(a = 4\). Thus \([p]_{\mathcal{B}} = (4, 1, -1)\); check: \(4 + (x - 1) - (x - 1)^2 = 4 + x - 1 - x^2 + 2x - 1 = 2 + 3x - x^2\).
Extending to a basis. To extend the independent pair \((1, 1, 0), (1, 0, 1)\) to a basis of \(\mathbb{R}^3\), append a standard vector and test independence: with \(\mathbf{e}_1\), \(\det\begin{bmatrix} 1 & 1 & 1 \\ 1 & 0 & 0 \\ 0 & 1 & 0 \end{bmatrix} = 1 \ne 0\), so \(\{(1, 1, 0), (1, 0, 1), \mathbf{e}_1\}\) is a basis. Any vector outside the plane \(x - y - z = 0\) spanned by the pair would do; the determinant test is just the quickest way to confirm the choice.
Sum and intersection. In \(\mathbb{R}^3\) let \(U\) be the \(xy\)-plane, spanned by \(\mathbf{e}_1, \mathbf{e}_2\), and \(W\) the \(yz\)-plane, spanned by \(\mathbf{e}_2, \mathbf{e}_3\). Then \(U + W\) is spanned by \(\mathbf{e}_1, \mathbf{e}_2, \mathbf{e}_2, \mathbf{e}_3\), i.e. all of \(\mathbb{R}^3\) (dimension \(3\)), and \(U \cap W\) is the \(y\)-axis (dimension \(1\)); the formula checks: \(2 + 2 = 3 + 1\). Two planes through the origin in \(\mathbb{R}^3\) always meet in at least a line for the same reason: \(\dim(U \cap W) = 2 + 2 - \dim(U + W) \ge 4 - 3 = 1\). By contrast \(U \oplus \operatorname{span}\{\mathbf{e}_3\} = \mathbb{R}^3\) is a direct sum, since the plane and the \(z\)-axis meet only at \(\mathbf{0}\).
Watch out. Dimension counts basis vectors, not the number of entries in each vector: a plane in \(\mathbb{R}^4\) has dimension 2. And \(P_n\) has dimension \(n + 1\), not \(n\), because of the constant term.
Practice: problems 12, 17 · Challenge: problems 55, 56, 60, 68, 69, 120 (the practice groups are the last entries in the contents).
Rank, null space, column space and the dimension theorem
Unit II: Vector spaces · Topic 11 of 23
Key idea
Every \(m\times n\) matrix carries four fundamental subspaces. The column space (image) is where \(A\mathbf{x}\) can land, the null space (kernel) is what \(A\) sends to zero, and their dimensions are tied by the rank–nullity theorem: rank plus nullity equals the number of columns. Row reduction finds bases for all of them at once.
- \(\operatorname{Col} A = \operatorname{Im} A\) span of the columns, a subspace of \(\mathbb{R}^m\). Basis: the pivot columns of the original \(A\) (not of the RREF).
- \(\operatorname{Nul} A = \ker A\) \(\{\mathbf{x} : A\mathbf{x} = \mathbf{0}\}\), a subspace of \(\mathbb{R}^n\). Basis: the parameter vectors of the general solution.
- \(\operatorname{Row} A\) span of the rows \(= \operatorname{Col} A^T\). Basis: the nonzero rows of the RREF.
- \(\operatorname{Nul} A^T\) the left null space, a subspace of \(\mathbb{R}^m\).
- Solvability \(A\mathbf{x} = \mathbf{b}\) is consistent iff \(\mathbf{b} \in \operatorname{Col} A\); it is consistent for every \(\mathbf{b}\) iff \(\operatorname{rank} A = m\).
- Bounds \(\operatorname{rank} A \le \min(m, n)\); \(\operatorname{rank}(AB) \le \min(\operatorname{rank} A, \operatorname{rank} B)\) (each column of \(AB\) is a combination of columns of \(A\), each row a combination of rows of \(B\)); so if \(A\) is \(3\times 2\) and \(B\) is \(2\times 3\), the \(3\times 3\) product \(AB\) has rank at most \(2\) and is always singular; \(\operatorname{rank} A^T = \operatorname{rank} A\).
- Orthogonality \(\operatorname{Nul} A \perp \operatorname{Row} A\) and \(\operatorname{Nul} A^T \perp \operatorname{Col} A\): a vector is perpendicular to the kernel exactly when it lies in the row space.
- Square \(\operatorname{rank} A = n\) iff \(A\) is invertible iff \(\operatorname{Nul} A = \{\mathbf{0}\}\).
- Wide matrices \(m \lt n\) forces a nonzero kernel; tall matrices (\(m \gt n\)) can have trivial kernel but never span \(\mathbb{R}^m\).
- Powers \(\ker A \subseteq \ker A^2\) and \(\operatorname{Im} A^2 \subseteq \operatorname{Im} A\).
How to work it
- Row reduce \(A\) to RREF and mark the pivot columns.
- Column space: take those same column numbers from the original matrix \(A\).
- Null space: solve \(A\mathbf{x} = \mathbf{0}\) from the RREF, free variables as parameters; the parameter vectors are the basis.
- Check: (number of pivot columns) + (number of free columns) = \(n\).
\(A = \begin{bmatrix} 1 & 2 & 0 & 3 \\ 0 & 0 & 1 & 4 \\ 1 & 2 & 1 & 7 \end{bmatrix}\). Since row 3 = row 1 + row 2, \(R_3 - R_1 - R_2\) gives the RREF
\[\begin{bmatrix} 1 & 2 & 0 & 3 \\ 0 & 0 & 1 & 4 \\ 0 & 0 & 0 & 0 \end{bmatrix}\] \[\operatorname{rank} A = 2\] \[\operatorname{nullity} A = 4 - 2 = 2.\]Pivot columns 1 and 3, so a basis of \(\operatorname{Col} A\) is \((1, 0, 1), (0, 1, 1)\) (columns of \(A\) itself).
Null space: \(x_1 = -2x_2 - 3x_4\), \(x_3 = -4x_4\):
\[\operatorname{Nul} A = \operatorname{span}\left\{\begin{bmatrix} -2 \\ 1 \\ 0 \\ 0 \end{bmatrix}, \begin{bmatrix} -3 \\ 0 \\ -4 \\ 1 \end{bmatrix}\right\}.\]Each basis vector is perpendicular to both nonzero rows of the RREF (e.g. \((1, 2, 0, 3)\cdot(-3, 0, -4, 1) = -3 + 3 = 0\)), as the row space and null space must be.
Row space and solvability. A basis of \(\operatorname{Row} A\) is the two nonzero rows of the RREF, \((1, 2, 0, 3)\) and \((0, 0, 1, 4)\). To test whether \(\mathbf{b} = (1, 2, 5)\) is in \(\operatorname{Col} A\), reduce \([A \mid \mathbf{b}]\) with the same operation \(R_3 - R_1 - R_2\): the last row becomes \((0, 0, 0, 0 \mid 5 - 1 - 2) = (0, 0, 0, 0 \mid 2)\), so \(A\mathbf{x} = \mathbf{b}\) has no solution. With \(\mathbf{b} = (1, 2, 3)\) the last row is all zeros and the system is consistent: \(\mathbf{b}\) is in the column space exactly when \(b_3 = b_1 + b_2\), the same relation the rows of \(A\) satisfy.
Left null space. \(\operatorname{Nul} A^T\) consists of the \(\mathbf{y}\) with \(\mathbf{y}^TA = \mathbf{0}\), i.e. the combinations of rows that cancel. Since row 3 = row 1 + row 2, \(\mathbf{y} = (1, 1, -1)\) works and spans it (dimension \(m - \operatorname{rank} = 3 - 2 = 1\)). It is perpendicular to the column space: \((1, 1, -1)\cdot(1, 0, 1) = 0\) and \((1, 1, -1)\cdot(0, 1, 1) = 0\), and the consistency condition \(b_3 = b_1 + b_2\) is exactly \(\mathbf{y}\cdot\mathbf{b} = 0\).
Watch out. The columns of the RREF are not a basis of the column space of \(A\) (row operations change the column space). Use the pivot positions to pick columns of the original matrix.
Practice: problems 3, 14, 15, 16 · Challenge: problems 42, 49, 54, 61, 62, 63, 67, 73, 81, 101, 118, 132 (the practice groups are the last entries in the contents).
Eigenvalues and eigenvectors
Unit III: Eigenvalues and diagonalization · Topic 12 of 23
Key idea
An eigenvector of a square matrix is a nonzero vector that \(A\) merely stretches: \(A\mathbf{v} = \lambda\mathbf{v}\). The stretch factor \(\lambda\) is the eigenvalue. Eigenvalues are the roots of the characteristic polynomial \(\det(A - \lambda I)\), and the eigenvectors for each \(\lambda\) are the null space of \(A - \lambda I\). Almost every application of linear algebra, from vibrations to Markov chains to differential equations, runs through them.
\(p(\lambda) = \det(A - \lambda I)\) is the characteristic polynomial (degree \(n\)); its roots are the eigenvalues; the eigenspace \(E_\lambda = \operatorname{Nul}(A - \lambda I)\) is a subspace.
\[2\times 2:\quad p(\lambda) = \lambda^2 - (\operatorname{tr} A)\lambda + \det A\] \[\lambda = \frac{\operatorname{tr} A \pm \sqrt{(\operatorname{tr} A)^2 - 4\det A}}{2}.\] \[\lambda_1 + \cdots + \lambda_n = \operatorname{tr} A\] \[\lambda_1\lambda_2\cdots\lambda_n = \det A.\]Algebraic multiplicity of \(\lambda\): its multiplicity as a root. Geometric multiplicity: \(\dim E_\lambda\). Always \(1 \le \text{geometric} \le \text{algebraic}\).
For example \(\begin{bmatrix} 2 & 1 \\ 0 & 2 \end{bmatrix}\) and \(2I\) both have \(p(\lambda) = (\lambda - 2)^2\), so \(\lambda = 2\) has algebraic multiplicity \(2\) in each. But \(\begin{bmatrix} 2 & 1 \\ 0 & 2 \end{bmatrix} - 2I = \begin{bmatrix} 0 & 1 \\ 0 & 0 \end{bmatrix}\) has one free variable, so its eigenspace is the line spanned by \((1, 0)\) (geometric multiplicity \(1\)), while \(2I - 2I = 0\) has two free variables and every nonzero vector is an eigenvector (geometric multiplicity \(2\)).
- Triangular or diagonal the eigenvalues are the diagonal entries.
- Singular \(A\) is singular iff \(0\) is an eigenvalue; \(\ker A = E_0\).
- Functions of \(A\) \(A^k\) has eigenvalues \(\lambda^k\), \(A^{-1}\) has \(1/\lambda\), \(A + cI\) has \(\lambda + c\), and any polynomial \(p(A)\) has \(p(\lambda)\), all with the same eigenvectors.
- Transpose \(A^T\) has the same eigenvalues (not the same eigenvectors).
- Independence eigenvectors belonging to distinct eigenvalues are linearly independent.
- Complex a real matrix can have complex eigenvalues (they come in conjugate pairs); a rotation by \(\theta \ne 0, \pi\) has none real.
- Rank one \(\mathbf{u}\mathbf{v}^T\) has eigenvalues \({\mathbf{v}\cdot \mathbf{u}}\) and \(0\) (\(n - 1\) times), because \((\mathbf{u}\mathbf{v}^T)\mathbf{u} = \mathbf{u}(\mathbf{v}^T\mathbf{u})\) while every vector orthogonal to \(\mathbf{v}\) is sent to \(\mathbf{0}\). The all-ones \(n\times n\) matrix \(J\) has eigenvalues \(n\) and \(0\).
- Combinations if \(A\mathbf{v} = 5\mathbf{v}\) and \(A\mathbf{u} = -\mathbf{u}\) then \(A(3\mathbf{v} + 2\mathbf{u}) = 15\mathbf{v} - 2\mathbf{u}\); linearity, not an eigenvector.
- Cayley–Hamilton every square matrix satisfies its own characteristic equation: substituting \(A\) for \(\lambda\) in \(p(\lambda)\) gives the zero matrix. For \(2\times 2\), \(A^2 - (\operatorname{tr}A)A + (\det A)I = 0\); with \(A = \begin{bmatrix} 2 & 1 \\ 1 & 2 \end{bmatrix}\), \(A^2 = \begin{bmatrix} 5 & 4 \\ 4 & 5 \end{bmatrix}\) and \(A^2 - 4A + 3I = 0\) indeed. Multiply through by \(A^{-1}\) to get \(A^{-1} = \tfrac13(4I - A) = \tfrac13\begin{bmatrix} 2 & -1 \\ -1 & 2 \end{bmatrix}\), and use it to reduce any power \(A^k\) to a combination of \(I\) and \(A\). It does not say \(\det(A - AI) = 0\), which is trivial; the substitution happens after the polynomial is expanded.
How to work it
- Form \(A - \lambda I\) (subtract \(\lambda\) from the diagonal only) and expand \(\det(A - \lambda I)\).
- Factor the characteristic polynomial; the roots are the eigenvalues. Check that they add to \(\operatorname{tr} A\) and multiply to \(\det A\).
- For each \(\lambda\), row reduce \(A - \lambda I\) and solve \((A - \lambda I)\mathbf{v} = \mathbf{0}\); the free-variable vectors are a basis of \(E_\lambda\). There must be at least one free variable: if not, you have the wrong \(\lambda\).
- Verify one eigenvector by multiplying: \(A\mathbf{v}\) should be \(\lambda\mathbf{v}\).
Eigenvectors are determined only up to a nonzero multiple: \((1, 1)\), \((2, 2)\) and \((-1, -1)\) all answer the same question. Give the simplest representative, or a unit vector when an orthonormal basis is asked for.
\(A = \begin{bmatrix} 2 & 1 \\ 1 & 2 \end{bmatrix}\): \(p(\lambda) = \lambda^2 - 4\lambda + 3 = (\lambda - 1)(\lambda - 3)\), so \(\lambda = 1, 3\) (sum 4 = trace, product 3 = det).
\(\lambda = 3\): \(A - 3I = \begin{bmatrix} -1 & 1 \\ 1 & -1 \end{bmatrix}\), equation \(-v_1 + v_2 = 0\), eigenvector \((1, 1)\).
\(\lambda = 1\): \(A - I = \begin{bmatrix} 1 & 1 \\ 1 & 1 \end{bmatrix}\), equation \(v_1 + v_2 = 0\), eigenvector \((1, -1)\). Check: \(A(1,-1) = (1, -1)\).
\(B = \begin{bmatrix} 1 & 1 & 1 \\ 0 & 2 & 6 \\ 0 & 0 & 6 \end{bmatrix}\) is triangular: eigenvalues \(1, 2, 6\) at sight. For \(\lambda = 2\), \((B - 2I)\mathbf{v} = \mathbf{0}\) gives \(-v_1 + v_2 + v_3 = 0\), \(6v_3 = 0\) (and \(4v_3 = 0\)), so \(v_3 = 0\), \(v_1 = v_2\): eigenvector \((1, 1, 0)\).
Complex eigenvalues. \(C = \begin{bmatrix} 0 & -1 \\ 1 & 0 \end{bmatrix}\) (rotation by \(90^\circ\)): \(p(\lambda) = \lambda^2 + 1\), so \(\lambda = \pm i\) and there is no real eigenvector, as a rotation should have none. For \(\lambda = i\), the first row of \((C - iI)\mathbf{v} = \mathbf{0}\) is \(-iv_1 - v_2 = 0\), so \(\mathbf{v} = (1, -i)\); check \(C(1, -i) = (i, 1) = i\,(1, -i)\). The eigenvector for \(\lambda = -i\) is the conjugate, \((1, i)\).
A \(3\times 3\) with a repeated eigenvalue. \(E = \begin{bmatrix} 1 & 2 & 0 \\ 2 & 1 & 0 \\ 0 & 0 & 3 \end{bmatrix}\). Expand \(\det(E - \lambda I)\) along the third row: \((3 - \lambda)\big((1 - \lambda)^2 - 4\big) = (3 - \lambda)(\lambda - 3)(\lambda + 1)\), so \(\lambda = 3\) (algebraic multiplicity \(2\)) and \(\lambda = -1\). Check: \(3 + 3 - 1 = 5 = \operatorname{tr}E\) and \(3\cdot 3\cdot(-1) = -9 = \det E\). For \(\lambda = 3\), \(E - 3I = \begin{bmatrix} -2 & 2 & 0 \\ 2 & -2 & 0 \\ 0 & 0 & 0 \end{bmatrix}\) has rank \(1\), hence two free variables: \(E_3 = \operatorname{span}\{(1, 1, 0), (0, 0, 1)\}\), geometric multiplicity \(2\). For \(\lambda = -1\), \(E + I\) gives \(v_1 + v_2 = 0\), \(v_3 = 0\): eigenvector \((1, -1, 0)\). Check: \(E(1, -1, 0) = (-1, 1, 0)\).
Watch out. An eigenvector is never the zero vector, but an eigenvalue can be zero. And \(A - \lambda I\) subtracts \(\lambda\) from the diagonal only; subtracting it from every entry is a classic error.
Practice: problems 8, 18, 19, 22, 23 · Challenge: problems 36, 38, 52, 75, 78, 79, 83, 90, 117, 123, 124, 130 (the practice groups are the last entries in the contents).
Eigenbases and diagonalization
Unit III: Eigenvalues and diagonalization · Topic 13 of 23
Key idea
If \(A\) has \(n\) linearly independent eigenvectors, putting them in the columns of \(P\) gives \(A = PDP^{-1}\) with \(D\) diagonal: in the eigenbasis the matrix is just a list of stretch factors. Diagonalization makes powers, exponentials and long-run behaviour trivial, and the question "is \(A\) diagonalizable?" is answered by comparing multiplicities.
\(A\) is diagonalizable iff it has \(n\) independent eigenvectors iff for every eigenvalue the geometric multiplicity equals the algebraic multiplicity (over \(\mathbb{R}\), the eigenvalues must also be real).
- Sufficient \(n\) distinct eigenvalues \(\Rightarrow\) diagonalizable. Symmetric \(\Rightarrow\) diagonalizable (orthogonally).
- Not sufficient a repeated eigenvalue is fine as long as its eigenspace is big enough (\(I\) has \(\lambda = 1\) with multiplicity \(n\) and is diagonal already).
Similar matrices \(B = S^{-1}AS\) share eigenvalues, determinant, trace and rank, but not eigenvectors.
- Shear \(\begin{bmatrix} 1 & 1 \\ 0 & 1 \end{bmatrix}\): \(\lambda = 1\) twice, but \(E_1\) is one-dimensional. Not diagonalizable.
- Nilpotent a nonzero matrix with \(N^k = 0\) has only the eigenvalue \(0\), so diagonalizable would force \(N = 0\). Never diagonalizable (e.g. strictly upper triangular).
- Rotation complex eigenvalues \(e^{\pm i\theta}\): not diagonalizable over \(\mathbb{R}\), though it is over \(\mathbb{C}\). A permutation matrix that cycles \(5\) coordinates has eigenvalues the fifth roots of unity, so also not over \(\mathbb{R}\).
- Symmetric always diagonalizable, with an orthonormal eigenbasis.
- Projections and reflections \(P^2 = P\) (eigenvalues 0, 1) and \(R^2 = I\) (eigenvalues \(\pm 1\)) are diagonalizable.
- Sums \(A\) and \(B\) diagonalizable does not make \(A + B\) diagonalizable: \(\begin{bmatrix} 1 & 1 \\ 0 & 0 \end{bmatrix} + \begin{bmatrix} 0 & 0 \\ 0 & 1 \end{bmatrix}\) is the shear.
How to work it
- Find the eigenvalues and a basis of each eigenspace.
- If the bases together contain \(n\) vectors, \(A\) is diagonalizable; otherwise stop and say why (which eigenvalue is deficient).
- Build \(P\) from the eigenvectors and \(D\) from the eigenvalues in the same order.
- Compute \(P^{-1}\) and then \(A^k = PD^kP^{-1}\) (or just \(D^k\) if only the eigenvalues of \(A^k\) are wanted).
- Check \(AP = PD\) column by column: \(A\mathbf{v}_i = \lambda_i\mathbf{v}_i\).
From the previous tab, \(\lambda = 3\) with \(\mathbf{v}_1 = (1, 1)\) and \(\lambda = 1\) with \(\mathbf{v}_2 = (1, -1)\). Two independent eigenvectors, so
\[P = \begin{bmatrix} 1 & 1 \\ 1 & -1 \end{bmatrix}\] \[D = \begin{bmatrix} 3 & 0 \\ 0 & 1 \end{bmatrix}\] \[P^{-1} = \frac12\begin{bmatrix} 1 & 1 \\ 1 & -1 \end{bmatrix}.\] \[A^k = PD^kP^{-1} = \frac12\begin{bmatrix} 1 & 1 \\ 1 & -1 \end{bmatrix}\begin{bmatrix} 3^k & 0 \\ 0 & 1 \end{bmatrix}\begin{bmatrix} 1 & 1 \\ 1 & -1 \end{bmatrix} = \frac12\begin{bmatrix} 3^k + 1 & 3^k - 1 \\ 3^k - 1 & 3^k + 1 \end{bmatrix}.\]Check \(k = 1\): \(\tfrac12\begin{bmatrix} 4 & 2 \\ 2 & 4 \end{bmatrix} = A\). For large \(k\), \(A^k \approx \tfrac{3^k}{2}\begin{bmatrix} 1 & 1 \\ 1 & 1 \end{bmatrix}\): the dominant eigenvalue takes over and every vector is pushed toward the direction \((1, 1)\).
The same power split by eigenvalue: \(A^k = 3^k\cdot\tfrac12\begin{bmatrix} 1 & 1 \\ 1 & 1 \end{bmatrix} + 1^k\cdot\tfrac12\begin{bmatrix} 1 & -1 \\ -1 & 1 \end{bmatrix}\), where the two matrices are the projections onto \(\mathbf{v}_1\) and \(\mathbf{v}_2\) along each other (each squares to itself, their product is \(0\), and they add to \(I\)). That is what the sum \(\sum_i\lambda_i^k(\text{projection})\) in the Key idea means; at \(k = 3\) it gives \(\tfrac12\begin{bmatrix} 28 & 26 \\ 26 & 28 \end{bmatrix}\).
The matrix exponential comes the same way, with \(e^{\lambda t}\) in place of \(\lambda^k\): \(e^{At} = Pe^{Dt}P^{-1} = \tfrac12\begin{bmatrix} e^{3t} + e^{t} & e^{3t} - e^{t} \\ e^{3t} - e^{t} & e^{3t} + e^{t} \end{bmatrix}\), which equals \(I\) at \(t = 0\) and solves \(\mathbf{x}' = A\mathbf{x}\) as \(\mathbf{x}(t) = e^{At}\mathbf{x}(0)\).
A deficient case. \(B = \begin{bmatrix} 1 & 1 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 2 \end{bmatrix}\) is triangular with eigenvalues \(1, 1, 2\). For \(\lambda = 1\), \(B - I = \begin{bmatrix} 0 & 1 & 0 \\ 0 & 0 & 0 \\ 0 & 0 & 1 \end{bmatrix}\) has two pivots, hence only one free variable: \(E_1 = \operatorname{span}\{(1, 0, 0)\}\) has dimension \(1 \lt 2\). With \((0, 0, 1)\) for \(\lambda = 2\) that is only two independent eigenvectors in \(\mathbb{R}^3\), so \(B\) is not diagonalizable: the procedure stops at step 2, and the answer is "no, because the eigenvalue \(1\) has algebraic multiplicity \(2\) but geometric multiplicity \(1\)."
Watch out. Order matters twice: the \(i\)-th column of \(P\) must belong to the \(i\)-th diagonal entry of \(D\), and the factorization is \(PDP^{-1}\), not \(P^{-1}DP\) (which is correct only if you also put the eigenvectors in the rows of the first factor).
Practice: problems 18, 20, 23, 26 · Challenge: problems 70, 75, 76, 77, 86, 89, 92, 121, 134 (the practice groups are the last entries in the contents).
Applications: dynamical systems and Markov chains
Unit III: Eigenvalues and diagonalization · Topic 14 of 23
Key idea
Any process of the form "next state = matrix times current state" is solved by eigenvectors: write the starting vector in the eigenbasis, then each component simply gets multiplied by its eigenvalue at every step. The eigenvalue of largest size decides growth or decay and the direction everything drifts toward.
Discrete \(\mathbf{x}(t+1) = A\mathbf{x}(t)\). If \(\mathbf{x}(0) = c_1\mathbf{v}_1 + \cdots + c_n\mathbf{v}_n\) (eigenvectors), then
\[\mathbf{x}(t) = A^t\mathbf{x}(0) = c_1\lambda_1^t\mathbf{v}_1 + \cdots + c_n\lambda_n^t\mathbf{v}_n.\]Asymptotically stable (\(\mathbf{x}(t) \to \mathbf{0}\) for every start) iff every \(|\lambda_i| \lt 1\). If some \(|\lambda_i| \gt 1\), solutions grow along \(\mathbf{v}_i\).
Continuous \(\dfrac{d\mathbf{x}}{dt} = A\mathbf{x}\):
\[\mathbf{x}(t) = c_1e^{\lambda_1 t}\mathbf{v}_1 + \cdots + c_ne^{\lambda_n t}\mathbf{v}_n\]asymptotically stable iff every \(\operatorname{Re}\lambda_i \lt 0\). (Not \(|\lambda| \lt 1\): that is the discrete test.) Complex pairs give rotation: spirals in, out, or closed orbits.
The coefficients \(c_i\) come from solving \(P\mathbf{c} = \mathbf{x}(0)\).
- Markov chain a transition matrix has nonnegative entries with each column summing to 1. Then \(\lambda = 1\) is an eigenvalue (columns summing to \(1\) says \(A^T\mathbf{1} = \mathbf{1}\), and \(A\) has the same eigenvalues as \(A^T\)), all others satisfy \(|\lambda| \le 1\), and the steady state is the eigenvector for \(1\) scaled to sum to 1. For a regular chain (some power of \(A\) has all entries positive) every start converges to it.
- Recurrences \(F_{n+1} = F_n + F_{n-1}\) becomes \(\begin{bmatrix} F_{n+1} \\ F_n \end{bmatrix} = \begin{bmatrix} 1 & 1 \\ 1 & 0 \end{bmatrix}\begin{bmatrix} F_n \\ F_{n-1} \end{bmatrix}\); eigenvalues \(\varphi = \tfrac{1 + \sqrt5}{2}\) and \(\psi = \tfrac{1 - \sqrt5}{2}\) (roots of \(\lambda^2 - \lambda - 1\)) with eigenvectors \((\varphi, 1)\) and \((\psi, 1)\). Writing \(\mathbf{x}(0) = (F_1, F_0) = (1, 0) = c_1(\varphi, 1) + c_2(\psi, 1)\) gives \(c_1 = -c_2 = \tfrac{1}{\varphi - \psi} = \tfrac{1}{\sqrt5}\), and the second component of \(\mathbf{x}(n) = c_1\varphi^n(\varphi, 1) + c_2\psi^n(\psi, 1)\) is Binet’s formula \(F_n = \tfrac{\varphi^n - \psi^n}{\sqrt5}\); check \(n = 10\): \(55\).
- Populations Leslie matrices (age classes), predator–prey linearizations, refinement rules in geometry.
- Vibrations natural frequencies of a mass–spring network are \(\sqrt{\lambda_i}\) of the stiffness matrix; resonance happens when forcing matches one of them.
- Chaos the cat map \(\begin{bmatrix} 2 & 1 \\ 1 & 1 \end{bmatrix}\) has eigenvalues \(\tfrac{3 \pm \sqrt5}{2}\): stretching along one eigenvector and squeezing along the other, so it is not stable.
How to work it
- Find eigenvalues and eigenvectors of \(A\).
- Express the initial vector as a combination of the eigenvectors: solve \(P\mathbf{c} = \mathbf{x}(0)\).
- Write \(\mathbf{x}(t) = \sum c_i\lambda_i^t\mathbf{v}_i\).
- Read off the long-run behaviour from the eigenvalue of largest absolute value, and the direction from its eigenvector.
- For a Markov chain, the steady state is the normalized eigenvector for \(\lambda = 1\); no initial vector is needed.
Each year 10% of city dwellers move to the suburbs and 20% of suburbanites move to the city. With \(\mathbf{x} = (\text{city}, \text{suburb})\) as fractions of the population,
\[A = \begin{bmatrix} 0.9 & 0.2 \\ 0.1 & 0.8 \end{bmatrix}\] \[p(\lambda) = \lambda^2 - 1.7\lambda + 0.7 = (\lambda - 1)(\lambda - 0.7).\]\(\lambda = 1\): \((A - I)\mathbf{v} = \mathbf{0}\) gives \(-0.1v_1 + 0.2v_2 = 0\), so \(\mathbf{v}_1 = (2, 1)\); the steady state is \((\tfrac23, \tfrac13)\). \(\lambda = 0.7\): \(0.2v_1 + 0.2v_2 = 0\), so \(\mathbf{v}_2 = (1, -1)\).
From \(\mathbf{x}(0) = (0.5, 0.5)\): solve \(c_1(2, 1) + c_2(1, -1) = (0.5, 0.5)\), giving \(c_1 = \tfrac13\), \(c_2 = -\tfrac16\). Hence
\[\mathbf{x}(t) = \tfrac13\cdot 1^t\begin{bmatrix} 2 \\ 1 \end{bmatrix} - \tfrac16(0.7)^t\begin{bmatrix} 1 \\ -1 \end{bmatrix} = \begin{bmatrix} \tfrac23 \\ \tfrac13 \end{bmatrix} - \tfrac{(0.7)^t}{6}\begin{bmatrix} 1 \\ -1 \end{bmatrix} \longrightarrow \begin{bmatrix} \tfrac23 \\ \tfrac13 \end{bmatrix}.\]Check \(t = 1\): \(A(0.5, 0.5) = (0.55, 0.45)\) and the formula gives \((\tfrac23 - \tfrac{0.7}{6}, \tfrac13 + \tfrac{0.7}{6}) = (0.55, 0.45)\).
Continuous case. For \(\dfrac{d\mathbf{x}}{dt} = \begin{bmatrix} 0 & 1 \\ -2 & -3 \end{bmatrix}\mathbf{x}\): \(p(\lambda) = \lambda^2 + 3\lambda + 2 = (\lambda + 1)(\lambda + 2)\). For \(\lambda = -1\), \(A + I = \begin{bmatrix} 1 & 1 \\ -2 & -2 \end{bmatrix}\) gives \(\mathbf{v}_1 = (1, -1)\); for \(\lambda = -2\), \(A + 2I = \begin{bmatrix} 2 & 1 \\ -2 & -1 \end{bmatrix}\) gives \(\mathbf{v}_2 = (1, -2)\). So
\[\mathbf{x}(t) = c_1e^{-t}\begin{bmatrix} 1 \\ -1 \end{bmatrix} + c_2e^{-2t}\begin{bmatrix} 1 \\ -2 \end{bmatrix}\]and since both eigenvalues are negative every solution decays to \(\mathbf{0}\). From \(\mathbf{x}(0) = (1, 0)\): \(c_1 + c_2 = 1\) and \(-c_1 - 2c_2 = 0\), so \(c_2 = -1\) and \(c_1 = 2\).
A complex pair. \(\dfrac{d\mathbf{x}}{dt} = \begin{bmatrix} -1 & 1 \\ -1 & -1 \end{bmatrix}\mathbf{x}\) has \(p(\lambda) = \lambda^2 + 2\lambda + 2\), so \(\lambda = -1 \pm i\): the imaginary part \(\pm 1\) makes solutions rotate once every \(2\pi\) units of time, and the real part \(-1\) makes them shrink by the factor \(e^{-t}\), so every trajectory spirals in to \(\mathbf{0}\). With \(\begin{bmatrix} 0 & 1 \\ -1 & 0 \end{bmatrix}\) instead, \(\lambda = \pm i\) has real part \(0\): closed circular orbits, neither growing nor decaying.
Watch out. Discrete systems are stable when \(|\lambda| \lt 1\); continuous systems when \(\operatorname{Re}\lambda \lt 0\). An eigenvalue of \(-0.5\) is stable in the discrete sense but would be unstable (growth) in a continuous system; \(\lambda = -2\) is the reverse.
Practice: problems 21, 22, 26 · Challenge: problems 80, 81, 91, 94, 127, 134 (the practice groups are the last entries in the contents).
Symmetric, skew-symmetric and orthogonal matrices
Unit III: Eigenvalues and diagonalization · Topic 15 of 23
Key idea
Three families of real matrices behave especially well. Symmetric matrices have real eigenvalues and perpendicular eigenvectors, so they can be diagonalized by a rotation. Skew-symmetric matrices have purely imaginary eigenvalues. Orthogonal matrices preserve lengths and angles; their inverse is their transpose. Together they are the matrices of quadratic forms, rotations, reflections and projections.
Symmetric \(A^T = A\):
- Real all eigenvalues are real.
- Orthogonal eigenvectors for different eigenvalues are perpendicular.
- Spectral theorem \(A = QDQ^T\) with \(Q\) orthogonal (orthonormal eigenvectors as columns) and \(D\) real diagonal. Every symmetric matrix is diagonalizable; a repeated eigenvalue still has a full eigenspace.
Skew-symmetric \(A^T = -A\): zero diagonal; eigenvalues \(0\) or purely imaginary \(\pm i\beta\); \(\mathbf{x}^TA\mathbf{x} = 0\) for every \(\mathbf{x}\) (a \(1\times 1\) matrix equals its transpose, so \(\mathbf{x}^TA\mathbf{x} = \mathbf{x}^TA^T\mathbf{x} = -\mathbf{x}^TA\mathbf{x}\)); odd size forces \(\det A = 0\). For instance \(\begin{bmatrix} 0 & -3 \\ 3 & 0 \end{bmatrix}\) has \(p(\lambda) = \lambda^2 + 9\), eigenvalues \(\pm 3i\), and \(\mathbf{x}^TA\mathbf{x} = -3x_1x_2 + 3x_2x_1 = 0\) for every \(\mathbf{x}\).
Positive entries do not mean positive eigenvalues: \(\begin{bmatrix} 1 & 2 \\ 2 & 1 \end{bmatrix}\) is symmetric with eigenvalues \(3\) and \(-1\). Also \(A^2 - B^2\) is symmetric whenever \(A\) and \(B\) are, but \(AB\) is symmetric only if they commute: \(A = \begin{bmatrix} 1 & 1 \\ 1 & 0 \end{bmatrix}\) and \(B = \begin{bmatrix} 0 & 1 \\ 1 & 1 \end{bmatrix}\) are symmetric, yet \(AB = \begin{bmatrix} 1 & 2 \\ 0 & 1 \end{bmatrix}\) is not.
- Columns an orthonormal basis (unit length, mutually perpendicular); same for rows.
- Determinant \(\pm 1\); eigenvalues have \(|\lambda| = 1\). Products of orthogonal matrices are orthogonal; sums are not (\(I + I = 2I\)).
- Rotation \(\begin{bmatrix} \cos\theta & -\sin\theta \\ \sin\theta & \cos\theta \end{bmatrix}\), \(\det = 1\), eigenvalues \(e^{\pm i\theta}\). Check \(Q^TQ = I\): each column has length \(\cos^2\theta + \sin^2\theta = 1\) and the columns have dot product \(-\cos\theta\sin\theta + \sin\theta\cos\theta = 0\).
- Reflection across a line through the origin: symmetric and orthogonal, \(R^2 = I\), eigenvalues \(1\) (along the line) and \(-1\) (across it), \(\det = -1\). Always invertible.
- Projection onto a subspace: symmetric with \(P^2 = P\), eigenvalues \(1\) and \(0\); not orthogonal (it shrinks) and not invertible unless \(P = I\).
How to work it
- Find the eigenvalues; they will be real.
- Find a basis of each eigenspace. Eigenvectors from different eigenvalues are already perpendicular; within a repeated eigenvalue, apply Gram–Schmidt.
- Normalize every eigenvector to length 1 and place them as the columns of \(Q\).
- Then \(A = QDQ^T\); check \(Q^TQ = I\) and \(AQ = QD\).
\(A = \begin{bmatrix} 2 & 1 \\ 1 & 2 \end{bmatrix}\) has eigenvectors \((1, 1)\) for \(3\) and \((1, -1)\) for \(1\), which are perpendicular. Normalizing,
\[Q = \frac{1}{\sqrt2}\begin{bmatrix} 1 & 1 \\ 1 & -1 \end{bmatrix}\] \[D = \begin{bmatrix} 3 & 0 \\ 0 & 1 \end{bmatrix}\] \[A = QDQ^T\]and \(Q^TQ = \tfrac12\begin{bmatrix} 2 & 0 \\ 0 & 2 \end{bmatrix} = I\). Here \(Q\) is itself symmetric and orthogonal: it is the reflection across the line at \(22.5^\circ\), with \(Q^2 = I\).
The matrix \(R = \begin{bmatrix} 0 & 1 \\ 1 & 0 \end{bmatrix}\) (reflection across \(y = x\)) has \(R^T = R\), \(R^TR = I\), eigenvalues \(1\) with eigenvector \((1, 1)\) and \(-1\) with eigenvector \((1, -1)\), \(\det R = -1\).
A repeated eigenvalue. \(A = \begin{bmatrix} 2 & 1 & 1 \\ 1 & 2 & 1 \\ 1 & 1 & 2 \end{bmatrix} = I + J\) has eigenvalues \(1 + 3 = 4\) (eigenvector \((1, 1, 1)\)) and \(1 + 0 = 1\) twice (eigenspace \(x + y + z = 0\)). Pick a basis of the plane, \((1, -1, 0)\) and \((1, 0, -1)\); they are not perpendicular, so apply Gram–Schmidt inside the eigenspace: \(\mathbf{w}_2 = (1, -1, 0)\) and \(\mathbf{w}_3 = (1, 0, -1) - \tfrac12(1, -1, 0) = (\tfrac12, \tfrac12, -1) \propto (1, 1, -2)\). Normalizing,
\[Q = \begin{bmatrix} \tfrac{1}{\sqrt3} & \tfrac{1}{\sqrt2} & \tfrac{1}{\sqrt6} \\ \tfrac{1}{\sqrt3} & -\tfrac{1}{\sqrt2} & \tfrac{1}{\sqrt6} \\ \tfrac{1}{\sqrt3} & 0 & -\tfrac{2}{\sqrt6} \end{bmatrix},\qquad D = \operatorname{diag}(4, 1, 1)\]and \(A = QDQ^T\). Without the Gram–Schmidt step the second and third columns would not be orthogonal and \(Q^TQ \ne I\).
Watch out. Orthogonal matrix means orthonormal columns, not merely orthogonal columns: \(\begin{bmatrix} 1 & -1 \\ 1 & 1 \end{bmatrix}\) has perpendicular columns of length \(\sqrt2\) and is not orthogonal until divided by \(\sqrt2\).
Practice: problems 18, 19, 22, 23, 29 · Challenge: problems 48, 52, 53, 66, 76, 79, 82, 83, 92, 93, 104, 106, 109, 114, 122, 124, 130, 133 (the practice groups are the last entries in the contents).
Quadratic forms and principal axes
Unit III: Eigenvalues and diagonalization · Topic 16 of 23
Key idea
A quadratic form is a homogeneous polynomial of degree two, \(q(\mathbf{x}) = \mathbf{x}^TA\mathbf{x}\) with \(A\) symmetric. Diagonalizing \(A\) rotates the coordinates so that the cross terms disappear and \(q\) becomes a sum of \(\lambda_i y_i^2\). The signs of the eigenvalues then classify the form and the conic or quadric it describes.
Each cross term is split in half across the two symmetric positions: \(q = x^2 + 2y^2 + 3z^2 + 4xy - 2yz\) has matrix \(\begin{bmatrix} 1 & 2 & 0 \\ 2 & 2 & -1 \\ 0 & -1 & 3 \end{bmatrix}\), with \(0\) in the \((1, 3)\) slots because there is no \(xz\) term. With \(A = QDQ^T\) and new coordinates \(\mathbf{y} = Q^T\mathbf{x}\) (so \(\mathbf{x} = Q\mathbf{y}\)),
\[q = \mathbf{x}^TA\mathbf{x} = \mathbf{y}^TD\mathbf{y} = \lambda_1y_1^2 + \lambda_2y_2^2 + \cdots + \lambda_ny_n^2.\]The columns of \(Q\) are the principal axes.
Classification. \(q\) is positive definite iff all \(\lambda_i \gt 0\) (equivalently all leading principal minors are positive); negative definite iff all \(\lambda_i \lt 0\); indefinite iff eigenvalues of both signs; semidefinite if some are zero.
- Conic sections \(ax^2 + bxy + cy^2 = 1\) is an ellipse if \(\lambda_1, \lambda_2 \gt 0\) (semi-axes \(1/\sqrt{\lambda_i}\) along the principal axes), a hyperbola if they have opposite signs, empty or degenerate otherwise.
- Constrained extremes on the unit sphere \(\|\mathbf{x}\| = 1\), \(\max q = \lambda_{\max}\) at its eigenvector and \(\min q = \lambda_{\min}\) at its eigenvector (the Rayleigh quotient \(q(\mathbf{x})/\|\mathbf{x}\|^2\)). Why: in principal-axis coordinates \(q = \sum\lambda_iy_i^2\) with \(\sum y_i^2 = 1\), a weighted average of the eigenvalues, which is largest when all the weight sits on \(\lambda_{\max}\).
- Calculus the Hessian matrix of second partials is symmetric; positive definite means a local minimum, negative definite a maximum, indefinite a saddle. For \(f = x^2 + xy + y^2\) the Hessian is \(\begin{bmatrix} 2 & 1 \\ 1 & 2 \end{bmatrix}\) with eigenvalues \(3, 1 \gt 0\), so the critical point at the origin is a minimum.
- Energy kinetic and potential energies, least-squares error \(\|A\mathbf{x} - \mathbf{b}\|^2\), and variance of a portfolio are quadratic forms, all positive semidefinite.
How to work it
- Write the symmetric matrix \(A\): squares on the diagonal, half of each cross coefficient off the diagonal.
- Find eigenvalues and orthonormal eigenvectors; form \(Q\) and \(D\).
- Substitute \(\mathbf{x} = Q\mathbf{y}\): \(q = \sum\lambda_iy_i^2\).
- Classify by the signs of the \(\lambda_i\); identify the curve or surface and its axes.
In rotated coordinates \(u = \tfrac{x + y}{\sqrt2}\), \(v = \tfrac{x - y}{\sqrt2}\):
\[q = 3u^2 + v^2\] \[3u^2 + v^2 = 1.\]Both eigenvalues positive: \(q\) is positive definite and the curve is an ellipse with semi-axes \(1/\sqrt3\) along \((1,1)\) and \(1\) along \((1,-1)\). On the unit circle the maximum of \(q\) is \(3\) at \(\pm\tfrac{1}{\sqrt2}(1,1)\) and the minimum is \(1\) at \(\pm\tfrac{1}{\sqrt2}(1,-1)\).
An indefinite form. \(q = x^2 + 4xy + y^2\) has \(A = \begin{bmatrix} 1 & 2 \\ 2 & 1 \end{bmatrix}\) (half of \(4\) in each off-diagonal slot) and \(p(\lambda) = \lambda^2 - 2\lambda - 3 = (\lambda - 3)(\lambda + 1)\): eigenvalues \(3\) and \(-1\) of opposite sign, so \(q\) is indefinite and \(x^2 + 4xy + y^2 = 1\) is a hyperbola, \(3u^2 - v^2 = 1\) in the rotated coordinates (the same axes as above, since the eigenvectors are again \((1, 1)\) and \((1, -1)\)). The leading principal minors say the same thing: \(1 \gt 0\) but \(\det A = 1 - 4 = -3 \lt 0\), so the form is not positive definite. For a \(2\times 2\) form, positive definite means \(a \gt 0\) and \(\det A \gt 0\).
Watch out. The off-diagonal entry is half the cross coefficient. Writing \(b\) instead of \(b/2\) gives a matrix whose eigenvalues classify the wrong form.
Practice: problem 24 · Challenge: problems 84, 85, 93, 110 (the practice groups are the last entries in the contents).
Complex matrices: Hermitian, skew-Hermitian, unitary
Unit III: Eigenvalues and diagonalization · Topic 17 of 23
Key idea
Over the complex numbers the transpose is replaced by the conjugate transpose \(A^* = \bar{A}^T\), and the three real families acquire complex versions. Hermitian matrices (\(A^* = A\)) have real eigenvalues, skew-Hermitian (\(A^* = -A\)) have purely imaginary ones, and unitary (\(U^*U = I\)) have eigenvalues on the unit circle. All three have orthonormal eigenbases with respect to the complex inner product.
that is, conjugate every entry and then transpose.
- Hermitian \(A^* = A\): diagonal entries real, \(a_{ji} = \overline{a_{ij}}\); eigenvalues real; eigenvectors for distinct eigenvalues orthogonal; \(\mathbf{x}^*A\mathbf{x}\) is real for every \(\mathbf{x}\). Real symmetric matrices are the real case.
- Skew-Hermitian \(A^* = -A\): diagonal purely imaginary or zero; eigenvalues purely imaginary or zero; \(A = iH\) with \(H\) Hermitian. E.g. \(\begin{bmatrix} i & 1 \\ -1 & i \end{bmatrix}\): conjugating and transposing gives \(\begin{bmatrix} -i & -1 \\ 1 & -i \end{bmatrix} = -A\), and \((i - \lambda)^2 + 1 = 0\) gives \(\lambda = 2i\) and \(\lambda = 0\).
- Unitary \(U^*U = UU^* = I\): columns orthonormal in \(\mathbb{C}^n\); \(\|U\mathbf{x}\| = \|\mathbf{x}\|\); eigenvalues \(|\lambda| = 1\); \(|\det U| = 1\). Real orthogonal matrices are the real case.
All three are normal (\(AA^* = A^*A\)) and therefore unitarily diagonalizable: \(A = UDU^*\).
Without the conjugate, \(\mathbf{v} = (1, i)\) would have "length squared" \(1 + i^2 = 0\). The complex inner product is conjugate-linear in the first slot and linear in the second (some books reverse this), and \({\langle\mathbf{v}, \mathbf{u}\rangle} = \overline{{\langle\mathbf{u}, \mathbf{v}\rangle}}\).
Proof pattern (real eigenvalues of Hermitian \(A\)): if \(A\mathbf{v} = \lambda\mathbf{v}\) then \(\mathbf{v}^*A\mathbf{v} = \lambda\|\mathbf{v}\|^2\); taking the conjugate transpose of the left side gives the same number back, so \(\bar\lambda\|\mathbf{v}\|^2 = \lambda\|\mathbf{v}\|^2\) and \(\lambda\) is real.
Examples: the Pauli matrix \(\begin{bmatrix} 0 & -i \\ i & 0 \end{bmatrix}\) is Hermitian and unitary; \(\begin{bmatrix} i & 0 \\ 0 & -i \end{bmatrix}\) is skew-Hermitian and unitary; \(\frac{1}{\sqrt2}\begin{bmatrix} 1 & 1 \\ i & -i \end{bmatrix}\) is unitary.
How to work it
- Compute \(A^*\): conjugate every entry and transpose.
- Compare with \(A\): equal means Hermitian; negative means skew-Hermitian.
- Multiply \(A^*A\); the identity means unitary.
- Find the eigenvalues and confirm they match the class (real, imaginary, or on the unit circle). Check orthogonality of eigenvectors with the conjugate inner product.
\(A = \begin{bmatrix} 2 & i \\ -i & 2 \end{bmatrix}\): conjugating gives \(\begin{bmatrix} 2 & -i \\ i & 2 \end{bmatrix}\), and transposing returns \(A\). So \(A^* = A\), Hermitian.
\[\det(A - \lambda I) = (2 - \lambda)^2 - (i)(-i) = (2 - \lambda)^2 - 1 = 0\] \[\Longrightarrow\ \lambda = 1, 3\]both real as promised. For \(\lambda = 3\): \(-v_1 + iv_2 = 0\), eigenvector \((i, 1)\). For \(\lambda = 1\): \(v_1 + iv_2 = 0\), eigenvector \((-i, 1)\).
\[{\langle(i, 1), (-i, 1)\rangle} = \bar{i}(-i) + \bar{1}(1) = (-i)(-i) + 1\] \[= -1 + 1 = 0\]so the eigenvectors are orthogonal; dividing each by \(\sqrt2\) gives the columns of a unitary \(U\) with \(A = U\operatorname{diag}(3, 1)U^*\).
Unitary check. For \(U = \frac{1}{\sqrt2}\begin{bmatrix} 1 & 1 \\ i & -i \end{bmatrix}\), conjugate and transpose: \(U^* = \frac{1}{\sqrt2}\begin{bmatrix} 1 & -i \\ 1 & i \end{bmatrix}\). Then
\[U^*U = \frac12\begin{bmatrix} 1 + (-i)(i) & 1 + (-i)(-i) \\ 1 + (i)(i) & 1 + (i)(-i) \end{bmatrix} = \frac12\begin{bmatrix} 2 & 0 \\ 0 & 2 \end{bmatrix} = I\]so \(U\) is unitary (its columns \(\tfrac{1}{\sqrt2}(1, i)\) and \(\tfrac{1}{\sqrt2}(1, -i)\) are orthonormal in the conjugate inner product). Its determinant is \(\tfrac12(-i - i) = -i\), of modulus \(1\), as the class requires.
Watch out. For complex vectors the plain dot product \(\sum u_iv_i\) is not an inner product; always conjugate one factor. And \(A^T = A\) is not the condition for real eigenvalues over \(\mathbb{C}\): \(\begin{bmatrix} 1 & i \\ i & 1 \end{bmatrix}\) is symmetric but not Hermitian, and its eigenvalues \(1 \pm i\) are not real.
Practice: problem 25 · Challenge: problems 79, 87, 88, 112 (the practice groups are the last entries in the contents).
Linear transformations and their matrices
Unit IV: Linear transformations · Topic 18 of 23
Key idea
A linear transformation is a function between vector spaces that respects addition and scalar multiplication. Every linear map from \(\mathbb{R}^n\) to \(\mathbb{R}^m\) is multiplication by a unique \(m\times n\) matrix whose columns are the images of the standard basis vectors, so geometry (rotations, reflections, projections, shears) and algebra (matrices) are two descriptions of one thing.
Equivalently \(T(a\mathbf{u} + b\mathbf{v}) = aT(\mathbf{u}) + bT(\mathbf{v})\). Consequences: \(T(\mathbf{0}) = \mathbf{0}\) and \(T(-\mathbf{v}) = -T(\mathbf{v})\).
Standard matrix. If \(T : \mathbb{R}^n \to \mathbb{R}^m\) is linear then \(T(\mathbf{x}) = A\mathbf{x}\) with
\[A = \big[\,T(\mathbf{e}_1)\ \ T(\mathbf{e}_2)\ \cdots\ T(\mathbf{e}_n)\,\big] \quad (m\times n).\]Spotting non-linearity. Products of coordinates (\(x_1x_2\)), squares, absolute values, square roots, \(\sin\), and added constants (\(T(\mathbf{x}) = A\mathbf{x} + \mathbf{b}\), \(\mathbf{b} \ne \mathbf{0}\)) all break linearity. A single failing instance is a complete disproof.
Linear maps on function spaces: the derivative \(D\), integration, multiplication by a fixed function, and operators like \(D^2 + 1\) or \((D - 1)^2\). Not linear: \(f \mapsto f^2\), \(f \mapsto \|f\|\sin x\), \(f \mapsto f + 1\).
- Rotation by \(\theta\) \(\begin{bmatrix} \cos\theta & -\sin\theta \\ \sin\theta & \cos\theta \end{bmatrix}\); \(\det = 1\).
- Reflection across the line at angle \(\theta\): \(\begin{bmatrix} \cos2\theta & \sin2\theta \\ \sin2\theta & -\cos2\theta \end{bmatrix}\); across \(y = x\): \(\begin{bmatrix} 0 & 1 \\ 1 & 0 \end{bmatrix}\); \(\det = -1\).
- Projection onto the line spanned by the unit vector \(\mathbf{u}\): \(\mathbf{u}\mathbf{u}^T\); onto the \(x\)-axis: \(\begin{bmatrix} 1 & 0 \\ 0 & 0 \end{bmatrix}\); \(\det = 0\).
- Scaling \(\begin{bmatrix} a & 0 \\ 0 & b \end{bmatrix}\). Shear \(\begin{bmatrix} 1 & k \\ 0 & 1 \end{bmatrix}\).
- Composition "first \(T\), then \(S\)" has matrix \(S\)-matrix times \(T\)-matrix (right factor acts first). The inverse transformation has the inverse matrix.
- Area \(|\det A|\) is the factor by which \(T\) scales areas (volumes in \(\mathbb{R}^3\)); the sign records orientation. \(A = \begin{bmatrix} 1 & 2 \\ 3 & 0 \end{bmatrix}\) has \(\det A = -6\): the unit square becomes a parallelogram of area \(6\), traversed the opposite way round.
How to work it
- Confirm \(T\) is linear (or spot the term that breaks it and produce a counterexample).
- Apply \(T\) to each standard basis vector \(\mathbf{e}_j\) in turn; for a geometric map, draw where \(\mathbf{e}_1\) and \(\mathbf{e}_2\) land.
- Write the results as the columns of \(A\), in order.
- Test on one non-basis vector: \(A\mathbf{x}\) must agree with the geometric or algebraic description of \(T(\mathbf{x})\).
\(T(x_1, x_2) = (x_1 + 2x_2, 3x_1)\) is linear: \(T(\mathbf{e}_1) = (1, 3)\), \(T(\mathbf{e}_2) = (2, 0)\), so \(A = \begin{bmatrix} 1 & 2 \\ 3 & 0 \end{bmatrix}\). Check: \(A(1, 1) = (3, 3) = T(1, 1)\).
\(S(x_1, x_2) = (x_1^2, x_2)\) is not linear: \(S(2\mathbf{e}_1) = (4, 0)\) but \(2S(\mathbf{e}_1) = (2, 0)\).
Reflection across \(y = x\). \(\mathbf{e}_1 = (1, 0) \mapsto (0, 1)\) and \(\mathbf{e}_2 \mapsto (1, 0)\), so the matrix is \(\begin{bmatrix} 0 & 1 \\ 1 & 0 \end{bmatrix}\): it swaps coordinates, squares to \(I\), and has determinant \(-1\). Following it by a rotation through \(90^\circ\) gives \(\begin{bmatrix} 0 & -1 \\ 1 & 0 \end{bmatrix}\begin{bmatrix} 0 & 1 \\ 1 & 0 \end{bmatrix} = \begin{bmatrix} -1 & 0 \\ 0 & 1 \end{bmatrix}\), the reflection across the \(y\)-axis.
Using the formulas. The reflection formula at \(\theta = 45^\circ\) gives \(\begin{bmatrix} \cos 90^\circ & \sin 90^\circ \\ \sin 90^\circ & -\cos 90^\circ \end{bmatrix} = \begin{bmatrix} 0 & 1 \\ 1 & 0 \end{bmatrix}\), the same matrix. Projection onto the line \(y = x\) uses the unit vector \(\mathbf{u} = \tfrac{1}{\sqrt2}(1, 1)\): \(\mathbf{u}\mathbf{u}^T = \tfrac12\begin{bmatrix} 1 & 1 \\ 1 & 1 \end{bmatrix}\), which sends \((1, 0)\) to \((\tfrac12, \tfrac12)\) as the picture says, and squares to itself (projecting twice changes nothing). Order of composition: rotating by \(90^\circ\) and then reflecting across \(y = x\) is \(\begin{bmatrix} 0 & 1 \\ 1 & 0 \end{bmatrix}\begin{bmatrix} 0 & -1 \\ 1 & 0 \end{bmatrix} = \begin{bmatrix} 1 & 0 \\ 0 & -1 \end{bmatrix}\), a different reflection from the one above.
Given images of a non-standard basis. If \(T(1, 1) = (2, 0)\) and \(T(1, -1) = (0, 2)\), first express the standard vectors: \(\mathbf{e}_1 = \tfrac12\big[(1, 1) + (1, -1)\big]\) and \(\mathbf{e}_2 = \tfrac12\big[(1, 1) - (1, -1)\big]\). Linearity then gives \(T(\mathbf{e}_1) = \tfrac12\big[(2, 0) + (0, 2)\big] = (1, 1)\) and \(T(\mathbf{e}_2) = \tfrac12\big[(2, 0) - (0, 2)\big] = (1, -1)\), so \(A = \begin{bmatrix} 1 & 1 \\ 1 & -1 \end{bmatrix}\). Check: \(A(1, 1) = (2, 0)\). Two images determine a linear map on \(\mathbb{R}^2\) only because the given inputs form a basis.
Watch out. Checking \(T(\mathbf{0}) = \mathbf{0}\) is necessary but not sufficient: \(T(x_1, x_2) = (x_1x_2, 0)\) sends \(\mathbf{0}\) to \(\mathbf{0}\) and is still not linear. Test additivity or homogeneity with specific vectors.
Practice: problems 27, 28, 29 · Challenge: problems 64, 65, 66, 71, 126, 131 (the practice groups are the last entries in the contents).
Kernel, range and the matrix with respect to a basis
Unit IV: Linear transformations · Topic 19 of 23
Key idea
The kernel of \(T\) is everything sent to zero and the range (image) is everything that is hit. Their dimensions add up to the dimension of the domain, the kernel decides whether \(T\) is one-to-one, the range decides whether it is onto, and choosing a different basis changes the matrix of \(T\) to a similar matrix \(S^{-1}AS\). Diagonalization is exactly the choice of a basis in which that matrix is diagonal.
Both are subspaces. For \(T(\mathbf{x}) = A\mathbf{x}\): \(\ker T = \operatorname{Nul} A\) and \(\operatorname{range} T = \operatorname{Col} A\).
\[\dim\ker T + \dim\operatorname{range} T = \dim V \quad(\text{rank–nullity}).\]- One-to-one (injective) iff \(\ker T = \{\mathbf{0}\}\) iff the columns of \(A\) are independent.
- Onto (surjective) iff \(\operatorname{range} T = W\) iff \(\operatorname{rank} A = \dim W\).
- Isomorphism both; then \(\dim V = \dim W\) and \(T^{-1}\) is linear. For \(\dim V = \dim W\), one-to-one and onto are equivalent. The coordinate map \(P_2 \to \mathbb{R}^3\), \(a + bx + cx^2 \mapsto (a, b, c)\), is the standard example: linear, kernel only the zero polynomial, every triple hit, so \(P_2\) and \(\mathbb{R}^3\) are "the same space with different labels".
A map from a bigger space to a smaller one (\(\dim V \gt \dim W\)) always has a nonzero kernel; from a smaller to a bigger one it is never onto.
For a basis \(\mathcal{B} = \{\mathbf{b}_1, \dots, \mathbf{b}_n\}\) of \(V\), the matrix \([T]_{\mathcal{B}}\) has as its \(j\)-th column the coordinate vector of \(T(\mathbf{b}_j)\):
\[[T(\mathbf{v})]_{\mathcal{B}} = [T]_{\mathcal{B}}\,[\mathbf{v}]_{\mathcal{B}}.\]If \(T(\mathbf{x}) = A\mathbf{x}\) on \(\mathbb{R}^n\) and \(S = [\mathbf{b}_1 \cdots \mathbf{b}_n]\) (the change-of-basis matrix, \(\mathbf{x} = S[\mathbf{x}]_{\mathcal{B}}\)), then
\[B = [T]_{\mathcal{B}} = S^{-1}AS.\]- Similar matrices \(B = S^{-1}AS\) share eigenvalues, characteristic polynomial, determinant, trace and rank. Eigenvectors change by \(S\). Reason: \(B - \lambda I = S^{-1}(A - \lambda I)S\), so \(\det(B - \lambda I) = \det(A - \lambda I)\); and if \(A\mathbf{v} = \lambda\mathbf{v}\) then \(B(S^{-1}\mathbf{v}) = \lambda(S^{-1}\mathbf{v})\).
- Eigenbasis if the \(\mathbf{b}_j\) are eigenvectors, \(B = D\) is diagonal: that is diagonalization.
- Function spaces \(D\) on \(P_3\) with basis \(1, x, x^2, x^3\) has the \(4\times 4\) matrix with \(1, 2, 3\) on the superdiagonal; \(\ker D\) = constants.
How to work it
- Kernel: solve \(T(\mathbf{v}) = \mathbf{0}\) (for matrices, row reduce \(A\)); write a basis from the free variables.
- Range: for matrices take the pivot columns of \(A\); in general, the images \(T(\mathbf{b}_j)\) span the range, so discard dependent ones.
- Confirm the dimensions add to \(\dim V\).
- New basis: compute each \(T(\mathbf{b}_j)\), express it in terms of the \(\mathbf{b}_i\) (solve a small system), and record the coefficients as column \(j\). Or compute \(S^{-1}AS\) directly.
Evaluation. \(T : P_2 \to \mathbb{R}\), \(T(f) = f(1)\), is linear. Its kernel is \(\{f : f(1) = 0\}\), spanned by \(x - 1\) and \(x^2 - 1\) (dimension 2); its range is all of \(\mathbb{R}\) (dimension 1, since \(T(1) = 1\)). Check: \(2 + 1 = 3 = \dim P_2\). \(T\) is onto but far from one-to-one.
Differentiation. \(D : P_3 \to P_3\). Kernel: the constants (dimension 1). Range: \(P_2\) (every polynomial of degree \(\le 2\) is a derivative), dimension 3. Sum \(4 = \dim P_3\). \(D\) is neither one-to-one nor onto \(P_3\).
New basis. For \(A = \begin{bmatrix} 2 & 1 \\ 1 & 2 \end{bmatrix}\) and \(S = \begin{bmatrix} 1 & 1 \\ 1 & -1 \end{bmatrix}\) (eigenvectors), \(S^{-1}AS = \begin{bmatrix} 3 & 0 \\ 0 & 1 \end{bmatrix}\): in the eigenbasis the map is "stretch by 3 along \(\mathbf{b}_1\), leave \(\mathbf{b}_2\) alone."
The same matrix column by column (step 4): \(T(\mathbf{b}_1) = A(1, 1) = (3, 3) = 3\mathbf{b}_1 + 0\mathbf{b}_2\), so the first column is \((3, 0)\); \(T(\mathbf{b}_2) = A(1, -1) = (1, -1) = 0\mathbf{b}_1 + 1\mathbf{b}_2\), so the second column is \((0, 1)\). Each column holds the coefficients in terms of the new basis, never the vector \(T(\mathbf{b}_j)\) itself.
A matrix map. \(T(\mathbf{x}) = \begin{bmatrix} 1 & 2 & 3 \\ 4 & 5 & 6 \end{bmatrix}\mathbf{x}\) from \(\mathbb{R}^3\) to \(\mathbb{R}^2\). Row reducing gives pivots in columns 1 and 2 and the kernel equation \(x_1 = x_3\), \(x_2 = -2x_3\), so \(\ker T = \operatorname{span}\{(1, -2, 1)\}\) (check: \(1 - 4 + 3 = 0\) and \(4 - 10 + 6 = 0\)). The range is spanned by the pivot columns \((1, 4)\) and \((2, 5)\), which is all of \(\mathbb{R}^2\). Dimensions: \(1 + 2 = 3\). So \(T\) is onto but not one-to-one, as a map from a bigger space to a smaller one must be.
Watch out. "Kernel contained in image" does not force \(A^2 = 0\) (take \(A\) invertible: kernel \(\{\mathbf{0}\}\) is contained in everything). The implication runs the other way: \(A^2 = 0\) forces \(\operatorname{Im} A \subseteq \ker A\).
Practice: problems 16, 27 · Challenge: problems 51, 60, 64, 65, 67, 70, 71, 72, 89, 118 (the practice groups are the last entries in the contents).
n-vectors: dot product, norm and geometry in \(\mathbb{R}^3\)
Unit V: Inner product spaces and least squares · Topic 20 of 23
Key idea
The dot product turns \(\mathbb{R}^n\) into a space with lengths, distances and angles. Two vectors are orthogonal when their dot product is zero, the norm is the square root of a vector dotted with itself, and the projection of one vector onto another is the first step toward least squares. In \(\mathbb{R}^3\) the cross product adds perpendiculars, areas and volumes.
Inequalities. Cauchy–Schwarz \(|{\mathbf{u}\cdot \mathbf{v}}| \le \|\mathbf{u}\|\,\|\mathbf{v}\|\); triangle \(\|\mathbf{u} + \mathbf{v}\| \le \|\mathbf{u}\| + \|\mathbf{v}\|\); Pythagoras \(\|\mathbf{u} + \mathbf{v}\|^2 = \|\mathbf{u}\|^2 + \|\mathbf{v}\|^2\) when \(\mathbf{u} \perp \mathbf{v}\).
Projection onto a vector.
\[\operatorname{proj}_{\mathbf{u}}\mathbf{v} = \frac{{\mathbf{v}\cdot \mathbf{u}}}{{\mathbf{u}\cdot \mathbf{u}}}\,\mathbf{u}\] \[\mathbf{v} - \operatorname{proj}_{\mathbf{u}}\mathbf{v} \perp \mathbf{u}.\]\(\|c\mathbf{v}\| = |c|\,\|\mathbf{v}\|\); the unit vector in the direction of \(\mathbf{v}\) is \(\mathbf{v}/\|\mathbf{v}\|\).
- Line \(\mathbf{r} = \mathbf{p} + t\mathbf{d}\) (point plus direction).
- Plane \(\mathbf{n}\cdot(\mathbf{r} - \mathbf{p}) = 0\), i.e. \(ax + by + cz = d\) with normal \(\mathbf{n} = (a, b, c)\). Two planes are parallel iff their normals are. Through three points \(P, Q, R\): take \(\mathbf{n} = (Q - P)\times(R - P)\) and \(\mathbf{p} = P\); for \((1, 0, 0), (0, 1, 0), (0, 0, 1)\) this gives \(\mathbf{n} = (-1, 1, 0)\times(-1, 0, 1) = (1, 1, 1)\) and the plane \(x + y + z = 1\), which all three points satisfy.
- Cross product \({\mathbf{u}\times \mathbf{v}} = (u_2v_3 - u_3v_2,\ u_3v_1 - u_1v_3,\ u_1v_2 - u_2v_1)\), perpendicular to both, with \(\|{\mathbf{u}\times \mathbf{v}}\| = \|\mathbf{u}\|\|\mathbf{v}\|\sin\theta\) = area of the parallelogram.
- Triple product \(\mathbf{u}\cdot({\mathbf{v}\times \mathbf{w}}) = \det[\mathbf{u}\ \mathbf{v}\ \mathbf{w}]\), the signed volume of the parallelepiped; zero iff the three vectors are coplanar.
- Distance to a plane from \((x_0, y_0, z_0)\) to \(ax + by + cz = d\): \(\dfrac{|ax_0 + by_0 + cz_0 - d|}{\sqrt{a^2 + b^2 + c^2}}\).
Applications: work \(= {\mathbf{F}\cdot \mathbf{d}}\), torque \(= {\mathbf{r}\times \mathbf{F}}\), lighting in computer graphics uses \({\mathbf{n}\cdot \mathbf{l}}\), and a camera-facing test uses the sign of a cross product.
How to work it
- Compute \({\mathbf{v}\cdot \mathbf{u}}\) and \({\mathbf{u}\cdot \mathbf{u}}\).
- The parallel part is \(\operatorname{proj}_{\mathbf{u}}\mathbf{v} = \dfrac{{\mathbf{v}\cdot \mathbf{u}}}{{\mathbf{u}\cdot \mathbf{u}}}\mathbf{u}\).
- The perpendicular part is \(\mathbf{v} - \operatorname{proj}_{\mathbf{u}}\mathbf{v}\); verify its dot product with \(\mathbf{u}\) is zero.
- Lengths: \(\|\mathbf{v}\|^2\) must equal the sum of the squared lengths of the two parts.
\(\mathbf{u} = (1, 2, 2)\), \(\mathbf{v} = (2, -1, 0)\): \({\mathbf{u}\cdot \mathbf{v}} = 2 - 2 + 0 = 0\), so they are orthogonal; \(\|\mathbf{u}\| = \sqrt{1 + 4 + 4} = 3\), \(\|\mathbf{v}\| = \sqrt5\).
Project \(\mathbf{w} = (3, 0, 3)\) onto \(\mathbf{u}\): \({\mathbf{w}\cdot \mathbf{u}} = 3 + 0 + 6 = 9\), \({\mathbf{u}\cdot \mathbf{u}} = 9\), so \(\operatorname{proj}_{\mathbf{u}}\mathbf{w} = (1, 2, 2)\) and the perpendicular part is \((2, -2, 1)\); check \((2, -2, 1)\cdot(1, 2, 2) = 2 - 4 + 2 = 0\) and \(9 + 9 = 18 = \|\mathbf{w}\|^2\).
The plane through \((1, 0, 0)\) spanned by \(\mathbf{u}\) and \(\mathbf{v}\) has normal \({\mathbf{u}\times \mathbf{v}} = (0\cdot 2 - 2(-1),\ 2\cdot 2 - 1\cdot 0,\ 1(-1) - 2\cdot 2) = (2, 4, -5)\), so its equation is \(2(x - 1) + 4y - 5z = 0\), i.e. \(2x + 4y - 5z = 2\).
Angle, area, volume. For \((1, 0, 1)\) and \((1, 1, 0)\): \(\cos\theta = \dfrac{1 + 0 + 0}{\sqrt2\,\sqrt2} = \tfrac12\), so \(\theta = 60^\circ\). The parallelogram spanned by \((2, 1, 0)\) and \((1, 3, 0)\) has \({\mathbf{u}\times \mathbf{v}} = (1\cdot 0 - 0\cdot 3,\ 0\cdot 1 - 2\cdot 0,\ 2\cdot 3 - 1\cdot 1) = (0, 0, 5)\), hence area \(5\) (the same as \(\left|\det\begin{bmatrix} 2 & 1 \\ 1 & 3 \end{bmatrix}\right|\)). And \((1, 0, 0), (0, 1, 0), (1, 1, 0)\) have triple product \(\det = 0\): they are coplanar (all in the \(xy\)-plane), so the parallelepiped is flat.
Distance to a line. The distance from a point to the line \(\mathbf{r} = t\mathbf{u}\) through the origin is the length of the perpendicular part of the point’s position vector: for \((3, 0, 3)\) and \(\mathbf{u} = (1, 2, 2)\) the perpendicular part was \((2, -2, 1)\), so the distance is \(\sqrt{4 + 4 + 1} = 3\). For a line through \(\mathbf{p}\) instead of the origin, apply the same to \(\mathbf{v} - \mathbf{p}\).
Watch out. \({\mathbf{u}\cdot \mathbf{v}}\) is a number and \({\mathbf{u}\times \mathbf{v}}\) is a vector (and only exists in \(\mathbb{R}^3\)). Also \(\|\mathbf{u} + \mathbf{v}\|\) is not \(\|\mathbf{u}\| + \|\mathbf{v}\|\) unless the vectors point the same way.
Practice: problem 34 · Challenge: problems 74, 96, 97, 103, 111, 133 (the practice groups are the last entries in the contents).
Inner product spaces and norms
Unit V: Inner product spaces and least squares · Topic 21 of 23
Key idea
An inner product is any rule \({\langle\mathbf{u}, \mathbf{v}\rangle}\) with the three defining properties of the dot product: symmetry, linearity and positivity. Once a space has one, it has lengths, distances, angles, orthogonality, Cauchy–Schwarz and projections, exactly as in \(\mathbb{R}^n\). The most important new example is the integral inner product on functions, which is where Fourier series come from.
- \(\mathbb{R}^n\) the dot product; weighted versions \(\sum w_iu_iv_i\) with \(w_i \gt 0\). Orthogonality depends on the inner product chosen: under \({\langle\mathbf{u}, \mathbf{v}\rangle} = u_1v_1 + 2u_2v_2\) the vectors \((1, 1)\) and \((1, -1)\) have inner product \(1 - 2 = -1\), so they are not orthogonal, although their dot product is \(0\).
- Matrices \({\langle A, B\rangle} = \operatorname{tr}(A^TB) = \sum a_{ij}b_{ij}\).
- Functions \({\langle f, g\rangle} = \displaystyle\int_a^b f(t)g(t)\,dt\) on \(C[a, b]\); \(\|f\|^2 = \int_a^b f^2\,dt\).
- \(\mathbb{C}^n\) \({\langle\mathbf{u}, \mathbf{v}\rangle} = \sum\overline{u_i}v_i\).
Cauchy–Schwarz \(|{\langle\mathbf{u}, \mathbf{v}\rangle}| \le \|\mathbf{u}\|\|\mathbf{v}\|\) and the triangle inequality hold in every inner product space; for functions the first reads \(\left(\int fg\right)^2 \le \int f^2\int g^2\).
On \([-\pi, \pi]\) with \({\langle f, g\rangle} = \int_{-\pi}^{\pi} fg\,dx\):
\[{\langle\cos mx, \cos nx\rangle} = 0 \ (m \ne n)\] \[{\langle\sin mx, \cos nx\rangle} = 0\] \[\|\cos nx\|^2 = \|\sin nx\|^2 = \pi\] \[\|1\|^2 = 2\pi.\]So \(\{1, \cos x, \sin x, \cos 2x, \sin 2x, \dots\}\) is an orthogonal set, and the Fourier coefficients of \(f\) are just the projection coefficients \({\langle f, e_k\rangle}/\|e_k\|^2\): dividing by the squared norms above,
\[a_0 = \frac{1}{2\pi}\int_{-\pi}^{\pi} f\,dx,\qquad a_n = \frac{1}{\pi}\int_{-\pi}^{\pi} f(x)\cos nx\,dx,\qquad b_n = \frac{1}{\pi}\int_{-\pi}^{\pi} f(x)\sin nx\,dx.\]For \(f(x) = x\): every \(a_n = 0\) because \(x\cos nx\) is odd, and integrating by parts, \(b_n = \tfrac{1}{\pi}\int_{-\pi}^{\pi} x\sin nx\,dx = \tfrac{2(-1)^{n+1}}{n}\), so \(b_1 = 2\), \(b_2 = -1\), \(b_3 = \tfrac23\): the series starts \(2\sin x - \sin 2x + \tfrac23\sin 3x - \cdots\).
- Generalised Fourier coefficients for an orthonormal set \(e_1, \dots, e_k\), the best approximation to \(f\) in their span is \(\sum{\langle f, e_i\rangle} e_i\).
- Parseval / Bessel \(\sum{\langle f, e_i\rangle}^2 \le \|f\|^2\), with equality when the set is a basis (sum of squares of the coefficients equals the squared length). On \([-1, 1]\) with \(e_1 = \tfrac{1}{\sqrt2}\), \(e_2 = \sqrt{\tfrac32}\,t\) and \(f = t^2\): \({\langle f, e_1\rangle} = \tfrac{2/3}{\sqrt2}\) and \({\langle f, e_2\rangle} = 0\), so the left side is \(\tfrac29\) while \(\|f\|^2 = \int_{-1}^{1} t^4\,dt = \tfrac25\); the gap \(\tfrac25 - \tfrac29 = \tfrac{8}{45}\) equals \(\|t^2 - \tfrac13\|^2\), the squared distance from \(f\) to \(\operatorname{span}\{1, t\}\).
- Legendre-type polynomials Gram–Schmidt applied to \(1, t, t^2, \dots\) with the integral inner product.
- Even and odd on a symmetric interval an even function is orthogonal to every odd function; \({\langle 1, t\rangle} = 0\), \({\langle t, t^3\rangle} \ne 0\).
How to work it
- Write the inner product as the integral over the given interval; do not default to the dot product.
- For \(\|f\|\), integrate \(f^2\) and take the square root at the end.
- For orthogonality, compute the integral of the product; use even/odd symmetry to see zeros without integrating.
- For projections and Gram–Schmidt, use the same formulas as in \(\mathbb{R}^n\) with \({\langle\cdot,\cdot\rangle}\) in place of the dot product.
With \({\langle f, g\rangle} = \int_{-1}^{1} f(t)g(t)\,dt\):
\[\|t\|^2 = \int_{-1}^{1} t^2\,dt = \tfrac23\] \[\|t\| = \sqrt{\tfrac23}\] \[{\langle 1, t\rangle} = \int_{-1}^{1} t\,dt = 0\]so \(1\) and \(t\) are orthogonal (even times odd). But \({\langle 1, t^2\rangle} = \int_{-1}^{1} t^2\,dt = \tfrac23 \ne 0\), so \(1\) and \(t^2\) are not. Removing the component of \(t^2\) along \(1\):
\[t^2 - \frac{{\langle t^2, 1\rangle}}{{\langle 1, 1\rangle}}\cdot 1 = t^2 - \frac{2/3}{2} = t^2 - \tfrac13\]which is orthogonal to both \(1\) and \(t\). Up to scaling, \(1,\ t,\ t^2 - \tfrac13\) are the first three Legendre polynomials.
An angle between functions. \(\|1\|^2 = \int_{-1}^{1} 1\,dt = 2\) and \(\|t^2\|^2 = \int_{-1}^{1} t^4\,dt = \tfrac25\), so
\[\cos\theta = \frac{{\langle 1, t^2\rangle}}{\|1\|\,\|t^2\|} = \frac{2/3}{\sqrt2\,\sqrt{2/5}} = \frac{2/3}{2/\sqrt5} = \frac{\sqrt5}{3} \approx 0.745\]which is at most \(1\), as Cauchy–Schwarz guarantees. For matrices, \({\langle A, B\rangle} = \operatorname{tr}(A^TB)\) is just the dot product of the entries: \(\left\langle \begin{bmatrix} 1 & 2 \\ 0 & 1 \end{bmatrix}, \begin{bmatrix} 0 & 1 \\ 1 & 0 \end{bmatrix} \right\rangle = 0 + 2 + 0 + 0 = 2\).
Watch out. The interval matters: \({\langle 1, t\rangle} = 0\) on \([-1, 1]\) but equals \(\tfrac12\) on \([0, 1]\). Always read which inner product the problem specifies before computing a single norm.
Practice: problems 28, 31 · Challenge: problems 59, 100, 102, 103, 105 (the practice groups are the last entries in the contents).
Orthonormal bases, projections and Gram–Schmidt
Unit V: Inner product spaces and least squares · Topic 22 of 23
Key idea
In an orthonormal basis coordinates are just inner products, and the projection of a vector onto a subspace is the sum of its components along the basis vectors. Gram–Schmidt manufactures such a basis from any independent set by subtracting, at each step, the projection onto what has already been built. Recording the steps gives the QR factorization.
If \(\mathbf{q}_1, \dots, \mathbf{q}_k\) are orthonormal with span \(W\):
\[\operatorname{proj}_W\mathbf{v} = {\langle\mathbf{v}, \mathbf{q}_1\rangle}\mathbf{q}_1 + \cdots + {\langle\mathbf{v}, \mathbf{q}_k\rangle}\mathbf{q}_k = QQ^T\mathbf{v}\] \[\mathbf{v} - \operatorname{proj}_W\mathbf{v} \perp W.\]\(\operatorname{proj}_W\mathbf{v}\) is the point of \(W\) closest to \(\mathbf{v}\). For a basis \(\mathbf{v}_1, \dots, \mathbf{v}_k\) of \(W\):
\[\mathbf{w}_1 = \mathbf{v}_1\] \[\mathbf{w}_j = \mathbf{v}_j - \sum_{i \lt j}\frac{{\langle\mathbf{v}_j, \mathbf{w}_i\rangle}}{{\langle\mathbf{w}_i, \mathbf{w}_i\rangle}}\mathbf{w}_i\] \[\mathbf{q}_j = \frac{\mathbf{w}_j}{\|\mathbf{w}_j\|}.\]QR. For \(A = [\mathbf{v}_1 \cdots \mathbf{v}_k]\) with independent columns, \(A = QR\) where \(Q = [\mathbf{q}_1 \cdots \mathbf{q}_k]\) and \(R = Q^TA\) is upper triangular with positive diagonal \(\|\mathbf{w}_j\|\). With that sign convention the factorization is unique.
- \(W^\perp\) all vectors orthogonal to every vector of \(W\); a subspace with \(\dim W + \dim W^\perp = n\) and \((W^\perp)^\perp = W\). Every \(\mathbf{v}\) splits uniquely as \(\mathbf{w} + \mathbf{w}^\perp\).
- Four subspaces \((\operatorname{Row}A)^\perp = \operatorname{Nul}A\) and \((\operatorname{Col}A)^\perp = \operatorname{Nul}A^T\).
- Projection matrix onto \(\operatorname{Col}A\) (independent columns): \(P = A(A^TA)^{-1}A^T\); with orthonormal columns \(P = QQ^T\). Always \(P^2 = P\), \(P^T = P\), eigenvalues \(0\) and \(1\), \(\operatorname{rank}P = \dim W\).
- Reflection across \(W\): \(2P - I\) (orthogonal and symmetric). In the example below it sends \((0, 0, 3)\) to \(2(1, -1, 2) - (0, 0, 3) = (2, -2, 1)\), at the same distance \(\sqrt3\) on the other side of the plane.
- Distance from \(\mathbf{v}\) to \(W\) is \(\|\mathbf{v} - P\mathbf{v}\|\).
Gram–Schmidt works verbatim in function spaces with the integral inner product; the only change is how the inner products are computed.
How to work it
- Keep the first vector: \(\mathbf{w}_1 = \mathbf{v}_1\).
- For each later vector subtract its projections onto every previous \(\mathbf{w}_i\) (use the unnormalized \(\mathbf{w}_i\) to avoid square roots until the end).
- After each step check \(\mathbf{w}_j \perp \mathbf{w}_i\) for all earlier \(i\); a nonzero dot product means an arithmetic slip.
- Normalize at the very end. If some \(\mathbf{w}_j = \mathbf{0}\), the original vectors were dependent.
- For \(R\) in \(A = QR\): \(r_{ij} = {\mathbf{q}_i\cdot \mathbf{v}_j}\) for \(i \le j\).
\(\mathbf{v}_1 = (1, 1, 0)\), \(\mathbf{v}_2 = (1, 0, 1)\). Then \(\mathbf{w}_1 = (1, 1, 0)\) and
\[\mathbf{w}_2 = \mathbf{v}_2 - \frac{{\mathbf{v}_2\cdot \mathbf{w}_1}}{{\mathbf{w}_1\cdot \mathbf{w}_1}}\mathbf{w}_1\] \[= (1, 0, 1) - \tfrac12(1, 1, 0) = (\tfrac12, -\tfrac12, 1)\]which is orthogonal to \(\mathbf{w}_1\) (\(\tfrac12 - \tfrac12 = 0\)). Normalizing: \(\mathbf{q}_1 = \tfrac{1}{\sqrt2}(1, 1, 0)\), \(\mathbf{q}_2 = \tfrac{1}{\sqrt6}(1, -1, 2)\).
Project \(\mathbf{v} = (0, 0, 3)\) onto the plane: \({\mathbf{v}\cdot \mathbf{q}_1} = 0\), \({\mathbf{v}\cdot \mathbf{q}_2} = 6/\sqrt6 = \sqrt6\), so
\[\operatorname{proj}_W\mathbf{v} = \sqrt6\,\mathbf{q}_2 = (1, -1, 2)\] \[\mathbf{v} - \operatorname{proj}_W\mathbf{v} = (-1, 1, 1) \perp \mathbf{q}_1, \mathbf{q}_2.\]The distance from \((0, 0, 3)\) to the plane is \(\|(-1, 1, 1)\| = \sqrt3\).
The same example as \(QR\) and as a projection matrix. With \(A = [\mathbf{v}_1\ \mathbf{v}_2]\) and \(Q = [\mathbf{q}_1\ \mathbf{q}_2]\), the entries of \(R\) are \(r_{11} = {\mathbf{q}_1\cdot \mathbf{v}_1} = \tfrac{2}{\sqrt2} = \sqrt2\), \(r_{12} = {\mathbf{q}_1\cdot \mathbf{v}_2} = \tfrac{1}{\sqrt2}\), \(r_{22} = {\mathbf{q}_2\cdot \mathbf{v}_2} = \tfrac{1 + 0 + 2}{\sqrt6} = \tfrac{\sqrt6}{2}\):
\[R = \begin{bmatrix} \sqrt2 & \tfrac{1}{\sqrt2} \\ 0 & \tfrac{\sqrt6}{2} \end{bmatrix}\]and the second column of \(QR\) is \(\tfrac{1}{\sqrt2}\mathbf{q}_1 + \tfrac{\sqrt6}{2}\mathbf{q}_2 = (\tfrac12, \tfrac12, 0) + (\tfrac12, -\tfrac12, 1) = (1, 0, 1) = \mathbf{v}_2\). The projection matrix onto the plane is \(P = A(A^TA)^{-1}A^T\) with \(A^TA = \begin{bmatrix} 2 & 1 \\ 1 & 2 \end{bmatrix}\), \((A^TA)^{-1} = \tfrac13\begin{bmatrix} 2 & -1 \\ -1 & 2 \end{bmatrix}\), giving
\[P = \frac13\begin{bmatrix} 2 & 1 & 1 \\ 1 & 2 & -1 \\ 1 & -1 & 2 \end{bmatrix}\]and \(P(0, 0, 3) = (1, -1, 2)\), the projection found above. \(P\) is symmetric, \(P^2 = P\), and its rank is \(2 = \dim W\).
The orthogonal complement. \(W^\perp\) is the set of vectors perpendicular to both \(\mathbf{v}_1\) and \(\mathbf{v}_2\), i.e. the null space of the matrix with those vectors as rows: \(x + y = 0\) and \(x + z = 0\), so \(W^\perp = \operatorname{span}\{(1, -1, -1)\}\), a line, and \(2 + 1 = 3\) as the dimensions must. The residual \((-1, 1, 1)\) found above lies on exactly this line, and \(I - P\) is the projection onto it.
Watch out. Subtract the projection onto the orthogonalized vectors \(\mathbf{w}_i\), not onto the original \(\mathbf{v}_i\); using the originals leaves cross terms and the result is not orthogonal. Normalizing too early just introduces square roots into every later step.
Practice: problems 30, 31 · Challenge: problems 63, 72, 95, 96, 101, 104, 106, 108, 112, 113, 121, 126, 129 (the practice groups are the last entries in the contents).
Least squares and curve fitting
Unit V: Inner product spaces and least squares · Topic 23 of 23
Key idea
When \(A\mathbf{x} = \mathbf{b}\) has no solution (more equations than unknowns, noisy data), the least squares solution \(\hat{\mathbf{x}}\) makes \(\|A\mathbf{x} - \mathbf{b}\|\) as small as possible. Geometrically \(A\hat{\mathbf{x}}\) is the projection of \(\mathbf{b}\) onto the column space, and algebraically \(\hat{\mathbf{x}}\) solves the normal equations. Every line, parabola or curve "of best fit" is this computation.
Derivation: the residual must be orthogonal to every column, \(A^T(\mathbf{b} - A\hat{\mathbf{x}}) = \mathbf{0}\).
- Unique iff the columns of \(A\) are independent (then \(A^TA\) is invertible and \(\hat{\mathbf{x}} = (A^TA)^{-1}A^T\mathbf{b}\)).
- Not unique if the columns are dependent: \(A^TA\) is singular, the normal equations are still consistent, and there are infinitely many least squares solutions, all with the same projection \(A\hat{\mathbf{x}}\).
- Consistent system if \(A\mathbf{x} = \mathbf{b}\) happens to be solvable, its solutions are exactly the least squares solutions and the residual is zero.
- Via QR \(R\hat{\mathbf{x}} = Q^T\mathbf{b}\), numerically better than forming \(A^TA\). With \(A = QR\), \(A^TA = R^TQ^TQR = R^TR\) and \(A^T\mathbf{b} = R^TQ^T\mathbf{b}\); cancelling the invertible \(R^T\) leaves a triangular system solved by back substitution.
Minimum error \(= \|\mathbf{b} - A\hat{\mathbf{x}}\|\), the distance from \(\mathbf{b}\) to the column space.
- Line \(y = a + bx\) one row \((1, x_i)\) per data point, unknowns \((a, b)\), right-hand side \(y_i\).
- Parabola \(y = a + bx + cx^2\) rows \((1, x_i, x_i^2)\).
- General \(y = a\,g(x) + b\,h(x)\) for any known functions: rows \((g(x_i), h(x_i))\). The unknowns must appear linearly; \(x\) may appear any way at all.
- Exponential \(y = Ce^{kt}\) take logs, \(\ln y = \ln C + kt\), and fit a line.
- Closed form for a line \(b = \dfrac{n\sum x_iy_i - \sum x_i\sum y_i}{n\sum x_i^2 - (\sum x_i)^2}\), \(a = \bar y - b\bar x\).
Residuals of a fitted line sum to zero and are orthogonal to the \(x\)-column; both are quick checks on the arithmetic.
How to work it
- Write the model for each data point, one equation per point, and collect them as \(A\mathbf{x} = \mathbf{b}\) with the unknown parameters in \(\mathbf{x}\).
- Compute \(A^TA\) (symmetric, small) and \(A^T\mathbf{b}\).
- Solve \(A^TA\hat{\mathbf{x}} = A^T\mathbf{b}\). If \(A^TA\) is singular, row reduce and give the whole family of solutions.
- Compute the residual \(\mathbf{b} - A\hat{\mathbf{x}}\) and check it is orthogonal to the columns of \(A\).
Fit \(y = a + bx\) to \((0, 1), (1, 3), (2, 4)\):
\[A = \begin{bmatrix} 1 & 0 \\ 1 & 1 \\ 1 & 2 \end{bmatrix},\quad \mathbf{b} = \begin{bmatrix} 1 \\ 3 \\ 4 \end{bmatrix}\] \[A^TA = \begin{bmatrix} 3 & 3 \\ 3 & 5 \end{bmatrix},\quad A^T\mathbf{b} = \begin{bmatrix} 8 \\ 11 \end{bmatrix}.\]\(3a + 3b = 8\) and \(3a + 5b = 11\) give \(2b = 3\), \(b = \tfrac32\), \(a = \tfrac{8 - 9/2}{3} = \tfrac76\): the line is \(y = \tfrac76 + \tfrac32x\).
Predicted values \(\tfrac76, \tfrac{8}{3}, \tfrac{25}{6}\); residuals \(-\tfrac16, \tfrac13, -\tfrac16\). They sum to zero and \(0(-\tfrac16) + 1(\tfrac13) + 2(-\tfrac16) = 0\), so the residual is orthogonal to both columns, as it must be. The minimum error is \(\sqrt{\tfrac1{36} + \tfrac19 + \tfrac1{36}} = \tfrac{1}{\sqrt6}\).
Same line by the closed form. \(n = 3\), \(\sum x_i = 3\), \(\sum y_i = 8\), \(\sum x_iy_i = 0 + 3 + 8 = 11\), \(\sum x_i^2 = 0 + 1 + 4 = 5\):
\[b = \frac{3\cdot 11 - 3\cdot 8}{3\cdot 5 - 3^2} = \frac{33 - 24}{15 - 9} = \frac{9}{6} = \frac32,\qquad a = \bar y - b\bar x = \frac83 - \frac32\cdot 1 = \frac76.\]The formulas are the normal equations solved once and for all, so they must agree. To fit \(y = Ce^{kt}\) to data instead, take logarithms first: the rows are \((1, t_i)\), the right-hand side is \(\ln y_i\), and the unknowns are \(\ln C\) and \(k\); exponentiate the first at the end. For the data \((0, 2), (1, 6), (2, 18)\) the logarithms \(\ln 2, \ln 6, \ln 18\) increase by exactly \(\ln 3\) each step, so the line has slope \(k = \ln 3\) and intercept \(\ln C = \ln 2\): the fit \(y = 2\cdot 3^t\) is exact, with zero residual.
Watch out. The normal equations use \(A^TA\) and \(A^T\mathbf{b}\), not \(AA^T\). And when two columns of \(A\) are equal or proportional, do not conclude "no least squares solution": there are infinitely many, and the question usually wants all of them.
Practice: problems 32, 33 · Challenge: problems 98, 99, 100, 107, 108, 110, 113, 125, 129 (the practice groups are the last entries in the contents).
Set 1: matrices, systems and determinants
Linear Algebra · Exam-style problems 1 to 10
Problems 1 to 10
These problems are modelled on final exams for a first linear algebra course. Every problem opens to a full, step-by-step solution with the final answer highlighted. Try it on paper first. The Review link at the end of each solution jumps back to the tab that teaches the idea.
1(a) Give an example of \(2\times 2\) matrices \(C\) and \(D\) with \(CD \ne DC\). (b) Let \(A = \begin{bmatrix} a & 0 \\ 0 & a \end{bmatrix}\). Show that \(AB = BA\) for every \(2\times 2\) matrix \(B\). (c) Are there any other \(2\times 2\) matrices \(A\) with \(AB = BA\) for all \(B\)?
Solution
(a) \(C = \begin{bmatrix} 0 & 1 \\ 0 & 0 \end{bmatrix}\), \(D = \begin{bmatrix} 1 & 0 \\ 0 & 0 \end{bmatrix}\):
\[CD = \begin{bmatrix} 0 & 0 \\ 0 & 0 \end{bmatrix}\] \[DC = \begin{bmatrix} 0 & 1 \\ 0 & 0 \end{bmatrix}.\](b) \(A = aI\), so \(AB = aIB = aB\) and \(BA = BaI = aB\). Scalar multiplication commutes with everything.
(c) No. Suppose \(A = \begin{bmatrix} p & q \\ r & s \end{bmatrix}\) commutes with every \(B\). With \(B = \begin{bmatrix} 1 & 0 \\ 0 & 0 \end{bmatrix}\):
\[AB = \begin{bmatrix} p & 0 \\ r & 0 \end{bmatrix}\] \[BA = \begin{bmatrix} p & q \\ 0 & 0 \end{bmatrix}\] \[\Longrightarrow\ q = r = 0.\]With \(B = \begin{bmatrix} 0 & 1 \\ 0 & 0 \end{bmatrix}\): \(AB = \begin{bmatrix} 0 & p \\ 0 & 0 \end{bmatrix}\) and \(BA = \begin{bmatrix} 0 & s \\ 0 & 0 \end{bmatrix}\), so \(p = s\). Hence \(A = pI\): only the scalar matrices commute with all \(2\times 2\) matrices.
(a) e.g. \(C = E_{12}\), \(D = E_{11}\); (b) \(aI\) commutes with everything; (c) no, only scalar matrices.
Review:
2Let \(a, b\) be real numbers and consider \(X + Y + 2Z = a,\ 2X + 2Y + 3Z = b,\ 3X + 3Y + 4Z = a + b\). (a) For which \(a, b\) does the system have a solution? Describe all solutions. (b) Are there \(a, b\) for which there is exactly one solution?
Solution
(a) Row reduce the augmented matrix:
\[\left[\begin{array}{ccc|c} 1 & 1 & 2 & a \\ 2 & 2 & 3 & b \\ 3 & 3 & 4 & a + b \end{array}\right] \xrightarrow{R_2 - 2R_1,\ R_3 - 3R_1} \left[\begin{array}{ccc|c} 1 & 1 & 2 & a \\ 0 & 0 & -1 & b - 2a \\ 0 & 0 & -2 & b - 2a \end{array}\right] \xrightarrow{R_3 - 2R_2} \left[\begin{array}{ccc|c} 1 & 1 & 2 & a \\ 0 & 0 & -1 & b - 2a \\ 0 & 0 & 0 & 2a - b \end{array}\right].\]The last row reads \(0 = 2a - b\), so the system is consistent exactly when \(b = 2a\). In that case the second row says \(-Z = b - 2a = 0\), so \(Z = 0\), and the first row becomes \(X + Y = a\) with \(Y\) free:
\[(X, Y, Z) = (a - t,\ t,\ 0)\] \[t \in \mathbb{R}.\](b) No. Columns 1 and 2 of the coefficient matrix are identical, so \(Y\) is always a free variable; whenever a solution exists there are infinitely many. The coefficient matrix has rank 2 and three unknowns, so uniqueness is impossible for every right-hand side.
(a) Solvable iff \(b = 2a\); then \((X, Y, Z) = (a - t, t, 0)\). (b) Never exactly one solution.
Review: ·
3Four numbers \(x, y, z, w\) have sum 20 and "super sum" \(x - y + z - w = 10\). (a) Find all solutions by row reducing the augmented matrix \(B = \left[\begin{array}{cccc|c} 1 & 1 & 1 & 1 & 20 \\ 1 & -1 & 1 & -1 & 10 \end{array}\right]\). (b) Find two linearly independent vectors perpendicular to the kernel of the coefficient matrix \(A\).
Solution
(a) \(R_2 - R_1\) gives \((0, -2, 0, -2 \mid -10)\); divide by \(-2\) to get \((0, 1, 0, 1 \mid 5)\); then \(R_1 - R_2\):
\[\left[\begin{array}{cccc|c} 1 & 0 & 1 & 0 & 15 \\ 0 & 1 & 0 & 1 & 5 \end{array}\right]\] \[\Longrightarrow\ x = 15 - z,\quad y = 5 - w.\] \[\begin{bmatrix} x \\ y \\ z \\ w \end{bmatrix} = \begin{bmatrix} 15 \\ 5 \\ 0 \\ 0 \end{bmatrix} + z\begin{bmatrix} -1 \\ 0 \\ 1 \\ 0 \end{bmatrix} + w\begin{bmatrix} 0 \\ -1 \\ 0 \\ 1 \end{bmatrix}\]a two-dimensional plane in \(\mathbb{R}^4\). The two parameter vectors span \(\ker A\).
(b) The row space of \(A\) is the orthogonal complement of the kernel, so the two rows \((1, 1, 1, 1)\) and \((1, -1, 1, -1)\) work. Check: \((1,1,1,1)\cdot(-1,0,1,0) = 0\), \((1,-1,1,-1)\cdot(0,-1,0,1) = 1 - 1 = 0\), and the two rows are not multiples of each other.
(a) \((15, 5, 0, 0) + z(-1, 0, 1, 0) + w(0, -1, 0, 1)\); (b) \((1,1,1,1)\) and \((1,-1,1,-1)\).
Review: ·
4For which real \(a, b\) is \(A = \begin{bmatrix} 1 & a & b & 0 \\ 0 & 1 & a & b \\ 0 & 0 & 1 & a \\ 0 & 0 & 0 & 1 \end{bmatrix}\) invertible? For those values write down \(A^{-1}\) in terms of \(a\) and \(b\).
Solution
\(A\) is upper triangular with determinant \(1\cdot 1\cdot 1\cdot 1 = 1 \ne 0\), so it is invertible for every \(a, b\).
Write \(A = I + N\) with \(N\) strictly upper triangular, hence nilpotent: \(N^4 = 0\). Then \((I + N)(I - N + N^2 - N^3) = I - N^4 = I\), so
\[A^{-1} = I - N + N^2 - N^3.\]Compute the powers: \(N^2\) has \(a^2\) in positions \((1,3), (2,4)\) and \(2ab\) in position \((1,4)\); \(N^3\) has \(a^3\) in position \((1,4)\) only. Therefore
\[A^{-1} = \begin{bmatrix} 1 & -a & a^2 - b & 2ab - a^3 \\ 0 & 1 & -a & a^2 - b \\ 0 & 0 & 1 & -a \\ 0 & 0 & 0 & 1 \end{bmatrix}.\]Check row 1 of \(AA^{-1}\), column 3: \(1(a^2 - b) + a(-a) + b(1) = 0\). Column 4: \((2ab - a^3) + a(a^2 - b) + b(-a) = 0\).
Invertible for all \(a, b\) (\(\det A = 1\)); \(A^{-1} = I - N + N^2 - N^3\) as displayed.
Review: ·
5The "glider" configuration in the Game of Life is \(A = \begin{bmatrix} 1 & 0 & 0 \\ 0 & 1 & 1 \\ 1 & 1 & 0 \end{bmatrix}\). Find \(A^{-1}\) using row reduction.
Solution
\[\left[\begin{array}{ccc|ccc} 1 & 0 & 0 & 1 & 0 & 0 \\ 0 & 1 & 1 & 0 & 1 & 0 \\ 1 & 1 & 0 & 0 & 0 & 1 \end{array}\right] \xrightarrow{R_3 - R_1} \left[\begin{array}{ccc|ccc} 1 & 0 & 0 & 1 & 0 & 0 \\ 0 & 1 & 1 & 0 & 1 & 0 \\ 0 & 1 & 0 & -1 & 0 & 1 \end{array}\right] \xrightarrow{R_3 - R_2} \left[\begin{array}{ccc|ccc} 1 & 0 & 0 & 1 & 0 & 0 \\ 0 & 1 & 1 & 0 & 1 & 0 \\ 0 & 0 & -1 & -1 & -1 & 1 \end{array}\right]\] \[\xrightarrow{-R_3,\ R_2 - R_3} \left[\begin{array}{ccc|ccc} 1 & 0 & 0 & 1 & 0 & 0 \\ 0 & 1 & 0 & -1 & 0 & 1 \\ 0 & 0 & 1 & 1 & 1 & -1 \end{array}\right]\] \[A^{-1} = \begin{bmatrix} 1 & 0 & 0 \\ -1 & 0 & 1 \\ 1 & 1 & -1 \end{bmatrix}.\]Check: row 2 of \(A\) times \(A^{-1}\) is \((0 - 1 + 1,\ 0 + 0 + 1,\ 0 + 1 - 1) = (0, 1, 0)\). Also \(\det A = 1(0 - 1) = -1\), consistent with \(\det A^{-1} = -1\).
\(A^{-1} = \begin{bmatrix} 1 & 0 & 0 \\ -1 & 0 & 1 \\ 1 & 1 & -1 \end{bmatrix}\).
Review:
6Compute \(\det A\) for \(A = \begin{bmatrix} 1 & 0 & 0 & 0 & 0 \\ 1 & 2 & 2 & 2 & 2 \\ 1 & 0 & 3 & 0 & 0 \\ 1 & 0 & 3 & 4 & 4 \\ 1 & 0 & 3 & 0 & 5 \end{bmatrix}\), showing your work.
Solution
Row 1 has a single nonzero entry, so expand along it:
\[\det A = 1\cdot\begin{vmatrix} 2 & 2 & 2 & 2 \\ 0 & 3 & 0 & 0 \\ 0 & 3 & 4 & 4 \\ 0 & 3 & 0 & 5 \end{vmatrix}.\]Now column 1 has a single nonzero entry, \(2\) in position \((1,1)\):
\[= 2\begin{vmatrix} 3 & 0 & 0 \\ 3 & 4 & 4 \\ 3 & 0 & 5 \end{vmatrix} = 2\cdot 3\begin{vmatrix} 4 & 4 \\ 0 & 5 \end{vmatrix} = 2\cdot 3\cdot 20 = 120.\]Alternatively, subtracting row 1 from rows 2 to 5 of the original matrix leaves a block triangular matrix with the same \(4\times 4\) block, giving the same \(120\).
\(\det A = 120\).
Review:
7Find the determinants of (a) \(A = \begin{bmatrix} 1 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 1 \\ 0 & 0 & 0 & 1 & 0 \\ 0 & 0 & 1 & 0 & 0 \\ 0 & 1 & 0 & 0 & 0 \end{bmatrix}\) and (b) \(B = \begin{bmatrix} 0 & 0 & 3 & 1 & 0 \\ 0 & 2 & 1 & 0 & 0 \\ 0 & 0 & 0 & 4 & 1 \\ 0 & 0 & 0 & 0 & 5 \\ 1 & 1 & 0 & 0 & 0 \end{bmatrix}\).
Solution
(a) \(A\) is a permutation matrix: it fixes coordinate 1 and swaps \(2 \leftrightarrow 5\) and \(3 \leftrightarrow 4\). Two transpositions make an even permutation, so \(\det A = +1\). (Equivalently: swapping rows 2 and 5, then rows 3 and 4, turns \(A\) into \(I\); two sign changes.)
(b) Use the pattern formula: a nonzero pattern picks one nonzero entry from each row and column. Column 1 has only the entry \(1\) in row 5. Row 4 has only the \(5\) in column 5. Row 3 must then use column 4 (entry \(4\), since column 5 is taken). Row 1 must use column 3 (entry \(3\)). Row 2 is left with column 2 (entry \(2\)). Exactly one pattern survives, with product \(1\cdot 5\cdot 4\cdot 3\cdot 2 = 120\).
Its sign: the pattern sends rows \(1, 2, 3, 4, 5\) to columns \(3, 2, 4, 5, 1\), the 4-cycle \(1 \to 3 \to 4 \to 5 \to 1\), which is odd (a \(k\)-cycle is a product of \(k - 1\) transpositions, here three). Hence
\[\det B = -120.\](a) \(\det A = 1\); (b) \(\det B = -120\).
Review:
8Find the determinants of (a) \(C = \begin{bmatrix} 1 & 2 & 3 & 8 & 8 \\ 4 & 5 & 0 & 8 & 8 \\ 6 & 0 & 0 & 8 & 8 \\ 0 & 0 & 0 & 2 & 1 \\ 0 & 0 & 0 & 1 & 3 \end{bmatrix}\) and (b) \(D = \begin{bmatrix} 11 & 2 & 3 & 2 & 1 \\ 1 & 12 & 3 & 2 & 1 \\ 1 & 2 & 13 & 2 & 1 \\ 1 & 2 & 3 & 12 & 1 \\ 1 & 2 & 3 & 2 & 11 \end{bmatrix}\).
Solution
(a) \(C\) is block upper triangular with a \(3\times 3\) block and a \(2\times 2\) block, so the determinant is the product of the block determinants. Expanding the first block along its third row:
\[\begin{vmatrix} 1 & 2 & 3 \\ 4 & 5 & 0 \\ 6 & 0 & 0 \end{vmatrix} = 6\begin{vmatrix} 2 & 3 \\ 5 & 0 \end{vmatrix} = 6(0 - 15) = -90\] \[\begin{vmatrix} 2 & 1 \\ 1 & 3 \end{vmatrix} = 5\] \[\det C = (-90)(5) = -450.\](b) \(D = 10I + M\), where every row of \(M\) is \((1, 2, 3, 2, 1)\). \(M\) has rank one, so its eigenvalues are \(\operatorname{tr}M = 1 + 2 + 3 + 2 + 1 = 9\) and \(0\) (four times). Adding \(10I\) shifts every eigenvalue by 10: the eigenvalues of \(D\) are \(19, 10, 10, 10, 10\), and
\[\det D = 19\cdot 10^4 = 190{,}000.\](a) \(-450\); (b) \(190{,}000\).
Review: ·
9Solve \(x + 2y + 3z = 14,\ 2x + 3y + z = 11,\ 3x + y + 2z = 11\) by Cramer’s rule.
Solution
\[D = \begin{vmatrix} 1 & 2 & 3 \\ 2 & 3 & 1 \\ 3 & 1 & 2 \end{vmatrix} = 1(6 - 1) - 2(4 - 3) + 3(2 - 9) = 5 - 2 - 21 = -18 \ne 0\]so the rule applies. Replace one column at a time by \((14, 11, 11)\):
\[D_x = \begin{vmatrix} 14 & 2 & 3 \\ 11 & 3 & 1 \\ 11 & 1 & 2 \end{vmatrix} = 14(5) - 2(22 - 11) + 3(11 - 33) = 70 - 22 - 66 = -18\] \[D_y = \begin{vmatrix} 1 & 14 & 3 \\ 2 & 11 & 1 \\ 3 & 11 & 2 \end{vmatrix} = 1(22 - 11) - 14(4 - 3) + 3(22 - 33) = 11 - 14 - 33 = -36\] \[D_z = \begin{vmatrix} 1 & 2 & 14 \\ 2 & 3 & 11 \\ 3 & 1 & 11 \end{vmatrix} = 1(33 - 11) - 2(22 - 33) + 14(2 - 9) = 22 + 22 - 98 = -54.\] \[x = \frac{-18}{-18} = 1\] \[y = \frac{-36}{-18} = 2\] \[z = \frac{-54}{-18} = 3.\]Check in the third equation: \(3 + 2 + 6 = 11\).
\((x, y, z) = (1, 2, 3)\).
Review:
10Find the \(LU\) factorization of \(A = \begin{bmatrix} 1 & 2 & 0 \\ 2 & 5 & 1 \\ 0 & 1 & 3 \end{bmatrix}\) and use it to solve \(A\mathbf{x} = \mathbf{b}\) for \(\mathbf{b} = (1, 3, 5)\) and for \(\mathbf{b} = (0, 1, 7)\).
Solution
Eliminate: \(R_2 - 2R_1\) (\(m_{21} = 2\)) gives \((0, 1, 1)\); the \((3,1)\) entry is already 0 (\(m_{31} = 0\)); \(R_3 - 1\cdot R_2\) (\(m_{32} = 1\)) gives \((0, 0, 2)\).
\[L = \begin{bmatrix} 1 & 0 & 0 \\ 2 & 1 & 0 \\ 0 & 1 & 1 \end{bmatrix}\] \[U = \begin{bmatrix} 1 & 2 & 0 \\ 0 & 1 & 1 \\ 0 & 0 & 2 \end{bmatrix}\] \[\det A = 1\cdot 1\cdot 2 = 2.\]First right-hand side. \(L\mathbf{y} = (1, 3, 5)\): \(y_1 = 1\), \(y_2 = 3 - 2 = 1\), \(y_3 = 5 - 1 = 4\). Then \(U\mathbf{x} = \mathbf{y}\): \(x_3 = 2\), \(x_2 = 1 - 2 = -1\), \(x_1 = 1 - 2(-1) = 3\). So \(\mathbf{x} = (3, -1, 2)\); check row 2: \(6 - 5 + 2 = 3\).
Second right-hand side. \(L\mathbf{y} = (0, 1, 7)\): \(y_1 = 0\), \(y_2 = 1 - 2y_1 = 1\), \(y_3 = 7 - 0\cdot y_1 - 1\cdot y_2 = 6\), so \(\mathbf{y} = (0, 1, 6)\). \(U\mathbf{x} = \mathbf{y}\): \(x_3 = 3\), \(x_2 = 1 - 3 = -2\), \(x_1 = 0 + 4 = 4\). So \(\mathbf{x} = (4, -2, 3)\); check row 3: \(-2 + 9 = 7\).
The elimination was done once; each new right-hand side cost only two triangular substitutions.
\(A = LU\) as displayed; solutions \((3, -1, 2)\) and \((4, -2, 3)\).
Review:
Set 2: vector spaces
Linear Algebra · Exam-style problems 11 to 17
Problems 11 to 17
These problems are modelled on final exams for a first linear algebra course. Every problem opens to a full, step-by-step solution with the final answer highlighted. Try it on paper first. The Review link at the end of each solution jumps back to the tab that teaches the idea.
11Which of the following are subspaces of \(\mathbb{R}^2\)? Prove or disprove. (a) \(V = \{(x_1, x_2) : |x_1| = |x_2|\}\). (b) \(W = \{(x_1, x_2) : x_1 - 2x_2 = 0\}\).
Solution
(a) Not a subspace. \((1, 1) \in V\) and \((1, -1) \in V\), but their sum \((2, 0)\) has \(|2| \ne |0|\), so \(V\) is not closed under addition. (It does contain \(\mathbf{0}\) and is closed under scaling, since \(|cx_1| = |c||x_1| = |c||x_2| = |cx_2|\); geometrically it is the pair of lines \(y = \pm x\).)
(b) Subspace. \(\mathbf{0}\) satisfies \(0 - 0 = 0\). If \(\mathbf{u} = (u_1, u_2)\) and \(\mathbf{v} = (v_1, v_2)\) satisfy \(u_1 - 2u_2 = 0\) and \(v_1 - 2v_2 = 0\), then \((u_1 + v_1) - 2(u_2 + v_2) = 0 + 0 = 0\) and \(cu_1 - 2cu_2 = c\cdot 0 = 0\). Both closures hold. \(W\) is the line through the origin spanned by \((2, 1)\); equivalently it is the null space of the \(1\times 2\) matrix \([1\ \ {-2}]\), and null spaces are always subspaces.
(a) not a subspace (fails addition); (b) subspace, the line spanned by \((2,1)\).
Review:
12Let \(V \subseteq P_2(\mathbb{R})\) be the set of polynomials \(f(X) = a_0 + a_1X + a_2X^2\) with \(f(1) = 0\). (a) Show that \(V\) is a subspace of \(P_2\). (b) Find a basis of \(V\) and \(\dim V\).
Solution
(a) The zero polynomial has \(f(1) = 0\). If \(f(1) = g(1) = 0\) then \((f + g)(1) = f(1) + g(1) = 0\) and \((cf)(1) = cf(1) = 0\). So \(V\) is closed under addition and scaling: a subspace. (It is the kernel of the linear evaluation map \(f \mapsto f(1)\).)
(b) \(f(1) = a_0 + a_1 + a_2 = 0\) is one linear condition on the three coefficients, so \(a_0 = -a_1 - a_2\) with \(a_1, a_2\) free:
\[f = a_1(X - 1) + a_2(X^2 - 1).\]Thus \(\{X - 1,\ X^2 - 1\}\) spans \(V\), and the two are independent (different degrees, or: \(c_1(X - 1) + c_2(X^2 - 1) = 0\) forces \(c_2 = 0\) from the \(X^2\) coefficient, then \(c_1 = 0\)). Hence \(\dim V = 2 = 3 - 1\), one less than \(\dim P_2\), as one independent constraint should give.
(a) kernel of evaluation at 1; (b) basis \(\{X - 1, X^2 - 1\}\), \(\dim V = 2\).
Review: ·
13Let \(v_1, v_2, v_3, v_4\) be linearly independent vectors in a vector space \(V\). Show that \(v_1,\ v_1 + v_2,\ v_1 + v_2 + v_3,\ v_1 + v_2 + v_3 + v_4\) are also linearly independent.
Solution
Suppose \(c_1v_1 + c_2(v_1 + v_2) + c_3(v_1 + v_2 + v_3) + c_4(v_1 + v_2 + v_3 + v_4) = \mathbf{0}\). Regroup by the original vectors:
\[(c_1 + c_2 + c_3 + c_4)v_1 + (c_2 + c_3 + c_4)v_2 + (c_3 + c_4)v_3 + c_4v_4 = \mathbf{0}.\]Because \(v_1, \dots, v_4\) are independent, every coefficient is zero:
\[c_4 = 0,\quad c_3 + c_4 = 0 \Rightarrow c_3 = 0,\quad c_2 + c_3 + c_4 = 0 \Rightarrow c_2 = 0,\quad c_1 + c_2 + c_3 + c_4 = 0 \Rightarrow c_1 = 0.\]Only the trivial combination gives \(\mathbf{0}\), so the four new vectors are independent. In matrix language, the new vectors are the old ones times the upper triangular matrix of ones, which has determinant 1 and is invertible; an invertible matrix carries an independent set to an independent set.
Independent: the coefficients are forced to zero from the last one backward (the change-of-basis matrix is invertible).
Review:
14Let \(A = \begin{bmatrix} 1 & 2 & 3 & 4 \\ 2 & 3 & 4 & 5 \\ 3 & 4 & 5 & 6 \end{bmatrix}\). (a) Find a basis for \(\ker A\) and \(\dim\ker A\). (b) Find a basis for \(\operatorname{Im}A\) and \(\dim\operatorname{Im}A\).
Solution
Row reduce: \(R_2 - 2R_1 = (0, -1, -2, -3)\), \(R_3 - 3R_1 = (0, -2, -4, -6) = 2R_2\), so \(R_3 - 2R_2 = \mathbf{0}\). Scaling \(R_2\) by \(-1\) and then \(R_1 - 2R_2\):
\[\operatorname{RREF}(A) = \begin{bmatrix} 1 & 0 & -1 & -2 \\ 0 & 1 & 2 & 3 \\ 0 & 0 & 0 & 0 \end{bmatrix}\] \[\operatorname{rank}A = 2.\](a) Free variables \(x_3 = s\), \(x_4 = t\); \(x_1 = s + 2t\), \(x_2 = -2s - 3t\):
\[\ker A = \operatorname{span}\left\{\begin{bmatrix} 1 \\ -2 \\ 1 \\ 0 \end{bmatrix}, \begin{bmatrix} 2 \\ -3 \\ 0 \\ 1 \end{bmatrix}\right\}\] \[\dim\ker A = 2.\]Check the first: \(1 - 4 + 3 + 0 = 0\), \(2 - 6 + 4 = 0\), \(3 - 8 + 5 = 0\).
(b) Pivot columns 1 and 2, so a basis of the image is the first two columns of \(A\): \((1, 2, 3)\) and \((2, 3, 4)\); \(\dim\operatorname{Im}A = 2\). Rank–nullity: \(2 + 2 = 4\) columns. (Columns 3 and 4 are \(2\mathbf{a}_2 - \mathbf{a}_1\) and \(3\mathbf{a}_2 - 2\mathbf{a}_1\), as the kernel vectors say.)
(a) basis \((1,-2,1,0), (2,-3,0,1)\), dimension 2; (b) basis \((1,2,3), (2,3,4)\), dimension 2.
Review:
15The "Beacon oscillator" in the Game of Life is \(A = \begin{bmatrix} 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 1 & 1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 1 & 1 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 \end{bmatrix}\). (a) Find the rank and nullity of \(A\). (b) Find a basis for the kernel and a basis for the image.
Solution
(a) Columns 1 and 6 are zero. Columns 2 and 3 are \((0,1,1,0,0,0)\) and \((0,1,0,0,0,0)\), independent; columns 4 and 5 are \((0,0,0,0,1,0)\) and \((0,0,0,1,1,0)\), independent, and they live in different coordinates from columns 2, 3. So \(\operatorname{rank}A = 4\) and \(\operatorname{nullity}A = 6 - 4 = 2\).
(b) Kernel: \(A\mathbf{x} = \mathbf{0}\) reads \(x_2 + x_3 = 0\), \(x_2 = 0\), \(x_5 = 0\), \(x_4 + x_5 = 0\), so \(x_2 = x_3 = x_4 = x_5 = 0\) with \(x_1, x_6\) free:
\[\ker A = \operatorname{span}\{\mathbf{e}_1, \mathbf{e}_6\}.\]Image: the four nonzero columns, \((0,1,1,0,0,0), (0,1,0,0,0,0), (0,0,0,0,1,0), (0,0,0,1,1,0)\), or more simply \(\operatorname{span}\{\mathbf{e}_2, \mathbf{e}_3, \mathbf{e}_4, \mathbf{e}_5\}\). Here \(\ker A \perp \operatorname{Im}A\) because \(A\) is symmetric.
(a) rank 4, nullity 2; (b) \(\ker A = \operatorname{span}\{\mathbf{e}_1, \mathbf{e}_6\}\), \(\operatorname{Im}A = \operatorname{span}\{\mathbf{e}_2, \mathbf{e}_3, \mathbf{e}_4, \mathbf{e}_5\}\).
Review:
16True or false, with a reason: (a) Every \(5\times 4\) matrix has a nonzero vector in its kernel. (b) If \(\{\mathbf{v}_1, \mathbf{v}_2\}\) is a basis of \(\mathbb{R}^2\) and \(A\) is an invertible \(2\times 2\) matrix, then \(\{A\mathbf{v}_1, A\mathbf{v}_2\}\) is a basis of \(\mathbb{R}^2\). (c) If \(\ker A \subseteq \operatorname{Im}A\) for a square matrix \(A\), then \(A^2 = 0\).
Solution
(a) False. A \(5\times 4\) matrix can have four independent columns, e.g. the first four columns of \(I_5\); then \(A\mathbf{x} = \mathbf{0}\) only for \(\mathbf{x} = \mathbf{0}\). (It is a \(4\times 5\) matrix, more columns than rows, that must have a nonzero kernel.)
(b) True. If \(c_1A\mathbf{v}_1 + c_2A\mathbf{v}_2 = \mathbf{0}\) then \(A(c_1\mathbf{v}_1 + c_2\mathbf{v}_2) = \mathbf{0}\); since \(A\) is invertible, \(c_1\mathbf{v}_1 + c_2\mathbf{v}_2 = \mathbf{0}\), so \(c_1 = c_2 = 0\). Two independent vectors in \(\mathbb{R}^2\) form a basis.
(c) False. Take \(A = I\): \(\ker A = \{\mathbf{0}\}\) is contained in \(\operatorname{Im}A = \mathbb{R}^n\), yet \(A^2 = I \ne 0\). The correct implication is the reverse: \(A^2 = 0\) forces \(\operatorname{Im}A \subseteq \ker A\).
(a) F; (b) T; (c) F.
Review: · ·
17Show that \(\mathbf{b}_1 = (1, 1, 0)\), \(\mathbf{b}_2 = (1, 0, 1)\), \(\mathbf{b}_3 = (0, 1, 1)\) form a basis of \(\mathbb{R}^3\), and find the coordinates of \(\mathbf{v} = (2, 3, 5)\) in this basis.
Solution
Three vectors in a three-dimensional space form a basis iff they are independent, i.e. iff the determinant of the matrix with these columns is nonzero:
\[\det\begin{bmatrix} 1 & 1 & 0 \\ 1 & 0 & 1 \\ 0 & 1 & 1 \end{bmatrix} = 1(0 - 1) - 1(1 - 0) + 0 = -2 \ne 0.\]Coordinates: solve \(c_1\mathbf{b}_1 + c_2\mathbf{b}_2 + c_3\mathbf{b}_3 = (2, 3, 5)\), i.e. \(c_1 + c_2 = 2\), \(c_1 + c_3 = 3\), \(c_2 + c_3 = 5\). Adding all three: \(2(c_1 + c_2 + c_3) = 10\), so \(c_1 + c_2 + c_3 = 5\), and subtracting each original equation from this total gives the variable it is missing: \(c_3 = 5 - (c_1 + c_2) = 5 - 2 = 3\), \(c_2 = 5 - (c_1 + c_3) = 5 - 3 = 2\), \(c_1 = 5 - (c_2 + c_3) = 5 - 5 = 0\).
\[[\mathbf{v}]_{\mathcal{B}} = (0, 2, 3)\] \[\text{check: } 2(1, 0, 1) + 3(0, 1, 1) = (2, 3, 5).\]Basis (determinant \(-2\)); \([\mathbf{v}]_{\mathcal{B}} = (0, 2, 3)\).
Review:
Set 3: eigenvalues and diagonalization
Linear Algebra · Exam-style problems 18 to 26
Problems 18 to 26
These problems are modelled on final exams for a first linear algebra course. Every problem opens to a full, step-by-step solution with the final answer highlighted. Try it on paper first. The Review link at the end of each solution jumps back to the tab that teaches the idea.
18Let \(A = \begin{bmatrix} 0 & 1 & 1 & 1 \\ 1 & 0 & 1 & 1 \\ 1 & 1 & 0 & 1 \\ 1 & 1 & 1 & 0 \end{bmatrix}\). (a) Find the characteristic polynomial, the real eigenvalues and their algebraic multiplicities. (b) Find a basis of \(\mathbb{R}^4\) of eigenvectors. (c) Find an orthonormal eigenbasis. (d) Compute \(A^7\) by diagonalizing.
Solution
(a) \(A = J - I\) where \(J\) is the all-ones matrix. \(J\) has rank one with \(J\mathbf{1} = 4\cdot\mathbf{1}\), so its eigenvalues are \(4, 0, 0, 0\); subtracting \(I\) shifts them to
\[\lambda = 3 \ (\text{once})\] \[\lambda = -1 \ (\text{three times})\] \[f_A(X) = (X - 3)(X + 1)^3.\]Check: trace \(= 3 - 3 = 0 = \operatorname{tr}A\); product \(3(-1)^3 = -3 = \det A\).
(b) \(E_3\): \((A - 3I)\mathbf{v} = \mathbf{0}\) gives \(\mathbf{v}_1 = (1, 1, 1, 1)\). \(E_{-1}\): \(A + I = J\), so the condition is \(x_1 + x_2 + x_3 + x_4 = 0\), a three-dimensional space with basis
\[\mathbf{v}_2 = (1, -1, 0, 0),\quad \mathbf{v}_3 = (1, 0, -1, 0),\quad \mathbf{v}_4 = (1, 0, 0, -1).\]Geometric multiplicity 3 equals algebraic multiplicity 3, so these four vectors form an eigenbasis.
(c) \(\mathbf{v}_1\) is already orthogonal to \(E_{-1}\). Gram–Schmidt inside \(E_{-1}\): \(\mathbf{w}_2 = (1, -1, 0, 0)\); \(\mathbf{w}_3 = \mathbf{v}_3 - \tfrac{\mathbf{v}_3\cdot\mathbf{w}_2}{\mathbf{w}_2\cdot\mathbf{w}_2}\mathbf{w}_2 = \mathbf{v}_3 - \tfrac12\mathbf{w}_2 = (\tfrac12, \tfrac12, -1, 0) \propto (1, 1, -2, 0)\) (using \(\mathbf{v}_3\cdot\mathbf{w}_2 = 1\), \(\mathbf{w}_2\cdot\mathbf{w}_2 = 2\)); \(\mathbf{w}_4 = \mathbf{v}_4 - \tfrac12\mathbf{w}_2 - \tfrac16(1, 1, -2, 0) = (\tfrac13, \tfrac13, \tfrac13, -1) \propto (1, 1, 1, -3)\), the coefficients being \(\tfrac{\mathbf{v}_4\cdot\mathbf{w}_2}{2} = \tfrac12\) and \(\tfrac{\mathbf{v}_4\cdot(1, 1, -2, 0)}{6} = \tfrac16\). Normalizing:
\[\mathbf{q}_1 = \tfrac12(1, 1, 1, 1),\quad \mathbf{q}_2 = \tfrac{1}{\sqrt2}(1, -1, 0, 0),\quad \mathbf{q}_3 = \tfrac{1}{\sqrt6}(1, 1, -2, 0),\quad \mathbf{q}_4 = \tfrac{1}{\sqrt{12}}(1, 1, 1, -3).\](d) \(A = QDQ^T\) with \(D = \operatorname{diag}(3, -1, -1, -1)\), so \(A^7 = QD^7Q^T\) with \(D^7 = \operatorname{diag}(2187, -1, -1, -1)\). Using the projections, \(\mathbf{q}_1\mathbf{q}_1^T = \tfrac14J\) and the rest sum to \(I - \tfrac14J\):
\[A^7 = 2187\cdot\tfrac14J - (I - \tfrac14J) = \tfrac{2188}{4}J - I = 547J - I\]the matrix with \(546\) on the diagonal and \(547\) everywhere else. Check with \(k = 1\): \(3\cdot\tfrac14J - I + \tfrac14J = J - I = A\).
(a) \((X-3)(X+1)^3\): \(\lambda = 3\) (mult. 1), \(-1\) (mult. 3); (b) \((1,1,1,1)\) and a basis of \(x_1 + x_2 + x_3 + x_4 = 0\); (c) as displayed; (d) \(A^7 = 547J - I\).
Review: · ·
19(a) For the matrix \(A = J - I\) of the previous problem (ones off the diagonal, zeros on it), decide which apply: projection, reflection, orthogonal, invertible, symmetric, diagonalizable. (b) Which statements hold for every non-invertible \(2\times 2\) matrix \(A\)? The trace is zero; the determinant is zero; the trace is an eigenvalue; the determinant is an eigenvalue; the two columns are parallel; the two rows are parallel.
Solution
(a) Eigenvalues \(3, -1, -1, -1\).
- Projection no: a projection has eigenvalues 0 and 1 only (\(A^2 = J^2 - 2J + I = 2J + I \ne A\)).
- Reflection no: eigenvalues would be \(\pm 1\) and \(A^2 = I\), but \(A^2 = 2J + I\).
- Orthogonal no: the columns have length \(\sqrt3\), not 1 (and an eigenvalue 3 is impossible for an orthogonal matrix).
- Invertible yes: \(\det A = -3 \ne 0\); no eigenvalue is 0.
- Symmetric yes: \(A^T = A\).
- Diagonalizable yes: every symmetric matrix is.
(b) Non-invertible means \(\det A = 0\), and the eigenvalues satisfy \(\lambda_1\lambda_2 = 0\), \(\lambda_1 + \lambda_2 = \operatorname{tr}A\), so the eigenvalues are \(0\) and \(\operatorname{tr}A\).
- Trace zero false: \(\begin{bmatrix} 1 & 0 \\ 0 & 0 \end{bmatrix}\) has trace 1.
- Determinant zero true (definition of singular).
- Trace is an eigenvalue true (shown above).
- Determinant is an eigenvalue true: \(\det A = 0\) is an eigenvalue.
- Columns parallel true: rank \(\le 1\) means one column is a multiple of the other (or one is zero).
- Rows parallel true, for the same reason applied to \(A^T\).
(a) invertible, symmetric, diagonalizable only; (b) all true except the trace is zero.
Review: ·
20Which of the following are diagonalizable over the reals? \(A = \begin{bmatrix} 0 & 1 & 0 & 0 & 0 \\ 0 & 0 & 1 & 0 & 0 \\ 0 & 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 0 & 1 \\ 1 & 0 & 0 & 0 & 0 \end{bmatrix}\), \(B = \begin{bmatrix} 0 & 1 & 0 & 0 & 1 \\ 1 & 0 & 1 & 0 & 0 \\ 0 & 1 & 0 & 1 & 0 \\ 0 & 0 & 1 & 0 & 1 \\ 1 & 0 & 0 & 1 & 0 \end{bmatrix}\), \(C = \begin{bmatrix} 0 & 1 & 1 & 0 & 0 \\ 0 & 0 & 1 & 1 & 0 \\ 0 & 0 & 0 & 1 & 1 \\ 0 & 0 & 0 & 0 & 1 \\ 0 & 0 & 0 & 0 & 0 \end{bmatrix}\).
Solution
\(A\): no. \(A\) cyclically permutes the five coordinates, so \(A^5 = I\) and every eigenvalue satisfies \(\lambda^5 = 1\). The characteristic polynomial is \(\lambda^5 - 1\), whose only real root is \(\lambda = 1\); the other four eigenvalues are complex fifth roots of unity. A real diagonalization would need five real eigenvalues, so \(A\) is not diagonalizable over \(\mathbb{R}\) (it is over \(\mathbb{C}\)).
\(B\): yes. \(B\) is symmetric (it is the adjacency matrix of a 5-cycle), and every real symmetric matrix is orthogonally diagonalizable by the spectral theorem. (Its eigenvalues are \(2\cos(2\pi k/5)\), all real.)
\(C\): no. \(C\) is strictly upper triangular, hence nilpotent (\(C^5 = 0\)) with \(0\) as its only eigenvalue, of algebraic multiplicity 5. If it were diagonalizable it would equal \(P\,0\,P^{-1} = 0\), but \(C \ne 0\). Equivalently \(\dim\ker C = 5 - \operatorname{rank}C = 5 - 4 = 1 \lt 5\).
Only \(B\) is diagonalizable over \(\mathbb{R}\).
Review:
21Let \(\vec{x} = (v, e, f)\) count the vertices, edges and faces of a polyhedron. Under barycentric refinement, \(\vec{x} \mapsto A\vec{x}\) with \(A = \begin{bmatrix} 1 & 1 & 1 \\ 0 & 2 & 6 \\ 0 & 0 & 6 \end{bmatrix}\). (a) Verify that \(\vec{v}_1 = (1, 0, 0)\), \(\vec{v}_2 = (1, 1, 0)\), \(\vec{v}_3 = (1, 3, 2)\) are eigenvectors and find their eigenvalues. (b) Write a closed form for \(\vec{x}(t)\) if \(\vec{x}(0) = (7, 12, 6)\).
Solution
(a) Multiply:
\[A\vec{v}_1 = (1, 0, 0) = 1\cdot\vec{v}_1\] \[A\vec{v}_2 = (1 + 1, 2, 0) = (2, 2, 0) = 2\vec{v}_2\] \[A\vec{v}_3 = (1 + 3 + 2,\ 6 + 12,\ 12) = (6, 18, 12) = 6\vec{v}_3.\]Eigenvalues \(1, 2, 6\), which are also the diagonal entries of the triangular matrix \(A\).
(b) Write \(\vec{x}(0) = c_1\vec{v}_1 + c_2\vec{v}_2 + c_3\vec{v}_3\): third coordinate \(2c_3 = 6 \Rightarrow c_3 = 3\); second \(c_2 + 3c_3 = 12 \Rightarrow c_2 = 3\); first \(c_1 + c_2 + c_3 = 7 \Rightarrow c_1 = 1\). Then
\[\vec{x}(t) = A^t\vec{x}(0) = 1\cdot 1^t\begin{bmatrix} 1 \\ 0 \\ 0 \end{bmatrix} + 3\cdot 2^t\begin{bmatrix} 1 \\ 1 \\ 0 \end{bmatrix} + 3\cdot 6^t\begin{bmatrix} 1 \\ 3 \\ 2 \end{bmatrix} = \begin{bmatrix} 1 + 3\cdot 2^t + 3\cdot 6^t \\ 3\cdot 2^t + 9\cdot 6^t \\ 6\cdot 6^t \end{bmatrix}.\]Check \(t = 0\): \((1 + 3 + 3,\ 3 + 9,\ 6) = (7, 12, 6)\). For the hexagonal disc in the picture, \(v - e + f = 1 + 3\cdot 2^t + 3\cdot 6^t - 3\cdot 2^t - 9\cdot 6^t + 6\cdot 6^t = 1\) for every \(t\): the Euler characteristic is preserved.
(a) eigenvalues \(1, 2, 6\); (b) \(\vec{x}(t) = \vec{v}_1 + 3\cdot 2^t\vec{v}_2 + 3\cdot 6^t\vec{v}_3\).
Review:
22The Arnold cat map is \(T\vec{v} = A\vec{v}\) with \(A = \begin{bmatrix} 2 & 1 \\ 1 & 1 \end{bmatrix}\). (a) Characteristic polynomial. (b) Eigenvalues and eigenvectors. (c) Is the discrete dynamical system \(\vec{x}(t+1) = A\vec{x}(t)\) asymptotically stable? (d) Find an orthogonal \(S\) and diagonal \(B\) with \(B = S^{-1}AS\). (e) A picture is transformed by \(T\); describe the result.
Solution
(a) \(\operatorname{tr}A = 3\), \(\det A = 1\): \(p(\lambda) = \lambda^2 - 3\lambda + 1\).
(b) \(\lambda = \dfrac{3 \pm \sqrt5}{2}\), i.e. \(\lambda_1 \approx 2.618\) and \(\lambda_2 \approx 0.382\) (note \(\lambda_1\lambda_2 = 1\)). For an eigenvector, the first row of \(A - \lambda I\) gives \((2 - \lambda)v_1 + v_2 = 0\), so \(\vec{v} = (1, \lambda - 2)\):
\[\vec{v}_1 = \begin{bmatrix} 1 \\ \tfrac{-1 + \sqrt5}{2} \end{bmatrix} \approx \begin{bmatrix} 1 \\ 0.618 \end{bmatrix}\] \[\vec{v}_2 = \begin{bmatrix} 1 \\ \tfrac{-1 - \sqrt5}{2} \end{bmatrix} \approx \begin{bmatrix} 1 \\ -1.618 \end{bmatrix}.\](c) No. Asymptotic stability needs \(|\lambda| \lt 1\) for both eigenvalues, but \(\lambda_1 \gt 1\): vectors with a component along \(\vec{v}_1\) grow by a factor \(2.618\) each step while the \(\vec{v}_2\) component shrinks by the same factor. Stretching in one direction and squeezing in the other is what makes the map chaotic.
(d) \(A\) is symmetric, so the eigenvectors are orthogonal (\(\vec{v}_1\cdot\vec{v}_2 = 1 + \tfrac{(-1)^2 - 5}{4} = 1 - 1 = 0\)). Normalize them into the columns of \(S\):
\[S = \begin{bmatrix} \dfrac{\vec{v}_1}{\|\vec{v}_1\|} & \dfrac{\vec{v}_2}{\|\vec{v}_2\|} \end{bmatrix}\] \[B = S^{-1}AS = S^TAS = \begin{bmatrix} \tfrac{3 + \sqrt5}{2} & 0 \\ 0 & \tfrac{3 - \sqrt5}{2} \end{bmatrix}\]with \(\|\vec{v}_1\|^2 = 1 + \tfrac{3 - \sqrt5}{2}\) and \(\|\vec{v}_2\|^2 = 1 + \tfrac{3 + \sqrt5}{2}\).
(e) The picture is stretched by a factor of about \(2.6\) along the direction \((1, 0.618)\) (a line of slope about \(0.62\) through the origin) and compressed by the same factor along the perpendicular direction, with the area unchanged since \(\det A = 1\). The transformed image is a long thin diagonal smear leaning up to the right, not a rotation or a reflection.
(a) \(\lambda^2 - 3\lambda + 1\); (b) \(\lambda = \tfrac{3 \pm \sqrt5}{2}\), eigenvectors \((1, \lambda - 2)\); (c) not stable; (d) \(S\) = normalized eigenvectors, \(B = \operatorname{diag}(\lambda_1, \lambda_2)\); (e) stretched along slope \(0.618\), squeezed across it.
Review: · ·
23True or false, with a reason. (a) If \(A\) and \(B\) are orthogonal, so is \(A + B\). (b) Every real \(2\times 2\) matrix has a real eigenvalue. (c) A symmetric matrix with positive entries has positive eigenvalues. (d) A reflection matrix is invertible. (e) If \(A\) is symmetric with \(A^6 = I\), then \(A = I\). (f) If \(A, B\) are symmetric, \(A^2 - B^2\) is symmetric. (g) If \(A\) and \(B\) are diagonalizable, so is \(A + B\). (h) There are real \(2\times 2\) matrices with \(AB - BA = I\).
Solution
(a) False. \(I + I = 2I\) has columns of length 2.
(b) False. The rotation \(\begin{bmatrix} 0 & -1 \\ 1 & 0 \end{bmatrix}\) has \(\lambda^2 + 1 = 0\), eigenvalues \(\pm i\).
(c) False. \(\begin{bmatrix} 1 & 2 \\ 2 & 1 \end{bmatrix}\) has eigenvalues \(3\) and \(-1\) (real, as symmetry guarantees, but not positive).
(d) True. \(R^2 = I\), so \(R^{-1} = R\); its eigenvalues are \(\pm 1\), never 0.
(e) False. \(A = -I\) is symmetric with \(A^6 = I\); so is \(\operatorname{diag}(1, -1)\). Symmetric plus \(A^6 = I\) only forces the eigenvalues to be real sixth roots of unity, i.e. \(\pm 1\).
(f) True. \((A^2 - B^2)^T = (A^T)^2 - (B^T)^2 = A^2 - B^2\). (The product \(AB\) would not be symmetric in general.)
(g) False. \(A = \begin{bmatrix} 1 & 1 \\ 0 & 0 \end{bmatrix}\) (eigenvalues \(1, 0\), distinct) and \(B = \begin{bmatrix} 0 & 0 \\ 0 & 1 \end{bmatrix}\) (diagonal) are diagonalizable, but \(A + B = \begin{bmatrix} 1 & 1 \\ 0 & 1 \end{bmatrix}\) is the shear: \(\lambda = 1\) twice with a one-dimensional eigenspace.
(h) False. \(\operatorname{tr}(AB - BA) = \operatorname{tr}(AB) - \operatorname{tr}(BA) = 0\), but \(\operatorname{tr}I = 2\).
(a) F, (b) F, (c) F, (d) T, (e) F, (f) T, (g) F, (h) F.
Review: · ·
24Identify the curve \(5x^2 - 4xy + 8y^2 = 36\): find its principal axes and the lengths of its semi-axes. Is the quadratic form positive definite?
Solution
The matrix of the form is \(A = \begin{bmatrix} 5 & -2 \\ -2 & 8 \end{bmatrix}\) (half of \(-4\) in each off-diagonal slot). With \(\operatorname{tr}A = 13\) and \(\det A = 40 - 4 = 36\),
\[p(\lambda) = \lambda^2 - 13\lambda + 36 = (\lambda - 4)(\lambda - 9)\] \[\lambda = 4, 9.\]\(\lambda = 4\): \((5 - 4)v_1 - 2v_2 = 0\), eigenvector \((2, 1)\). \(\lambda = 9\): \(-4v_1 - 2v_2 = 0\), eigenvector \((1, -2)\). They are perpendicular, as they must be. With \(u, v\) the coordinates along the unit vectors \(\tfrac{1}{\sqrt5}(2, 1)\) and \(\tfrac{1}{\sqrt5}(1, -2)\),
\[5x^2 - 4xy + 8y^2 = 4u^2 + 9v^2\] \[4u^2 + 9v^2 = 36 \iff \frac{u^2}{9} + \frac{v^2}{4} = 1.\]An ellipse with semi-axis \(3\) along \((2, 1)\) and semi-axis \(2\) along \((1, -2)\). Both eigenvalues are positive, so the form is positive definite (also visible from the leading minors \(5 \gt 0\), \(\det A = 36 \gt 0\)).
Ellipse \(u^2/9 + v^2/4 = 1\), axes along \((2,1)\) (semi-axis 3) and \((1,-2)\) (semi-axis 2); positive definite.
Review:
25Classify each matrix as Hermitian, skew-Hermitian, unitary, or none, and find its eigenvalues: \(M_1 = \begin{bmatrix} 0 & -i \\ i & 0 \end{bmatrix}\), \(M_2 = \begin{bmatrix} i & 0 \\ 0 & -i \end{bmatrix}\), \(M_3 = \begin{bmatrix} 1 & i \\ i & 1 \end{bmatrix}\).
Solution
\(M_1\). Conjugate: \(\begin{bmatrix} 0 & i \\ -i & 0 \end{bmatrix}\); transpose: \(\begin{bmatrix} 0 & -i \\ i & 0 \end{bmatrix} = M_1\). Hermitian. Also \(M_1^*M_1 = M_1^2 = \begin{bmatrix} (-i)(i) & 0 \\ 0 & (i)(-i) \end{bmatrix} = I\), so unitary too. Eigenvalues: \(\lambda^2 - 1 = 0\), \(\lambda = \pm 1\) (real and on the unit circle, as both classes require).
\(M_2\). \(M_2^* = \begin{bmatrix} -i & 0 \\ 0 & i \end{bmatrix} = -M_2\): skew-Hermitian. \(M_2^*M_2 = \operatorname{diag}((-i)(i), (i)(-i)) = I\): unitary as well. Eigenvalues \(\pm i\), purely imaginary with modulus 1.
\(M_3\). \(M_3^* = \begin{bmatrix} 1 & -i \\ -i & 1 \end{bmatrix}\), which is neither \(M_3\) nor \(-M_3\); and \(M_3^*M_3 = \begin{bmatrix} 2 & 0 \\ 0 & 2 \end{bmatrix} \ne I\). None of the three (it is complex symmetric, which guarantees nothing). Eigenvalues: \((1 - \lambda)^2 - i^2 = (1 - \lambda)^2 + 1 = 0\), so \(\lambda = 1 \pm i\), not real: symmetry without conjugation does not give real eigenvalues.
\(M_1\): Hermitian and unitary, \(\lambda = \pm 1\); \(M_2\): skew-Hermitian and unitary, \(\lambda = \pm i\); \(M_3\): none, \(\lambda = 1 \pm i\).
Review:
26Each month 20% of subscribers of plan A switch to plan B and 30% of plan B switch to A. (a) Write the transition matrix and find its eigenvalues and eigenvectors. (b) Find the steady state. (c) If everyone starts on plan A, find the fraction on plan A after \(t\) months.
Solution
(a) With \(\mathbf{x} = (\text{A}, \text{B})\) as fractions,
\[M = \begin{bmatrix} 0.8 & 0.3 \\ 0.2 & 0.7 \end{bmatrix}\] \[p(\lambda) = \lambda^2 - 1.5\lambda + 0.5 = (\lambda - 1)(\lambda - 0.5).\]\(\lambda = 1\): \(-0.2v_1 + 0.3v_2 = 0\), eigenvector \((3, 2)\). \(\lambda = 0.5\): \(0.3v_1 + 0.3v_2 = 0\), eigenvector \((1, -1)\).
(b) Scale the \(\lambda = 1\) eigenvector to sum to 1: steady state \((0.6, 0.4)\). Check: \(0.8(0.6) + 0.3(0.4) = 0.6\).
(c) \(\mathbf{x}(0) = (1, 0) = c_1(3, 2) + c_2(1, -1)\): \(2c_1 - c_2 = 0\) and \(3c_1 + c_2 = 1\): the first gives \(c_2 = 2c_1\), so the second reads \(5c_1 = 1\), giving \(c_1 = 0.2\), \(c_2 = 0.4\). Hence
\[\mathbf{x}(t) = 0.2\begin{bmatrix} 3 \\ 2 \end{bmatrix} + 0.4(0.5)^t\begin{bmatrix} 1 \\ -1 \end{bmatrix}\] \[\text{fraction on A} = 0.6 + 0.4(0.5)^t.\]Check \(t = 1\): \(0.6 + 0.2 = 0.8\), which is indeed the fraction staying on A after one month. The deviation from the steady state halves every month.
(a) \(\lambda = 1\) with \((3,2)\), \(\lambda = 0.5\) with \((1,-1)\); (b) \((0.6, 0.4)\); (c) \(0.6 + 0.4(0.5)^t\).
Review: ·
Set 4: transformations, inner products and least squares
Linear Algebra · Exam-style problems 27 to 34
Problems 27 to 34
These problems are modelled on final exams for a first linear algebra course. Every problem opens to a full, step-by-step solution with the final answer highlighted. Try it on paper first. The Review link at the end of each solution jumps back to the tab that teaches the idea.
27Which maps \(T : \mathbb{R}^2 \to \mathbb{R}^2\) are linear? (a) \(T(x_1, x_2) = (x_1x_2,\ x_1 + x_2)\). (b) \(T(x_1, x_2) = (x_1 + x_2,\ x_1 - x_2)\). For the linear one, give its matrix, kernel and range.
Solution
(a) Not linear. \(T(1, 1) = (1, 2)\) but \(T(2, 2) = (4, 4) \ne 2T(1, 1) = (2, 4)\). The product \(x_1x_2\) is quadratic, so homogeneity fails (so does additivity: \(T(1, 0) + T(0, 1) = (0, 1) + (0, 1) = (0, 2)\) while \(T(1, 1) = (1, 2)\)).
(b) Linear. Each output coordinate is a linear combination of the inputs, so \(T(\mathbf{x}) = A\mathbf{x}\) with
\[A = \big[T(\mathbf{e}_1)\ \ T(\mathbf{e}_2)\big] = \begin{bmatrix} 1 & 1 \\ 1 & -1 \end{bmatrix}\]and matrix multiplication is automatically additive and homogeneous. \(\det A = -2 \ne 0\), so \(A\) is invertible: \(\ker T = \{\mathbf{0}\}\) (one-to-one) and the range is all of \(\mathbb{R}^2\) (onto). Rank–nullity: \(0 + 2 = 2\). Geometrically \(T\) is a rotation by \(-45^\circ\) followed by scaling by \(\sqrt2\) and a reflection; \(A/\sqrt2\) is orthogonal.
(a) not linear; (b) linear, \(A = \begin{bmatrix} 1 & 1 \\ 1 & -1 \end{bmatrix}\), kernel \(\{\mathbf{0}\}\), range \(\mathbb{R}^2\).
Review: ·
28Let \(X\) be the space of smooth \(2\pi\)-periodic functions, with Fourier coefficients \(a_n(f), b_n(f)\) and norm \(\|f\|\). Decide linear or not: (a) the set \(\{f \in X : f(1) = b_1(f)\}\); (b) the set \(\{f \in X : f'(1) = 0\}\); (c) the map \(Tf = a_1(f)\,f\); (d) the map \(Tf = \|f\|\sin x\).
Solution
(a) Linear subspace. Both \(f \mapsto f(1)\) and \(f \mapsto b_1(f) = \tfrac1\pi\int_{-\pi}^{\pi} f(x)\sin x\,dx\) are linear functionals, so the condition \(f(1) - b_1(f) = 0\) is the kernel of a linear map: closed under sums and scalar multiples.
(b) Linear subspace. \(f \mapsto f'(1)\) is linear (differentiate, then evaluate), and the set is its kernel.
(c) Not linear. \(T(2f) = a_1(2f)\cdot 2f = 4a_1(f)f = 4Tf \ne 2Tf\) whenever \(Tf \ne 0\). The output is quadratic in \(f\).
(d) Not linear. \(T(-f) = \|-f\|\sin x = \|f\|\sin x = Tf\), but linearity would require \(T(-f) = -Tf\). (Also \(\|f + g\| \ne \|f\| + \|g\|\) in general.)
(a) linear, (b) linear, (c) not linear, (d) not linear.
Review: ·
29Find the matrix of the reflection of \(\mathbb{R}^2\) across the line \(y = 2x\). Verify that it is symmetric and orthogonal, and find its eigenvalues and eigenvectors.
Solution
A unit vector along the line is \(\mathbf{u} = \tfrac{1}{\sqrt5}(1, 2)\). Projection onto the line is \(P = \mathbf{u}\mathbf{u}^T = \tfrac15\begin{bmatrix} 1 & 2 \\ 2 & 4 \end{bmatrix}\), and reflection is \(R = 2P - I\):
\[R = \frac25\begin{bmatrix} 1 & 2 \\ 2 & 4 \end{bmatrix} - \begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix} = \frac15\begin{bmatrix} -3 & 4 \\ 4 & 3 \end{bmatrix}.\]\(R^T = R\) (symmetric). \(R^TR = R^2 = \tfrac1{25}\begin{bmatrix} 9 + 16 & -12 + 12 \\ -12 + 12 & 16 + 9 \end{bmatrix} = I\) (orthogonal), and \(\det R = \tfrac{-9 - 16}{25} = -1\), as for every reflection.
Eigenvalues: \(\operatorname{tr}R = 0\), \(\det R = -1\), so \(\lambda^2 - 1 = 0\), \(\lambda = \pm 1\). \(\lambda = 1\): \(R(1, 2) = \tfrac15(-3 + 8, 4 + 6) = (1, 2)\), the line itself is fixed. \(\lambda = -1\): \(R(2, -1) = \tfrac15(-6 - 4, 8 - 3) = (-2, 1)\), the perpendicular direction is flipped. Check with the formula \(\begin{bmatrix} \cos2\theta & \sin2\theta \\ \sin2\theta & -\cos2\theta \end{bmatrix}\) for \(\tan\theta = 2\): \(\cos2\theta = \tfrac{1 - 4}{1 + 4} = -\tfrac35\), \(\sin2\theta = \tfrac{2\cdot 2}{5} = \tfrac45\).
\(R = \tfrac15\begin{bmatrix} -3 & 4 \\ 4 & 3 \end{bmatrix}\); eigenvalue \(1\) on \((1,2)\), eigenvalue \(-1\) on \((2,-1)\).
Review: ·
30Let \(v_1 = (1, 0, 0, 1)\), \(v_2 = (1, -1, 1, 1)\), \(v_3 = (1, 0, 1, -1)\). (a) Show that \(v_1, v_2, v_3\) are linearly independent in \(\mathbb{R}^4\). (b) Construct an orthonormal basis of \(V = \operatorname{span}(v_1, v_2, v_3)\).
Solution
(a) \(c_1v_1 + c_2v_2 + c_3v_3 = \mathbf{0}\): the second coordinate gives \(-c_2 = 0\); the third then gives \(c_3 = 0\); the first gives \(c_1 = 0\). Independent.
(b) Gram–Schmidt. \(w_1 = v_1 = (1, 0, 0, 1)\), \(\|w_1\|^2 = 2\).
\[w_2 = v_2 - \frac{v_2\cdot w_1}{w_1\cdot w_1}w_1 = (1, -1, 1, 1) - \frac22(1, 0, 0, 1) = (0, -1, 1, 0)\] \[\|w_2\|^2 = 2.\] \[w_3 = v_3 - \frac{v_3\cdot w_1}{2}w_1 - \frac{v_3\cdot w_2}{2}w_2 = (1, 0, 1, -1) - \frac{0}{2}w_1 - \frac{1}{2}(0, -1, 1, 0) = \left(1, \tfrac12, \tfrac12, -1\right)\]since \(v_3\cdot w_1 = 1 - 1 = 0\) and \(v_3\cdot w_2 = 0 + 0 + 1 + 0 = 1\). Check \(w_3\cdot w_1 = 1 - 1 = 0\) and \(w_3\cdot w_2 = -\tfrac12 + \tfrac12 = 0\). With \(\|w_3\|^2 = 1 + \tfrac14 + \tfrac14 + 1 = \tfrac52\),
\[q_1 = \tfrac{1}{\sqrt2}(1, 0, 0, 1)\] \[q_2 = \tfrac{1}{\sqrt2}(0, -1, 1, 0)\] \[q_3 = \tfrac{1}{\sqrt{10}}(2, 1, 1, -2).\]Orthonormal basis \(\tfrac{1}{\sqrt2}(1,0,0,1),\ \tfrac{1}{\sqrt2}(0,-1,1,0),\ \tfrac{1}{\sqrt{10}}(2,1,1,-2)\).
Review: ·
31On \(C([-2, 2])\) use the inner product \({\langle f, g\rangle} = \int_{-2}^{2} f(t)g(t)\,dt\). (a) Compute \(\|f\|\) for \(f(t) = t\). (b) Find an orthonormal basis of the subspace \(P_1\) of polynomials of degree at most 1. (c) Compute the projection of \(g(t) = t^3\) onto \(P_1\).
Solution
(a) \(\|t\|^2 = \int_{-2}^{2} t^2\,dt = \tfrac{2^3 - (-2)^3}{3} = \tfrac{16}{3}\), so \(\|t\| = \tfrac{4}{\sqrt3}\).
(b) Start from \(1, t\). They are already orthogonal: \({\langle 1, t\rangle} = \int_{-2}^{2} t\,dt = 0\) (odd integrand). Normalize: \(\|1\|^2 = \int_{-2}^{2} 1\,dt = 4\), so
\[e_1 = \frac12\] \[e_2 = \frac{t}{4/\sqrt3} = \frac{\sqrt3}{4}\,t.\](c) \(\operatorname{proj}_{P_1}g = {\langle g, e_1\rangle} e_1 + {\langle g, e_2\rangle} e_2\). The first term vanishes because \(t^3\) is odd. For the second, \({\langle t^3, t\rangle} = \int_{-2}^{2} t^4\,dt = \tfrac{2\cdot 32}{5} = \tfrac{64}{5}\), so
\[\operatorname{proj}_{P_1}(t^3) = \frac{{\langle t^3, t\rangle}}{{\langle t, t\rangle}}\,t = \frac{64/5}{16/3}\,t = \frac{12}{5}\,t.\]The line \(y = \tfrac{12}{5}t\) is the best straight-line approximation to \(t^3\) on \([-2, 2]\) in the mean-square sense: it passes through the origin, lies above the cubic for \(0 \lt t \lt \sqrt{12/5} \approx 1.55\) and below it from there to \(t = 2\), where the cubic reaches 8 and the line only \(4.8\).
(a) \(4/\sqrt3\); (b) \(\{\tfrac12, \tfrac{\sqrt3}{4}t\}\); (c) \(\tfrac{12}{5}t\).
Review: ·
32Find all least squares solutions of \(X + Y + 2Z = 2,\ 2X + 2Y + 3Z = 1,\ 3X + 3Y + 4Z = 3\).
Solution
\(A = \begin{bmatrix} 1 & 1 & 2 \\ 2 & 2 & 3 \\ 3 & 3 & 4 \end{bmatrix}\), \(\mathbf{b} = (2, 1, 3)\). The first two columns are equal, so \(A^TA\) will be singular and there will be infinitely many least squares solutions.
\[A^TA = \begin{bmatrix} 14 & 14 & 20 \\ 14 & 14 & 20 \\ 20 & 20 & 29 \end{bmatrix}\] \[A^T\mathbf{b} = \begin{bmatrix} 2 + 2 + 9 \\ 2 + 2 + 9 \\ 4 + 3 + 12 \end{bmatrix} = \begin{bmatrix} 13 \\ 13 \\ 19 \end{bmatrix}.\]The first two normal equations are identical (equal columns of \(A\) give equal rows of \(A^TA\)), so there are really two equations in the two unknowns \(Z\) and \(s = X + Y\): \(14s + 20Z = 13\) and \(20s + 29Z = 19\). The determinant is \(14\cdot 29 - 20\cdot 20 = 406 - 400 = 6\), so
\[s = \frac{13\cdot 29 - 20\cdot 19}{6} = \frac{377 - 380}{6} = -\frac12\] \[Z = \frac{14\cdot 19 - 20\cdot 13}{6} = \frac{266 - 260}{6} = 1.\] \[\text{All least squares solutions: } (X, Y, Z) = \left(-\tfrac12 - t,\ t,\ 1\right),\quad t \in \mathbb{R}.\]They all give the same projection \(A\hat{\mathbf{x}} = (s + 2Z, 2s + 3Z, 3s + 4Z) = (\tfrac32, 2, \tfrac52)\), with residual \(\mathbf{b} - A\hat{\mathbf{x}} = (\tfrac12, -1, \tfrac12)\). Check orthogonality to the columns: \((1, 2, 3)\cdot(\tfrac12, -1, \tfrac12) = \tfrac12 - 2 + \tfrac32 = 0\) and \((2, 3, 4)\cdot(\tfrac12, -1, \tfrac12) = 1 - 3 + 2 = 0\).
\((X, Y, Z) = (-\tfrac12 - t,\ t,\ 1)\) for all real \(t\); projection \((\tfrac32, 2, \tfrac52)\).
Review:
33Using least squares, find \(a\) and \(b\) such that \(\dfrac{ax}{3y} - b = 2\) best fits the data points \((x, y) = (9, 3), (6, 1), (-3, 1), (0, 1)\).
Solution
The model is linear in the unknowns \(a, b\): for each point, \(a\cdot\dfrac{x}{3y} - b = 2\). The values of \(\dfrac{x}{3y}\) are \(1, 2, -1, 0\), giving the system
\[\begin{bmatrix} 1 & -1 \\ 2 & -1 \\ -1 & -1 \\ 0 & -1 \end{bmatrix}\begin{bmatrix} a \\ b \end{bmatrix} = \begin{bmatrix} 2 \\ 2 \\ 2 \\ 2 \end{bmatrix}.\] \[A^TA = \begin{bmatrix} 1 + 4 + 1 + 0 & -1 - 2 + 1 + 0 \\ -2 & 4 \end{bmatrix} = \begin{bmatrix} 6 & -2 \\ -2 & 4 \end{bmatrix}\] \[A^T\mathbf{b} = \begin{bmatrix} 2 + 4 - 2 + 0 \\ -8 \end{bmatrix} = \begin{bmatrix} 4 \\ -8 \end{bmatrix}.\]\(6a - 2b = 4\) and \(-2a + 4b = -8\). From the second, \(a = 2b + 4\); substituting, \(12b + 24 - 2b = 4\), so \(b = -2\) and \(a = 0\).
The best fit is \(a = 0\), \(b = -2\): the data are explained by the constant \(-b = 2\) with no dependence on \(x/(3y)\) at all. Residual: \(A\hat{\mathbf{x}} = (2, 2, 2, 2) = \mathbf{b}\), so the fit is exact (the system was consistent all along).
\(a = 0\), \(b = -2\) (an exact fit).
Review:
34Find the distance from the point \(P = (1, 2, 3)\) to the plane \(x + 2y + 2z = 3\), and the foot of the perpendicular from \(P\) to the plane.
Solution
The normal vector is \(\mathbf{n} = (1, 2, 2)\) with \(\|\mathbf{n}\| = 3\). The distance is
\[d = \frac{|1 + 2(2) + 2(3) - 3|}{3} = \frac{|11 - 3|}{3} = \frac83.\]The foot \(Q\) is \(P\) moved back along \(\mathbf{n}\) by the signed distance: \(P\) lies on the side where \(x + 2y + 2z \gt 3\), so
\[Q = P - \frac{8}{3}\cdot\frac{\mathbf{n}}{\|\mathbf{n}\|} = (1, 2, 3) - \frac89(1, 2, 2) = \left(\frac19, \frac29, \frac{11}{9}\right).\]Check: \(\tfrac19 + \tfrac49 + \tfrac{22}{9} = \tfrac{27}{9} = 3\), so \(Q\) is on the plane, and \(P - Q = \tfrac89(1, 2, 2)\) is parallel to \(\mathbf{n}\) with length \(\tfrac89\cdot 3 = \tfrac83\).
Distance \(\tfrac83\); foot of the perpendicular \((\tfrac19, \tfrac29, \tfrac{11}{9})\).
Review:
Challenge 1: systems, matrix algebra and determinants
Linear Algebra · Challenge problems 35 to 54
Problems 35 to 54
One hundred harder problems, still within the scope of a first linear algebra course: proofs, parameters, multi-step computations and applications. Each opens to a complete solution with every step shown and the final answer highlighted. Expect to need pencil and paper, and use the Review links to go back to the relevant tab.
35For which values of \(k\) does the system \(x + y + kz = 1,\ x + ky + z = 1,\ kx + y + z = 1\) have no solution, exactly one solution, or infinitely many? Find the solution when it is unique.
Solution
The coefficient matrix is \(A = \begin{bmatrix} 1 & 1 & k \\ 1 & k & 1 \\ k & 1 & 1 \end{bmatrix}\). Expanding along the first row, with minors \(k\cdot 1 - 1\cdot 1\), \(1\cdot 1 - 1\cdot k\) and \(1\cdot 1 - k\cdot k\),
\[\det A = 1(k - 1) - 1(1 - k) + k(1 - k^2) = 2(k - 1) - k(k - 1)(k + 1) = (k - 1)\big(2 - k^2 - k\big) = -(k - 1)^2(k + 2).\]Unique solution iff \(\det A \ne 0\), i.e. \(k \ne 1\) and \(k \ne -2\). The system is symmetric under any permutation of \(x, y, z\), so the unique solution has \(x = y = z\); then \((k + 2)x = 1\) and
\[x = y = z = \frac{1}{k + 2}.\]\(k = 1\): all three equations read \(x + y + z = 1\); rank 1, infinitely many solutions (a plane), \((1 - s - t, s, t)\).
\(k = -2\): adding the three equations gives \((1 + 1 - 2)(x + y + z) = 3\), i.e. \(0 = 3\): no solution. (The coefficient matrix has rank 2 while the augmented matrix has rank 3.)
Unique iff \(k \ne 1, -2\), with \(x = y = z = 1/(k+2)\); \(k = 1\): infinitely many; \(k = -2\): none.
Review: ·
36Find all real \(2\times 2\) matrices \(X\) with \(X^2 = I\).
Solution
If \(X^2 = I\) then every eigenvalue satisfies \(\lambda^2 = 1\), so \(\lambda = \pm1\). Also \((X - I)(X + I) = 0\).
Case 1: both eigenvalues equal. If \(\lambda = 1\) twice, write \(X = I + N\) with \(N\) nilpotent (\(N^2 = 0\) for \(2\times 2\)); then \(X^2 = I + 2N = I\) forces \(N = 0\), so \(X = I\). Similarly \(\lambda = -1\) twice gives \(X = -I\).
Case 2: eigenvalues \(1\) and \(-1\). Then \(\operatorname{tr}X = 0\) and \(\det X = -1\), so
\[X = \begin{bmatrix} a & b \\ c & -a \end{bmatrix} \quad\text{with}\quad -a^2 - bc = -1, \text{ i.e. } a^2 + bc = 1.\]Conversely any such \(X\) has \(X^2 = (a^2 + bc)I = I\) by direct multiplication (or by Cayley–Hamilton: \(X^2 - (\operatorname{tr}X)X + (\det X)I = 0\) gives \(X^2 = I\)).
So the solutions are \(\pm I\) together with the two-parameter family \(\begin{bmatrix} a & b \\ c & -a \end{bmatrix}\), \(a^2 + bc = 1\): every reflection of the plane (e.g. \(\begin{bmatrix} 0 & 1 \\ 1 & 0 \end{bmatrix}\), \(\begin{bmatrix} 1 & 0 \\ 0 & -1 \end{bmatrix}\)) and also non-orthogonal "oblique reflections" such as \(\begin{bmatrix} 1 & 1 \\ 0 & -1 \end{bmatrix}\).
\(X = \pm I\) or \(X = \begin{bmatrix} a & b \\ c & -a \end{bmatrix}\) with \(a^2 + bc = 1\).
Review: ·
37Let \(A\) be an \(n\times n\) matrix with \(A^2 = A\) (idempotent). Prove that either \(A = I\) or \(A\) is singular. Give a \(2\times 2\) example of each kind, and find the possible values of \(\det A\).
Solution
Suppose \(A\) is invertible. Multiply \(A^2 = A\) on the left by \(A^{-1}\): \(A = I\). So an idempotent matrix other than \(I\) cannot be invertible.
Alternatively with determinants: \(\det(A^2) = (\det A)^2 = \det A\), so \(\det A(\det A - 1) = 0\) and \(\det A \in \{0, 1\}\). If \(\det A = 1\) the matrix is invertible and the first argument gives \(A = I\); otherwise \(\det A = 0\).
Examples: \(A = I\) (invertible), and the projection \(A = \begin{bmatrix} 1 & 0 \\ 0 & 0 \end{bmatrix}\) or \(A = \tfrac12\begin{bmatrix} 1 & 1 \\ 1 & 1 \end{bmatrix}\) (singular; both satisfy \(A^2 = A\)). Every idempotent matrix is a projection onto its column space along its null space, and \(\operatorname{rank}A = \operatorname{tr}A\) because its eigenvalues are only 0 and 1.
\(A\) invertible \(\Rightarrow A = A^{-1}A^2 = I\); otherwise singular. \(\det A \in \{0, 1\}\).
Review: ·
38Let \(M_n(a, b)\) be the \(n\times n\) matrix with \(a\) on the diagonal and \(b\) in every other position. Show that \(\det M_n(a, b) = (a - b)^{n-1}\big(a + (n - 1)b\big)\), and evaluate \(\det M_4(3, 1)\).
Solution
Write \(M = (a - b)I + bJ\), where \(J\) is the all-ones matrix. \(J\) has rank one, \(J\mathbf{1} = n\mathbf{1}\), so its eigenvalues are \(n\) (once) and \(0\) (\(n - 1\) times). Adding \((a - b)I\) shifts every eigenvalue by \(a - b\):
\[\lambda = a - b + nb = a + (n - 1)b \ (\text{once})\] \[\lambda = a - b \ (n - 1 \text{ times}).\]The determinant is the product of the eigenvalues:
\[\det M_n(a, b) = (a - b)^{n-1}\big(a + (n - 1)b\big).\](Row-reduction proof: subtract row 1 from every other row, then add columns \(2, \dots, n\) to column 1; the result is triangular with diagonal \(a + (n-1)b, a - b, \dots, a - b\).)
For \(n = 4\), \(a = 3\), \(b = 1\): \(\det = 2^3(3 + 3) = 48\). Check the inverse exists iff \(a \ne b\) and \(a \ne -(n - 1)b\).
\(\det M_n(a,b) = (a - b)^{n-1}(a + (n-1)b)\); \(\det M_4(3, 1) = 48\).
Review: ·
39Show that \(\det\begin{bmatrix} 1 & 1 & 1 \\ a & b & c \\ a^2 & b^2 & c^2 \end{bmatrix} = (b - a)(c - a)(c - b)\). Use it to prove that through three points with distinct \(x\)-coordinates there is exactly one polynomial of degree at most 2, and evaluate the determinant for \(a, b, c = 1, 2, 4\).
Solution
Subtract \(a\) times row 2 from row 3, then \(a\) times row 1 from row 2 (row operations do not change the determinant):
\[\begin{vmatrix} 1 & 1 & 1 \\ a & b & c \\ a^2 & b^2 & c^2 \end{vmatrix} = \begin{vmatrix} 1 & 1 & 1 \\ 0 & b - a & c - a \\ 0 & b(b - a) & c(c - a) \end{vmatrix} = (b - a)(c - a)\begin{vmatrix} 1 & 1 \\ b & c \end{vmatrix} = (b - a)(c - a)(c - b).\]Interpolation. A polynomial \(p(x) = \alpha + \beta x + \gamma x^2\) passes through \((a, y_1), (b, y_2), (c, y_3)\) iff \(\alpha + \beta a + \gamma a^2 = y_1\), etc. The coefficient matrix is the transpose of the matrix above, with the same determinant \((b - a)(c - a)(c - b)\), which is nonzero exactly when \(a, b, c\) are distinct. Then the system has exactly one solution \((\alpha, \beta, \gamma)\) for every choice of \(y_1, y_2, y_3\).
For \(a, b, c = 1, 2, 4\): \((2 - 1)(4 - 1)(4 - 2) = 6\).
\((b-a)(c-a)(c-b)\), nonzero for distinct nodes, so the interpolating quadratic is unique; the value is \(6\).
Review: ·
40Let \(N\) be a square matrix with \(N^3 = 0\). Show that \(I + N\) is invertible and find its inverse. Apply this to invert \(A = \begin{bmatrix} 1 & 2 & 3 \\ 0 & 1 & 4 \\ 0 & 0 & 1 \end{bmatrix}\).
Solution
Guess the geometric series: \((I + N)(I - N + N^2) = I - N + N^2 + N - N^2 + N^3 = I + N^3 = I\). Since the factors are square, this one-sided identity suffices: \((I + N)^{-1} = I - N + N^2\). (In general \((I - N)^{-1} = I + N + \cdots + N^{k-1}\) when \(N^k = 0\).)
Here \(A = I + N\) with \(N = \begin{bmatrix} 0 & 2 & 3 \\ 0 & 0 & 4 \\ 0 & 0 & 0 \end{bmatrix}\), \(N^2 = \begin{bmatrix} 0 & 0 & 8 \\ 0 & 0 & 0 \\ 0 & 0 & 0 \end{bmatrix}\), \(N^3 = 0\). Therefore
\[A^{-1} = I - N + N^2 = \begin{bmatrix} 1 & -2 & -3 + 8 \\ 0 & 1 & -4 \\ 0 & 0 & 1 \end{bmatrix} = \begin{bmatrix} 1 & -2 & 5 \\ 0 & 1 & -4 \\ 0 & 0 & 1 \end{bmatrix}.\]Check row 1 of \(AA^{-1}\): \((1,\ -2 + 2,\ 5 - 8 + 3) = (1, 0, 0)\). Every unit upper triangular matrix is of this form, which is why its inverse is again unit upper triangular with integer entries when the entries are integers.
\((I + N)^{-1} = I - N + N^2\); \(A^{-1} = \begin{bmatrix} 1 & -2 & 5 \\ 0 & 1 & -4 \\ 0 & 0 & 1 \end{bmatrix}\).
Review: ·
41Find all \(2\times 2\) matrices \(X\) that commute with \(A = \begin{bmatrix} 1 & 1 \\ 0 & 1 \end{bmatrix}\).
Solution
Let \(X = \begin{bmatrix} p & q \\ r & s \end{bmatrix}\). Then
\[AX = \begin{bmatrix} p + r & q + s \\ r & s \end{bmatrix}\] \[XA = \begin{bmatrix} p & p + q \\ r & r + s \end{bmatrix}.\]Equating entries: \(p + r = p\) gives \(r = 0\); \(q + s = p + q\) gives \(s = p\); \(r = r\) and \(s = r + s\) give \(r = 0\) again. So
\[X = \begin{bmatrix} p & q \\ 0 & p \end{bmatrix} = pI + qN\] \[N = \begin{bmatrix} 0 & 1 \\ 0 & 0 \end{bmatrix}.\]The commutant of \(A\) is exactly the set of polynomials in \(A\) (since \(A = I + N\), these are the matrices \(pI + qN = (p - q)I + qA\)), a two-dimensional subspace of \(M_{2\times 2}\). In general a matrix with a single Jordan block commutes only with polynomials in itself.
\(X = \begin{bmatrix} p & q \\ 0 & p \end{bmatrix}\), i.e. \(X = \alpha I + \beta A\).
Review:
42For \(A = \begin{bmatrix} 1 & 1 & 1 \\ 1 & 2 & 3 \\ 2 & 3 & 4 \end{bmatrix}\), find the condition on \(\mathbf{b} = (b_1, b_2, b_3)\) for \(A\mathbf{x} = \mathbf{b}\) to be consistent, describe the column space geometrically, and solve the system for \(\mathbf{b} = (1, 2, 3)\).
Solution
Row reduce the augmented matrix with a symbolic right-hand side:
\[\left[\begin{array}{ccc|c} 1 & 1 & 1 & b_1 \\ 1 & 2 & 3 & b_2 \\ 2 & 3 & 4 & b_3 \end{array}\right] \xrightarrow{R_2 - R_1,\ R_3 - 2R_1} \left[\begin{array}{ccc|c} 1 & 1 & 1 & b_1 \\ 0 & 1 & 2 & b_2 - b_1 \\ 0 & 1 & 2 & b_3 - 2b_1 \end{array}\right] \xrightarrow{R_3 - R_2} \left[\begin{array}{ccc|c} 1 & 1 & 1 & b_1 \\ 0 & 1 & 2 & b_2 - b_1 \\ 0 & 0 & 0 & b_3 - b_1 - b_2 \end{array}\right].\]Consistent iff \(b_3 = b_1 + b_2\). The column space is the plane \(b_1 + b_2 - b_3 = 0\) in \(\mathbb{R}^3\), with normal \((1, 1, -1)\) (this normal spans the left null space, since row 3 of \(A\) equals row 1 plus row 2). \(\operatorname{rank}A = 2\).
For \(\mathbf{b} = (1, 2, 3)\): \(3 = 1 + 2\), consistent. Back substitution with \(x_3 = t\): \(x_2 = 1 - 2t\), \(x_1 = 1 - x_2 - x_3 = t\):
\[\mathbf{x} = \begin{bmatrix} 0 \\ 1 \\ 0 \end{bmatrix} + t\begin{bmatrix} 1 \\ -2 \\ 1 \end{bmatrix}.\]Check: \(A(0, 1, 0) = (1, 2, 3)\) and \(A(1, -2, 1) = (0, 0, 0)\).
Consistent iff \(b_1 + b_2 = b_3\) (column space is that plane); \(\mathbf{x} = (0, 1, 0) + t(1, -2, 1)\).
Review: ·
43\(A\) is a \(3\times 3\) matrix with \(\det A = 2\). Find \(\det(2A)\), \(\det(A^TA^{-1})\), \(\det(\operatorname{adj}A)\), \(\det(-A)\), \(\det(A^3)\) and \(\det(A^{-1}A^TA)\).
Solution
- \(\det(2A)\) \(= 2^3\det A = 16\) (each of the three rows is doubled).
- \(\det(A^TA^{-1})\) \(= \det A^T\cdot\det A^{-1} = 2\cdot\tfrac12 = 1\).
- \(\det(\operatorname{adj}A)\) from \(A\operatorname{adj}A = (\det A)I\): \(\det A\cdot\det\operatorname{adj}A = (\det A)^3\), so \(\det\operatorname{adj}A = (\det A)^{2} = 4\). (In general \((\det A)^{n-1}\).)
- \(\det(-A)\) \(= (-1)^3\det A = -2\).
- \(\det(A^3)\) \(= 2^3 = 8\).
- \(\det(A^{-1}A^TA)\) \(= \tfrac12\cdot 2\cdot 2 = 2\) (this matrix is similar to \(A^T\), which has determinant 2).
\(16,\ 1,\ 4,\ -2,\ 8,\ 2\).
Review:
44Let \(D_n\) be the determinant of the \(n\times n\) tridiagonal matrix with \(2\) on the diagonal and \(-1\) on the two neighbouring diagonals. Show that \(D_n = 2D_{n-1} - D_{n-2}\) and deduce \(D_n = n + 1\).
Solution
Expand along the first row. The \((1,1)\) entry \(2\) has cofactor \(D_{n-1}\) (the same pattern one size smaller). The \((1,2)\) entry \(-1\) has cofactor \(C_{12} = (-1)^{1+2}M_{12} = -M_{12}\), where \(M_{12}\) is the minor with row 1 and column 2 deleted; the first column of that minor is \((-1, 0, \dots, 0)^T\), so expanding it along that column gives \(M_{12} = -D_{n-2}\). Hence the second term contributes \((-1)\cdot C_{12} = M_{12} = -D_{n-2}\), and
\[D_n = 2D_{n-1} - D_{n-2}.\]Base cases: \(D_1 = 2\), \(D_2 = \begin{vmatrix} 2 & -1 \\ -1 & 2 \end{vmatrix} = 3\). Induction: if \(D_{n-1} = n\) and \(D_{n-2} = n - 1\), then \(D_n = 2n - (n - 1) = n + 1\). Check \(D_3 = 2\cdot 3 - 2 = 4\), and indeed \(\begin{vmatrix} 2 & -1 & 0 \\ -1 & 2 & -1 \\ 0 & -1 & 2 \end{vmatrix} = 2(3) + 1(-2) = 4\).
Since \(D_n \ne 0\), this matrix (the discretized second derivative) is always invertible, which is what makes finite-difference boundary value problems uniquely solvable.
\(D_n = 2D_{n-1} - D_{n-2}\) with \(D_1 = 2, D_2 = 3\), so \(D_n = n + 1\).
Review:
45Find a factorization \(PA = LU\) for \(A = \begin{bmatrix} 0 & 1 & 2 \\ 1 & 1 & 1 \\ 2 & 3 & 1 \end{bmatrix}\), and use it to compute \(\det A\).
Solution
The \((1,1)\) entry is zero, so elimination cannot start without a swap. Interchange rows 1 and 2: \(P = \begin{bmatrix} 0 & 1 & 0 \\ 1 & 0 & 0 \\ 0 & 0 & 1 \end{bmatrix}\), \(PA = \begin{bmatrix} 1 & 1 & 1 \\ 0 & 1 & 2 \\ 2 & 3 & 1 \end{bmatrix}\).
Eliminate: \(R_3 - 2R_1\) (\(m_{31} = 2\)) gives \((0, 1, -1)\); \(R_3 - 1\cdot R_2\) (\(m_{32} = 1\)) gives \((0, 0, -3)\); \(m_{21} = 0\).
\[L = \begin{bmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 2 & 1 & 1 \end{bmatrix}\] \[U = \begin{bmatrix} 1 & 1 & 1 \\ 0 & 1 & 2 \\ 0 & 0 & -3 \end{bmatrix}\] \[PA = LU.\]Check row 3 of \(LU\): \(2(1,1,1) + 1(0,1,2) + (0,0,-3) = (2, 3, 1)\).
Determinant: \(\det P\det A = \det L\det U\), with \(\det P = -1\) (one swap), \(\det L = 1\), \(\det U = 1\cdot 1\cdot(-3) = -3\). So \(\det A = -3/(-1) = 3\). Direct check: \(0 - 1(1 - 2) + 2(3 - 2) = 1 + 2 = 3\).
\(P\) swaps rows 1, 2; \(L = \begin{bmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 2 & 1 & 1 \end{bmatrix}\), \(U = \begin{bmatrix} 1 & 1 & 1 \\ 0 & 1 & 2 \\ 0 & 0 & -3 \end{bmatrix}\); \(\det A = 3\).
Review: ·
46Use Cramer’s rule to find \(z\) alone, as a function of \(t\), in the system \(x + y + z = 1,\ x + 2y + 4z = t,\ x + 3y + 9z = t^2\).
Solution
The coefficient matrix is a Vandermonde matrix with nodes \(1, 2, 3\):
\[D = \begin{vmatrix} 1 & 1 & 1 \\ 1 & 2 & 4 \\ 1 & 3 & 9 \end{vmatrix} = (2 - 1)(3 - 1)(3 - 2) = 2.\]Replace the third column by \((1, t, t^2)\):
\[D_z = \begin{vmatrix} 1 & 1 & 1 \\ 1 & 2 & t \\ 1 & 3 & t^2 \end{vmatrix} = 1(2t^2 - 3t) - 1(t^2 - t) + 1(3 - 2) = t^2 - 2t + 1 = (t - 1)^2.\] \[z = \frac{D_z}{D} = \frac{(t - 1)^2}{2}.\]Interpretation: \((x, y, z)\) are the coefficients of the quadratic \(q(s) = x + ys + zs^2\) with \(q(1) = 1\), \(q(2) = t\), \(q(3) = t^2\); its leading coefficient is the second divided difference \(\tfrac12(1 - 2t + t^2)\). Check \(t = 1\): all three values are 1, the constant polynomial, \(z = 0\).
\(z = \dfrac{(t - 1)^2}{2}\).
Review: ·
47Write \(A = \begin{bmatrix} 1 & 2 \\ 3 & 4 \end{bmatrix}\) as a product of elementary matrices.
Solution
Row reduce \(A\) to \(I\), recording each operation as an elementary matrix:
- \(R_2 - 3R_1\) \(E_1 = \begin{bmatrix} 1 & 0 \\ -3 & 1 \end{bmatrix}\), giving \(\begin{bmatrix} 1 & 2 \\ 0 & -2 \end{bmatrix}\).
- \(R_2 \times (-\tfrac12)\) \(E_2 = \begin{bmatrix} 1 & 0 \\ 0 & -\tfrac12 \end{bmatrix}\), giving \(\begin{bmatrix} 1 & 2 \\ 0 & 1 \end{bmatrix}\).
- \(R_1 - 2R_2\) \(E_3 = \begin{bmatrix} 1 & -2 \\ 0 & 1 \end{bmatrix}\), giving \(I\).
So \(E_3E_2E_1A = I\), hence \(A = E_1^{-1}E_2^{-1}E_3^{-1}\). Inverting each elementary matrix undoes its operation:
\[A = \begin{bmatrix} 1 & 0 \\ 3 & 1 \end{bmatrix}\begin{bmatrix} 1 & 0 \\ 0 & -2 \end{bmatrix}\begin{bmatrix} 1 & 2 \\ 0 & 1 \end{bmatrix}.\]Check: \(\begin{bmatrix} 1 & 0 \\ 3 & 1 \end{bmatrix}\begin{bmatrix} 1 & 0 \\ 0 & -2 \end{bmatrix} = \begin{bmatrix} 1 & 0 \\ 3 & -2 \end{bmatrix}\), and times \(\begin{bmatrix} 1 & 2 \\ 0 & 1 \end{bmatrix}\) gives \(\begin{bmatrix} 1 & 2 \\ 3 & 6 - 2 \end{bmatrix} = A\). Also \(\det A = 1\cdot(-2)\cdot 1 = -2\), the product of the elementary determinants.
\(A = \begin{bmatrix} 1 & 0 \\ 3 & 1 \end{bmatrix}\begin{bmatrix} 1 & 0 \\ 0 & -2 \end{bmatrix}\begin{bmatrix} 1 & 2 \\ 0 & 1 \end{bmatrix}\).
Review: ·
48Prove \((AB)^T = B^TA^T\) from the definition of the product. Deduce that \(A^TA\) is symmetric with nonnegative diagonal entries, and that \(A^TA = 0\) forces \(A = 0\).
Solution
Entry \((i, j)\) of \((AB)^T\) is entry \((j, i)\) of \(AB\): \(\sum_k a_{jk}b_{ki}\). Entry \((i, j)\) of \(B^TA^T\) is \(\sum_k (B^T)_{ik}(A^T)_{kj} = \sum_k b_{ki}a_{jk}\), the same sum. So \((AB)^T = B^TA^T\).
Symmetric. \((A^TA)^T = A^T(A^T)^T = A^TA\).
Diagonal. \((A^TA)_{ii} = \sum_k (A^T)_{ik}a_{ki} = \sum_k a_{ki}^2 = \|\text{column } i \text{ of } A\|^2 \ge 0\).
\(A^TA = 0 \Rightarrow A = 0\). If \(A^TA = 0\) then every diagonal entry is 0, so every column of \(A\) has length 0, so every column is the zero vector. (Equivalently, \(\mathbf{x}^TA^TA\mathbf{x} = \|A\mathbf{x}\|^2 = 0\) for all \(\mathbf{x}\), so \(A\mathbf{x} = \mathbf{0}\) for all \(\mathbf{x}\).) The same argument shows \(\operatorname{Nul}(A^TA) = \operatorname{Nul}A\), the fact behind the normal equations of least squares.
Entrywise both sides equal \(\sum_k a_{jk}b_{ki}\); the diagonal of \(A^TA\) consists of squared column lengths, so \(A^TA = 0\) forces every column to vanish.
Review: ·
49Find all solutions of \(x_1 + 2x_2 - x_3 + x_4 = 0\), \(2x_1 + 4x_2 + x_3 - x_4 = 0\), give a basis of the solution space, and state its dimension. Then find all solutions when the right-hand sides are \(3\) and \(0\) respectively.
Solution
\[\begin{bmatrix} 1 & 2 & -1 & 1 \\ 2 & 4 & 1 & -1 \end{bmatrix} \xrightarrow{R_2 - 2R_1} \begin{bmatrix} 1 & 2 & -1 & 1 \\ 0 & 0 & 3 & -3 \end{bmatrix} \xrightarrow{R_2/3,\ R_1 + R_2} \begin{bmatrix} 1 & 2 & 0 & 0 \\ 0 & 0 & 1 & -1 \end{bmatrix}.\]Pivots in columns 1 and 3; free variables \(x_2 = s\), \(x_4 = t\). Then \(x_1 = -2s\), \(x_3 = t\):
\[\mathbf{x} = s\begin{bmatrix} -2 \\ 1 \\ 0 \\ 0 \end{bmatrix} + t\begin{bmatrix} 0 \\ 0 \\ 1 \\ 1 \end{bmatrix}\]a two-dimensional subspace of \(\mathbb{R}^4\) (nullity \(= 4 - 2\)) with the two displayed vectors as a basis.
Inhomogeneous. With right-hand side \((3, 0)\), the same operations give \((3, -6)\), then \((3, -2)\) after dividing by 3, then \(R_1 + R_2\) gives \((1, -2)\): \(x_1 = 1 - 2s\), \(x_3 = -2 + t\):
\[\mathbf{x} = \begin{bmatrix} 1 \\ 0 \\ -2 \\ 0 \end{bmatrix} + s\begin{bmatrix} -2 \\ 1 \\ 0 \\ 0 \end{bmatrix} + t\begin{bmatrix} 0 \\ 0 \\ 1 \\ 1 \end{bmatrix}.\]Check the particular solution: \(1 + 0 + 2 + 0 = 3\) and \(2 + 0 - 2 - 0 = 0\). The solution set is the null space shifted by \((1, 0, -2, 0)\), not a subspace.
Null space basis \((-2, 1, 0, 0), (0, 0, 1, 1)\), dimension 2; inhomogeneous solutions \((1, 0, -2, 0) + s(-2,1,0,0) + t(0,0,1,1)\).
Review: ·
50For which \(k\) is \(A = \begin{bmatrix} 1 & 0 & k \\ 0 & 1 & 0 \\ k & 0 & 1 \end{bmatrix}\) invertible? Find \(A^{-1}\) by the adjugate formula.
Solution
Expanding along the middle row, \(\det A = 1\cdot\begin{vmatrix} 1 & k \\ k & 1 \end{vmatrix} = 1 - k^2\). So \(A\) is invertible iff \(k \ne \pm1\).
Cofactors (each a \(2\times 2\) minor with the checkerboard sign): \(C_{11} = 1\cdot 1 - 0\cdot 0 = 1\), \(C_{12} = -(0\cdot 1 - 0\cdot k) = 0\), \(C_{13} = 0\cdot 0 - 1\cdot k = -k\); \(C_{21} = 0\), \(C_{22} = 1\cdot 1 - k\cdot k = 1 - k^2\), \(C_{23} = 0\); \(C_{31} = 0\cdot 0 - k\cdot 1 = -k\), \(C_{32} = 0\), \(C_{33} = 1\). The cofactor matrix is symmetric here, so it equals its transpose, the adjugate:
\[A^{-1} = \frac{1}{1 - k^2}\begin{bmatrix} 1 & 0 & -k \\ 0 & 1 - k^2 & 0 \\ -k & 0 & 1 \end{bmatrix}.\]Check: row 1 of \(A\) times column 1 of \(A^{-1}\) is \(\dfrac{1 - k^2}{1 - k^2} = 1\); row 1 times column 3 is \(\dfrac{-k + k}{1 - k^2} = 0\). Structurally, \(A\) acts as the identity on the \(y\)-axis and as \(\begin{bmatrix} 1 & k \\ k & 1 \end{bmatrix}\) on the \(xz\)-plane, whose inverse is \(\frac{1}{1 - k^2}\begin{bmatrix} 1 & -k \\ -k & 1 \end{bmatrix}\). At \(k = \pm1\) that block has determinant 0: it collapses the \(xz\)-plane onto a line.
Invertible iff \(k \ne \pm1\); \(A^{-1} = \frac{1}{1-k^2}\begin{bmatrix} 1 & 0 & -k \\ 0 & 1-k^2 & 0 \\ -k & 0 & 1 \end{bmatrix}\).
Review: ·
51Prove that \(\operatorname{tr}(AB) = \operatorname{tr}(BA)\) for all \(n\times n\) matrices. Deduce (a) that no real or complex matrices satisfy \(AB - BA = I\), and (b) that similar matrices have the same trace.
Solution
\[\operatorname{tr}(AB) = \sum_i(AB)_{ii} = \sum_i\sum_k a_{ik}b_{ki} = \sum_k\sum_i b_{ki}a_{ik} = \sum_k(BA)_{kk} = \operatorname{tr}(BA).\]Only the order of a finite double sum was exchanged, so this holds over any field (and even for \(A\) \(m\times n\), \(B\) \(n\times m\)).
(a) \(\operatorname{tr}(AB - BA) = \operatorname{tr}(AB) - \operatorname{tr}(BA) = 0\), but \(\operatorname{tr}I = n \ne 0\). So \(AB - BA = I\) is impossible for finite matrices. (In quantum mechanics the position and momentum operators do satisfy such a relation, which is why they must act on an infinite-dimensional space.)
(b) If \(B = S^{-1}AS\) then \(\operatorname{tr}B = \operatorname{tr}\big((S^{-1}A)S\big) = \operatorname{tr}\big(S(S^{-1}A)\big) = \operatorname{tr}A\). Since the trace is also the sum of the eigenvalues, this is consistent with similar matrices sharing their eigenvalues; the same trick with determinants gives \(\det B = \det A\).
Both traces equal \(\sum_{i,k}a_{ik}b_{ki}\); hence \(\operatorname{tr}(AB - BA) = 0 \ne n\), and \(\operatorname{tr}(S^{-1}AS) = \operatorname{tr}A\).
Review: ·
52Find the eigenvalues and the determinant of \(C = \begin{bmatrix} 1 & 2 & 3 & 4 \\ 2 & 3 & 4 & 1 \\ 3 & 4 & 1 & 2 \\ 4 & 1 & 2 & 3 \end{bmatrix}\) without expanding the determinant.
Solution
\(C\) is symmetric, so its eigenvalues are real and it has an orthogonal eigenbasis. Two eigenvectors are visible: every row sums to 10, so \(C\mathbf{1} = 10\cdot\mathbf{1}\); and for \(\mathbf{v} = (1, -1, 1, -1)\), each row gives \(\pm(1 - 2 + 3 - 4) = \mp 2\), i.e. \(C\mathbf{v} = -2\mathbf{v}\). So \(\lambda_1 = 10\), \(\lambda_2 = -2\).
For the other two use invariants. The trace is \(1 + 3 + 1 + 3 = 8 = 10 - 2 + \lambda_3 + \lambda_4\), so \(\lambda_3 + \lambda_4 = 0\). The sum of the squares of the eigenvalues equals \(\operatorname{tr}(C^2) = \operatorname{tr}(C^TC) = \) the sum of the squares of all entries \(= 4(1 + 4 + 9 + 16) = 120\), so \(100 + 4 + \lambda_3^2 + \lambda_4^2 = 120\) and \(\lambda_3^2 = \lambda_4^2 = 8\):
\[\lambda = 10,\ -2,\ 2\sqrt2,\ -2\sqrt2\] \[\det C = 10\cdot(-2)\cdot(2\sqrt2)(-2\sqrt2) = 160.\](The remaining eigenvectors lie in the plane orthogonal to \(\mathbf{1}\) and \(\mathbf{v}\), spanned by \((1, 0, -1, 0)\) and \((0, 1, 0, -1)\), on which \(C\) acts as \(\begin{bmatrix} -2 & 2 \\ 2 & 2 \end{bmatrix}\) with eigenvalues \(\pm2\sqrt2\).)
\(\lambda = 10, -2, \pm2\sqrt2\); \(\det C = 160\).
Review: · ·
53Prove that a skew-symmetric \(n\times n\) matrix with \(n\) odd has determinant zero. Verify directly for \(A = \begin{bmatrix} 0 & a & b \\ -a & 0 & c \\ -b & -c & 0 \end{bmatrix}\), and show that for \(n = 2\) the determinant need not vanish.
Solution
If \(A^T = -A\) then \(\det A = \det A^T = \det(-A) = (-1)^n\det A\). For odd \(n\) this says \(\det A = -\det A\), so \(\det A = 0\).
Direct check for \(n = 3\):
\[\det A = 0\cdot(0 + c^2) - a(0 + bc) + b(ac - 0) = -abc + abc = 0.\]So a \(3\times 3\) skew-symmetric matrix is always singular; indeed its null space contains \((c, -b, a)\): \(A(c, -b, a) = (-ab + ab,\ -ac + ac,\ -bc + bc) = \mathbf{0}\). (This matrix represents the cross product \(\mathbf{x} \mapsto {\mathbf{w}\times \mathbf{x}}\) with \(\mathbf{w} = (c, -b, a)\), and \({\mathbf{w}\times \mathbf{w}} = \mathbf{0}\).)
For \(n = 2\): \(\det\begin{bmatrix} 0 & a \\ -a & 0 \end{bmatrix} = a^2 \gt 0\) when \(a \ne 0\); the argument gives only \(\det A = \det A\). The eigenvalues \(\pm ia\) are purely imaginary, as skew-symmetry requires, and their product is \(a^2\).
\(\det A = (-1)^n\det A\) forces \(\det A = 0\) for odd \(n\); the \(3\times 3\) case gives \(-abc + abc = 0\); for \(n = 2\), \(\det = a^2\).
Review: ·
54(a) \(A\) is square and \(A\mathbf{x} = \mathbf{b}_1\) has exactly one solution. Show that \(A\mathbf{x} = \mathbf{b}_2\) has exactly one solution for every \(\mathbf{b}_2\). (b) \(A\) is \(3\times 4\). Can \(A\mathbf{x} = \mathbf{b}\) have exactly one solution for some \(\mathbf{b}\)? (c) \(A\) is \(4\times 3\). Can \(A\mathbf{x} = \mathbf{b}\) be solvable for every \(\mathbf{b}\)?
Solution
(a) If \(A\mathbf{x} = \mathbf{b}_1\) has a unique solution, the homogeneous system has only the trivial solution (any nonzero \(\mathbf{x}_h\) would give a second solution \(\mathbf{x}_1 + \mathbf{x}_h\)). So \(\operatorname{Nul}A = \{\mathbf{0}\}\), the \(n\) columns are independent, \(\operatorname{rank}A = n\), and the square matrix \(A\) is invertible. Then \(A\mathbf{x} = \mathbf{b}_2\) has the unique solution \(A^{-1}\mathbf{b}_2\) for every \(\mathbf{b}_2\).
(b) No. Four columns in \(\mathbb{R}^3\) are always dependent, so \(\operatorname{Nul}A\) contains a nonzero vector \(\mathbf{x}_h\), and whenever \(\mathbf{x}_p\) is a solution so is \(\mathbf{x}_p + t\mathbf{x}_h\). A consistent wide system has infinitely many solutions.
(c) No. The column space is spanned by three vectors, so it has dimension at most 3, while \(\mathbb{R}^4\) has dimension 4; some \(\mathbf{b}\) lies outside the column space and that system is inconsistent. A tall system can at best be uniquely solvable for the right-hand sides in its column space.
(a) uniqueness for one \(\mathbf{b}\) means trivial kernel, hence invertible; (b) no (free variable); (c) no (rank \(\le 3 \lt 4\)).
Review: · ·
Challenge 2: vector spaces, rank and transformations
Linear Algebra · Challenge problems 55 to 74
Problems 55 to 74
One hundred harder problems, still within the scope of a first linear algebra course: proofs, parameters, multi-step computations and applications. Each opens to a complete solution with every step shown and the final answer highlighted. Expect to need pencil and paper, and use the Review links to go back to the relevant tab.
55Let \(W\) be the set of \(2\times 2\) real matrices with trace zero. Show that \(W\) is a subspace of \(M_{2\times 2}\), find a basis, and give its dimension. Is the set of matrices with determinant zero a subspace?
Solution
The trace is linear: \(\operatorname{tr}(A + B) = \operatorname{tr}A + \operatorname{tr}B\) and \(\operatorname{tr}(cA) = c\operatorname{tr}A\). So \(W = \ker(\operatorname{tr})\) is a subspace (it contains the zero matrix and is closed under sums and multiples).
A matrix in \(W\) has the form \(\begin{bmatrix} a & b \\ c & -a \end{bmatrix} = a\begin{bmatrix} 1 & 0 \\ 0 & -1 \end{bmatrix} + b\begin{bmatrix} 0 & 1 \\ 0 & 0 \end{bmatrix} + c\begin{bmatrix} 0 & 0 \\ 1 & 0 \end{bmatrix}\). The three matrices span \(W\) and are independent (a combination equal to zero has all its entries zero, forcing \(a = b = c = 0\)). So \(\dim W = 3 = 4 - 1\): one linear constraint on a 4-dimensional space.
Determinant zero is not a subspace. \(\begin{bmatrix} 1 & 0 \\ 0 & 0 \end{bmatrix}\) and \(\begin{bmatrix} 0 & 0 \\ 0 & 1 \end{bmatrix}\) both have determinant 0, but their sum \(I\) has determinant 1. The determinant is not linear, so its zero set is a cone, not a subspace.
\(W = \ker\operatorname{tr}\), basis \(E_{11} - E_{22}, E_{12}, E_{21}\), \(\dim W = 3\); \(\{\det = 0\}\) fails closure under addition.
Review: ·
56Let \(V = \{p \in P_3 : p(0) = p(1)\}\). Show \(V\) is a subspace of \(P_3\), find a basis and \(\dim V\).
Solution
The map \(L(p) = p(1) - p(0)\) is linear (evaluation is linear), and \(V = \ker L\), so \(V\) is a subspace.
Write \(p = a + bx + cx^2 + dx^3\). Then \(p(1) - p(0) = b + c + d = 0\): one constraint on four coefficients, so \(\dim V = 3\). Solve \(b = -c - d\):
\[p = a + c(x^2 - x) + d(x^3 - x)\]so \(\{1,\ x^2 - x,\ x^3 - x\}\) spans \(V\). These are independent (distinct degrees), hence a basis. Check each: \(1\) is constant; \(x^2 - x\) and \(x^3 - x\) vanish at both 0 and 1.
Equivalently \(V = \operatorname{span}\{1\} \oplus x(x - 1)P_1\): a polynomial with \(p(0) = p(1)\) is a constant plus a multiple of \(x(x - 1)\) times a linear polynomial.
Kernel of \(p \mapsto p(1) - p(0)\); basis \(\{1, x^2 - x, x^3 - x\}\), \(\dim V = 3\).
Review: ·
57Let \(U\) and \(W\) be subspaces of \(V\). Prove that \(U \cup W\) is a subspace if and only if \(U \subseteq W\) or \(W \subseteq U\). Illustrate with two lines in \(\mathbb{R}^2\).
Solution
If one contains the other, say \(U \subseteq W\), then \(U \cup W = W\), a subspace.
Only if. Suppose neither contains the other: pick \(\mathbf{u} \in U\setminus W\) and \(\mathbf{w} \in W\setminus U\). Both lie in \(U \cup W\). If the union were a subspace, \(\mathbf{u} + \mathbf{w}\) would lie in it, so in \(U\) or in \(W\). If \(\mathbf{u} + \mathbf{w} \in U\), then \(\mathbf{w} = (\mathbf{u} + \mathbf{w}) - \mathbf{u} \in U\) (difference of two elements of \(U\)), contradiction. If \(\mathbf{u} + \mathbf{w} \in W\), then \(\mathbf{u} = (\mathbf{u} + \mathbf{w}) - \mathbf{w} \in W\), contradiction. So the union is not closed under addition.
Example. The \(x\)-axis and the \(y\)-axis in \(\mathbb{R}^2\): \((1, 0)\) and \((0, 1)\) are in the union, but \((1, 1)\) is on neither axis. The smallest subspace containing both lines is their sum \(U + W = \mathbb{R}^2\), not their union.
Union closed under addition only when one subspace contains the other; two axes give the counterexample \((1,0) + (0,1)\).
Review:
58Prove: if \(\mathbf{v}_1, \dots, \mathbf{v}_k\) are linearly independent and \(\mathbf{w} \notin \operatorname{span}\{\mathbf{v}_1, \dots, \mathbf{v}_k\}\), then \(\mathbf{v}_1, \dots, \mathbf{v}_k, \mathbf{w}\) are linearly independent. Use this to show that any independent set in an \(n\)-dimensional space can be extended to a basis.
Solution
Suppose \(c_1\mathbf{v}_1 + \cdots + c_k\mathbf{v}_k + d\mathbf{w} = \mathbf{0}\). If \(d \ne 0\), then \(\mathbf{w} = -\tfrac1d(c_1\mathbf{v}_1 + \cdots + c_k\mathbf{v}_k) \in \operatorname{span}\{\mathbf{v}_i\}\), contradicting the hypothesis. So \(d = 0\), and then \(c_1\mathbf{v}_1 + \cdots + c_k\mathbf{v}_k = \mathbf{0}\) forces every \(c_i = 0\) by independence of the \(\mathbf{v}_i\). Hence the enlarged set is independent.
Extension to a basis. Start with an independent set \(S\) in \(V\), \(\dim V = n\). If \(\operatorname{span}S \ne V\), pick \(\mathbf{w} \in V\) outside the span and add it; the set stays independent by the lemma. Each step adds one vector, and an independent set in \(V\) has at most \(n\) vectors, so the process stops after at most \(n - |S|\) steps, exactly when the span is all of \(V\). The final set is independent and spanning: a basis containing \(S\).
A relation with \(d \ne 0\) would put \(\mathbf{w}\) in the span; repeatedly adjoining vectors outside the span builds a basis in at most \(n\) steps.
Review:
59(a) Show that \(e^x, e^{2x}, e^{3x}\) are linearly independent functions. (b) Show that \(\sin^2x, \cos^2x, 1\) are linearly dependent. (c) Are \(1, \cos x, \cos 2x, \cos^2x\) independent?
Solution
(a) Wronskian:
\[W = \begin{vmatrix} e^x & e^{2x} & e^{3x} \\ e^x & 2e^{2x} & 3e^{3x} \\ e^x & 4e^{2x} & 9e^{3x} \end{vmatrix} = e^{6x}\begin{vmatrix} 1 & 1 & 1 \\ 1 & 2 & 3 \\ 1 & 4 & 9 \end{vmatrix} = e^{6x}(2 - 1)(3 - 1)(3 - 2) = 2e^{6x} \ne 0\]so the functions are independent. (Alternative: if \(ae^x + be^{2x} + ce^{3x} = 0\) for all \(x\), divide by \(e^{3x}\) and let \(x \to \infty\) to get \(c = 0\), then repeat.)
(b) \(\sin^2x + \cos^2x - 1 = 0\) is a nontrivial relation, so they are dependent (their Wronskian is identically zero).
(c) Dependent: \(\cos2x = 2\cos^2x - 1\) gives \(1\cdot 1 - 1\cdot\cos2x + 2\cos^2x = 0\) with \(\cos x\) absent, i.e. the relation \((1, 0, -1, 2)\). The span of the four functions is only three-dimensional, spanned by \(1, \cos x, \cos 2x\) (those three are independent: they are orthogonal on \([-\pi, \pi]\)).
(a) \(W = 2e^{6x} \ne 0\); (b) \(\sin^2x + \cos^2x - 1 = 0\); (c) dependent: \(2\cos^2x - \cos2x - 1 = 0\).
Review: ·
60Let \(\mathcal{B} = \{(1, 2), (3, 1)\}\) and \(\mathcal{C} = \{(1, 0), (1, 1)\}\) be bases of \(\mathbb{R}^2\). Find the change-of-coordinates matrix \(P_{\mathcal{C}\leftarrow\mathcal{B}}\) and use it to convert \([\mathbf{v}]_{\mathcal{B}} = (2, -1)\) into \(\mathcal{C}\)-coordinates. Check by computing \(\mathbf{v}\) directly.
Solution
The columns of \(P_{\mathcal{C}\leftarrow\mathcal{B}}\) are the \(\mathcal{C}\)-coordinates of the \(\mathcal{B}\) vectors. For \((1, 2) = c_1(1, 0) + c_2(1, 1)\): \(c_2 = 2\), \(c_1 = -1\). For \((3, 1)\): \(c_2 = 1\), \(c_1 = 2\). So
\[P_{\mathcal{C}\leftarrow\mathcal{B}} = \begin{bmatrix} -1 & 2 \\ 2 & 1 \end{bmatrix}, \qquad [\mathbf{v}]_{\mathcal{C}} = P_{\mathcal{C}\leftarrow\mathcal{B}}\begin{bmatrix} 2 \\ -1 \end{bmatrix} = \begin{bmatrix} -4 \\ 3 \end{bmatrix}.\]Check. \(\mathbf{v} = 2(1, 2) - 1(3, 1) = (-1, 3)\). In \(\mathcal{C}\): \(c_1(1, 0) + c_2(1, 1) = (-1, 3)\) gives \(c_2 = 3\), \(c_1 = -4\). Agreed.
In general \(P_{\mathcal{C}\leftarrow\mathcal{B}} = C^{-1}B\) where \(B\) and \(C\) hold the basis vectors as columns: here \(C^{-1} = \begin{bmatrix} 1 & -1 \\ 0 & 1 \end{bmatrix}\) and \(C^{-1}B = \begin{bmatrix} 1 - 2 & 3 - 1 \\ 2 & 1 \end{bmatrix}\), the same matrix. Its inverse is \(P_{\mathcal{B}\leftarrow\mathcal{C}}\).
\(P_{\mathcal{C}\leftarrow\mathcal{B}} = \begin{bmatrix} -1 & 2 \\ 2 & 1 \end{bmatrix}\), \([\mathbf{v}]_{\mathcal{C}} = (-4, 3)\), \(\mathbf{v} = (-1, 3)\).
Review: ·
61(a) Prove that \(\operatorname{rank}(AB) \le \operatorname{rank}A\) and \(\operatorname{rank}(AB) \le \operatorname{rank}B\). (b) Give \(2\times 2\) matrices of rank 1 with \(AB = 0\), and others with \(\operatorname{rank}(AB) = 1\). (c) Show that if \(A\) is invertible then \(\operatorname{rank}(AB) = \operatorname{rank}B\).
Solution
(a) Every column of \(AB\) is \(A\) times a column of \(B\), so \(\operatorname{Col}(AB) \subseteq \operatorname{Col}A\) and \(\operatorname{rank}(AB) \le \operatorname{rank}A\). Also \(\operatorname{Nul}B \subseteq \operatorname{Nul}(AB)\) (if \(B\mathbf{x} = \mathbf{0}\) then \(AB\mathbf{x} = \mathbf{0}\)), so by rank–nullity on the \(n\) columns, \(\operatorname{rank}(AB) = n - \operatorname{nullity}(AB) \le n - \operatorname{nullity}B = \operatorname{rank}B\).
(b) \(A = \begin{bmatrix} 1 & 0 \\ 0 & 0 \end{bmatrix}\), \(B = \begin{bmatrix} 0 & 0 \\ 0 & 1 \end{bmatrix}\): \(AB = 0\), rank drops to 0. \(A = B = \begin{bmatrix} 1 & 0 \\ 0 & 0 \end{bmatrix}\): \(AB = A\), rank 1 (the maximum allowed).
(c) From (a), \(\operatorname{rank}(AB) \le \operatorname{rank}B\). Apply (a) again to \(B = A^{-1}(AB)\): \(\operatorname{rank}B \le \operatorname{rank}(AB)\). Hence equality. The same argument shows \(\operatorname{rank}(BA) = \operatorname{rank}B\) for invertible \(A\): row operations (left multiplication by invertible matrices) never change rank, which is why row reduction computes it.
Columns of \(AB\) lie in \(\operatorname{Col}A\); \(\operatorname{Nul}B \subseteq \operatorname{Nul}AB\); invertible factors preserve rank.
Review:
62Find the rank and nullity of \(A = \begin{bmatrix} 1 & 2 & 1 & 0 \\ 2 & 4 & 3 & 1 \\ 1 & 2 & 2 & k \end{bmatrix}\) for every value of \(k\), and describe \(\operatorname{Nul}A\) in each case.
Solution
\[\xrightarrow{R_2 - 2R_1,\ R_3 - R_1} \begin{bmatrix} 1 & 2 & 1 & 0 \\ 0 & 0 & 1 & 1 \\ 0 & 0 & 1 & k \end{bmatrix} \xrightarrow{R_3 - R_2} \begin{bmatrix} 1 & 2 & 1 & 0 \\ 0 & 0 & 1 & 1 \\ 0 & 0 & 0 & k - 1 \end{bmatrix}.\]\(k \ne 1\): three pivots (columns 1, 3, 4), \(\operatorname{rank}A = 3\), \(\operatorname{nullity} = 1\). Reducing further, \(x_4 = 0\), \(x_3 = 0\), \(x_1 = -2x_2\): \(\operatorname{Nul}A = \operatorname{span}\{(-2, 1, 0, 0)\}\).
\(k = 1\): the last row vanishes, \(\operatorname{rank}A = 2\), \(\operatorname{nullity} = 2\). Free variables \(x_2 = s\), \(x_4 = t\); \(x_3 = -t\), \(x_1 = -2s + t\):
\[\operatorname{Nul}A = \operatorname{span}\{(-2, 1, 0, 0),\ (1, 0, -1, 1)\}.\]Check the second vector in the original matrix with \(k = 1\): row 2 gives \(2 + 0 - 3 + 1 = 0\), row 3 gives \(1 + 0 - 2 + 1 = 0\). Whatever \(k\), \(\operatorname{rank}A + \operatorname{nullity}A = 4\).
\(k \ne 1\): rank 3, null space spanned by \((-2,1,0,0)\); \(k = 1\): rank 2, null space spanned by \((-2,1,0,0), (1,0,-1,1)\).
Review: ·
63For \(A = \begin{bmatrix} 1 & 2 & 0 & 1 \\ 2 & 4 & 1 & 1 \\ 3 & 6 & 1 & 2 \end{bmatrix}\), find bases for all four fundamental subspaces and verify the two orthogonality relations.
Solution
\(R_2 - 2R_1 = (0, 0, 1, -1)\) and \(R_3 - 3R_1 = (0, 0, 1, -1)\), so \(R_3 - R_2 = \mathbf{0}\):
\[\operatorname{RREF}(A) = \begin{bmatrix} 1 & 2 & 0 & 1 \\ 0 & 0 & 1 & -1 \\ 0 & 0 & 0 & 0 \end{bmatrix}\] \[\operatorname{rank}A = 2.\]- Row space (in \(\mathbb{R}^4\), dim 2): \((1, 2, 0, 1), (0, 0, 1, -1)\).
- Null space (dim \(4 - 2 = 2\)): \(x_1 = -2x_2 - x_4\), \(x_3 = x_4\): basis \((-2, 1, 0, 0), (-1, 0, 1, 1)\).
- Column space (in \(\mathbb{R}^3\), dim 2): pivot columns 1 and 3 of \(A\): \((1, 2, 3), (0, 1, 1)\).
- Left null space (dim \(3 - 2 = 1\)): row 3 = row 1 + row 2, so \(\mathbf{y} = (1, 1, -1)\) satisfies \(\mathbf{y}^TA = \mathbf{0}\).
Orthogonality. Row space \(\perp\) null space: \((1,2,0,1)\cdot(-1,0,1,1) = -1 + 0 + 0 + 1 = 0\), \((0,0,1,-1)\cdot(-1,0,1,1) = 1 - 1 = 0\), and similarly with \((-2,1,0,0)\). Column space \(\perp\) left null space: \((1,2,3)\cdot(1,1,-1) = 0\), \((0,1,1)\cdot(1,1,-1) = 0\). Dimensions add up: \(2 + 2 = 4\) and \(2 + 1 = 3\).
Row: \((1,2,0,1),(0,0,1,-1)\); Nul: \((-2,1,0,0),(-1,0,1,1)\); Col: \((1,2,3),(0,1,1)\); left Nul: \((1,1,-1)\).
Review: ·
64Define \(T : P_2 \to P_2\) by \(T(p) = p' + p(0)\). Show \(T\) is linear, find its matrix in the basis \(\{1, x, x^2\}\), and find bases for \(\ker T\) and \(\operatorname{range}T\).
Solution
Differentiation and evaluation at 0 are linear, so their sum is: \(T(ap + bq) = ap' + bq' + ap(0) + bq(0) = aT(p) + bT(q)\).
Images of the basis: \(T(1) = 0 + 1 = 1\); \(T(x) = 1 + 0 = 1\); \(T(x^2) = 2x + 0 = 2x\). Coordinates as columns:
\[[T] = \begin{bmatrix} 1 & 1 & 0 \\ 0 & 0 & 2 \\ 0 & 0 & 0 \end{bmatrix}.\]Kernel. \(T(a + bx + cx^2) = (a + b) + 2cx = 0\) iff \(c = 0\) and \(b = -a\): \(\ker T = \operatorname{span}\{1 - x\}\), dimension 1. Check: \((1 - x)' + (1 - x)(0) = -1 + 1 = 0\).
Range. Spanned by \(T(1), T(x), T(x^2) = 1, 1, 2x\), so \(\operatorname{range}T = \operatorname{span}\{1, x\} = P_1\), dimension 2. Rank–nullity: \(1 + 2 = 3 = \dim P_2\). \(T\) is neither one-to-one nor onto; note that \(T\) is not nilpotent (unlike \(D\) alone), since \(T(1) = 1\): the eigenvalue 1 appears, with \(T^2(1) = 1\).
\([T] = \begin{bmatrix} 1 & 1 & 0 \\ 0 & 0 & 2 \\ 0 & 0 & 0 \end{bmatrix}\); \(\ker T = \operatorname{span}\{1 - x\}\); range \(= P_1\).
Review: ·
65Let \(A = \begin{bmatrix} 1 & 0 \\ 0 & 2 \end{bmatrix}\) and define \(T(X) = AX - XA\) on \(M_{2\times 2}\). Show \(T\) is linear and find its kernel, range, rank and nullity.
Solution
\(T(aX + bY) = A(aX + bY) - (aX + bY)A = a(AX - XA) + b(AY - YA)\): linear.
For \(X = \begin{bmatrix} p & q \\ r & s \end{bmatrix}\):
\[AX = \begin{bmatrix} p & q \\ 2r & 2s \end{bmatrix}\] \[XA = \begin{bmatrix} p & 2q \\ r & 2s \end{bmatrix}\] \[T(X) = \begin{bmatrix} 0 & -q \\ r & 0 \end{bmatrix}.\]Kernel: \(q = r = 0\), i.e. the diagonal matrices, \(\ker T = \operatorname{span}\{E_{11}, E_{22}\}\), nullity 2. These are exactly the matrices commuting with \(A\).
Range: all matrices with zero diagonal, \(\operatorname{span}\{E_{12}, E_{21}\}\), rank 2. Indeed \(T(E_{12}) = -E_{12}\) and \(T(E_{21}) = E_{21}\), so \(E_{12}, E_{21}\) are eigenvectors of \(T\) with eigenvalues \(-1, 1\), and \(E_{11}, E_{22}\) have eigenvalue 0. Rank + nullity \(= 2 + 2 = 4 = \dim M_{2\times 2}\). In general the eigenvalues of \(X \mapsto AX - XA\) are the differences \(\lambda_i - \lambda_j\) of the eigenvalues of \(A\).
\(T(X) = \begin{bmatrix} 0 & -q \\ r & 0 \end{bmatrix}\); kernel = diagonal matrices (nullity 2), range = zero-diagonal matrices (rank 2).
Review: ·
66Let \(R\) be the rotation of \(\mathbb{R}^2\) through \(90^\circ\) counterclockwise and \(F\) the reflection across the \(x\)-axis. Find the matrices of \(F\circ R\) and \(R\circ F\), decide whether each is a rotation or a reflection, and identify its line or angle.
Solution
\[R = \begin{bmatrix} 0 & -1 \\ 1 & 0 \end{bmatrix}\] \[F = \begin{bmatrix} 1 & 0 \\ 0 & -1 \end{bmatrix}.\]\(F\circ R\) (rotate first, then reflect): \(FR = \begin{bmatrix} 0 & -1 \\ -1 & 0 \end{bmatrix}\). Determinant \(-1\), symmetric, squares to \(I\): a reflection. Its fixed line is the eigenspace for \(\lambda = 1\): \(-v_2 = v_1\), the line \(y = -x\). Check: \(FR(1, -1) = (1, -1)\).
\(R\circ F\): \(RF = \begin{bmatrix} 0 & 1 \\ 1 & 0 \end{bmatrix}\). Also a reflection (det \(-1\)), fixing \(y = x\): \(RF(1, 1) = (1, 1)\).
The two compositions differ (the group of symmetries of the plane is not commutative). In general, rotation followed by reflection, or the reverse, is a reflection, with the line rotated by half the angle: \(F\circ R_\theta\) reflects across the line at angle \(-\theta/2\), here \(-45^\circ\), and \(R_\theta\circ F\) across the line at angle \(\theta/2 = 45^\circ\). The product of two reflections, by contrast, is a rotation through twice the angle between the lines.
\(FR = \begin{bmatrix} 0 & -1 \\ -1 & 0 \end{bmatrix}\), reflection across \(y = -x\); \(RF = \begin{bmatrix} 0 & 1 \\ 1 & 0 \end{bmatrix}\), reflection across \(y = x\).
Review: ·
67Let \(T : \mathbb{R}^3 \to \mathbb{R}^2\) have matrix \(A = \begin{bmatrix} 1 & 2 & 3 \\ 4 & 5 & 6 \end{bmatrix}\) and let \(S : \mathbb{R}^2 \to \mathbb{R}^3\) have matrix \(A^T\). Decide whether each is one-to-one and whether each is onto, and find the kernels.
Solution
\(\operatorname{rank}A = 2\) (the rows are not proportional), so \(\operatorname{rank}A^T = 2\) as well.
\(T\). Onto: the range has dimension 2 \(= \dim\mathbb{R}^2\). Not one-to-one: nullity \(= 3 - 2 = 1\). Kernel: \(R_2 - 4R_1\) gives \((0, -3, -6)\), so \(x_2 = -2x_3\), \(x_1 = -2x_2 - 3x_3 = x_3\): \(\ker T = \operatorname{span}\{(1, -2, 1)\}\). Check: \(1 - 4 + 3 = 0\), \(4 - 10 + 6 = 0\).
\(S\). One-to-one: nullity \(= 2 - 2 = 0\), \(\ker S = \{\mathbf{0}\}\). Not onto: the range is the 2-dimensional column space of \(A^T\) (the row space of \(A\)) inside \(\mathbb{R}^3\); it is the plane orthogonal to \(\ker T\), i.e. \(x - 2y + z = 0\).
No linear map \(\mathbb{R}^3 \to \mathbb{R}^2\) can be one-to-one and none \(\mathbb{R}^2 \to \mathbb{R}^3\) can be onto; the two statements are the same fact read through transposes.
\(T\): onto, not one-to-one, kernel \(\operatorname{span}\{(1,-2,1)\}\); \(S\): one-to-one, not onto, range the plane \(x - 2y + z = 0\).
Review: ·
68Using the isomorphism \(P_3 \cong \mathbb{R}^4\) given by coefficient vectors, decide whether \(1 + x,\ x + x^2,\ x^2 + x^3,\ x^3 + 1\) form a basis of \(P_3\). If not, find a dependence relation and the dimension of their span.
Solution
Coefficient vectors (constant, \(x\), \(x^2\), \(x^3\)): \((1, 1, 0, 0), (0, 1, 1, 0), (0, 0, 1, 1), (1, 0, 0, 1)\). The isomorphism preserves independence, so test the \(4\times 4\) matrix with these columns:
\[\det\begin{bmatrix} 1 & 0 & 0 & 1 \\ 1 & 1 & 0 & 0 \\ 0 & 1 & 1 & 0 \\ 0 & 0 & 1 & 1 \end{bmatrix} = 1\cdot\begin{vmatrix} 1 & 0 & 0 \\ 1 & 1 & 0 \\ 0 & 1 & 1 \end{vmatrix} - 1\cdot\begin{vmatrix} 1 & 1 & 0 \\ 0 & 1 & 1 \\ 0 & 0 & 1 \end{vmatrix} = 1 - 1 = 0\](expanding along the first row; both minors are triangular with determinant 1). So the four polynomials are dependent and do not form a basis.
Relation. Alternating signs cancel everything: \((1 + x) - (x + x^2) + (x^2 + x^3) - (x^3 + 1) = 0\). Any three of them are independent (drop the last; the remaining coefficient vectors have a triangular \(3\times 3\) block), so the span has dimension 3: it is \(\{p : p(-1) = 0\}\)? Check: each of the four vanishes at \(x = -1\) (\(1 - 1\), \(-1 + 1\), \(1 - 1\), \(-1 + 1\)), and that kernel has dimension 3, so the span is exactly the polynomials in \(P_3\) with a root at \(-1\).
Dependent: \((1+x) - (x+x^2) + (x^2+x^3) - (x^3+1) = 0\); the span is 3-dimensional, all \(p \in P_3\) with \(p(-1) = 0\).
Review: ·
69Let \(U = \operatorname{span}\{(1, 0, 1, 0), (0, 1, 0, 1)\}\) and \(W = \operatorname{span}\{(1, 1, 1, 1), (1, 0, 0, 1)\}\) in \(\mathbb{R}^4\). Find \(\dim(U + W)\) and \(\dim(U \cap W)\), and a basis of \(U \cap W\).
Solution
\(U + W\) is spanned by all four vectors. Note \((1, 1, 1, 1) = (1, 0, 1, 0) + (0, 1, 0, 1) \in U\). Is \((1, 0, 0, 1) \in U\)? Vectors of \(U\) have the form \((a, b, a, b)\); \((1, 0, 0, 1)\) would need \(a = 1\) and \(a = 0\). No. So
\[U + W = \operatorname{span}\{(1,0,1,0), (0,1,0,1), (1,0,0,1)\}\] \[\dim(U + W) = 3.\]By the dimension formula, \(\dim(U\cap W) = \dim U + \dim W - \dim(U + W) = 2 + 2 - 3 = 1\).
Basis of \(U \cap W\). A vector of \(W\) is \(c(1,1,1,1) + d(1,0,0,1) = (c + d, c, c, c + d)\); it lies in \(U\) iff it has the form \((a, b, a, b)\), i.e. \(c + d = c\) and \(c = c + d\), so \(d = 0\). Hence \(U\cap W = \operatorname{span}\{(1, 1, 1, 1)\}\), confirming dimension 1.
Geometrically: two planes through the origin in \(\mathbb{R}^4\) generically meet only at the origin; these two share a line because they live inside a common 3-dimensional subspace.
\(\dim(U + W) = 3\), \(\dim(U\cap W) = 1\), \(U\cap W = \operatorname{span}\{(1,1,1,1)\}\).
Review:
70Let \(T(x, y) = (3x + y, x + 3y)\). Find the matrix of \(T\) with respect to the basis \(\mathcal{B} = \{(1, 1), (1, -1)\}\), and interpret the result geometrically.
Solution
Apply \(T\) to the basis vectors and express the results in the basis:
\[T(1, 1) = (4, 4) = 4(1, 1) + 0(1, -1)\] \[T(1, -1) = (2, -2) = 0(1, 1) + 2(1, -1).\] \[[T]_{\mathcal{B}} = \begin{bmatrix} 4 & 0 \\ 0 & 2 \end{bmatrix}.\]The basis vectors are eigenvectors: \(T\) stretches by 4 along the line \(y = x\) and by 2 along \(y = -x\). In the standard basis \(T\) has the matrix \(A = \begin{bmatrix} 3 & 1 \\ 1 & 3 \end{bmatrix}\), and with \(S = \begin{bmatrix} 1 & 1 \\ 1 & -1 \end{bmatrix}\) we have \(S^{-1}AS = \operatorname{diag}(4, 2)\): the change of basis diagonalizes \(A\). Check with the trace and determinant: \(3 + 3 = 4 + 2\) and \(9 - 1 = 8 = 4\cdot 2\).
Geometrically \(T\) maps the unit circle to an ellipse with semi-axes 4 along \((1, 1)\) and 2 along \((1, -1)\); areas are multiplied by \(\det A = 8\).
\([T]_{\mathcal{B}} = \operatorname{diag}(4, 2)\): stretch by 4 along \(y = x\), by 2 along \(y = -x\).
Review: ·
71Let \(D : P_3 \to P_3\) be differentiation. Show that \(D^4 = 0\) but \(D^3 \ne 0\). Find \(\ker D^2\) and \(\operatorname{range}D^2\), and check rank–nullity for \(D^2\).
Solution
Differentiating a polynomial of degree at most 3 four times gives 0, so \(D^4 = 0\); but \(D^3(x^3) = 6 \ne 0\), so \(D^3 \ne 0\). \(D\) is nilpotent of index 4, and its only eigenvalue is 0 (with the single eigenvector \(1\), up to scaling).
\(D^2(a + bx + cx^2 + dx^3) = 2c + 6dx\). This vanishes iff \(c = d = 0\):
\[\ker D^2 = \{a + bx\} = P_1 \quad(\dim 2)\] \[\operatorname{range}D^2 = \{2c + 6dx\} = P_1 \quad(\dim 2).\]Rank–nullity: \(2 + 2 = 4 = \dim P_3\). Here kernel and range coincide, which is possible only for a nilpotent map (and it means \(D^2\circ D^2 = D^4 = 0\), as \(\operatorname{range}D^2 \subseteq \ker D^2\) requires). In the basis \(1, x, x^2, x^3\) the matrix of \(D\) has \(1, 2, 3\) on the superdiagonal and the matrix of \(D^2\) has \(2, 6\) two places above the diagonal.
\(D^4 = 0\), \(D^3(x^3) = 6\); \(\ker D^2 = \operatorname{range}D^2 = P_1\), each of dimension 2.
Review: ·
72Let \(T : V \to V\) be linear with \(T^2 = T\). Prove that every \(\mathbf{v} \in V\) can be written uniquely as \(\mathbf{v} = \mathbf{k} + \mathbf{r}\) with \(\mathbf{k} \in \ker T\) and \(\mathbf{r} \in \operatorname{range}T\), and that \(\ker T \cap \operatorname{range}T = \{\mathbf{0}\}\).
Solution
Existence. Write \(\mathbf{v} = (\mathbf{v} - T\mathbf{v}) + T\mathbf{v}\). The second piece is in the range. For the first, \(T(\mathbf{v} - T\mathbf{v}) = T\mathbf{v} - T^2\mathbf{v} = T\mathbf{v} - T\mathbf{v} = \mathbf{0}\), so it is in the kernel.
Trivial intersection. If \(\mathbf{w} \in \ker T\cap\operatorname{range}T\), then \(\mathbf{w} = T\mathbf{u}\) for some \(\mathbf{u}\) and \(T\mathbf{w} = \mathbf{0}\). But \(T\mathbf{w} = T^2\mathbf{u} = T\mathbf{u} = \mathbf{w}\), so \(\mathbf{w} = \mathbf{0}\).
Uniqueness. If \(\mathbf{k} + \mathbf{r} = \mathbf{k}' + \mathbf{r}'\), then \(\mathbf{k} - \mathbf{k}' = \mathbf{r}' - \mathbf{r}\) lies in both the kernel and the range, hence is \(\mathbf{0}\).
So \(V = \ker T \oplus \operatorname{range}T\), and \(T\) is the projection onto its range along its kernel: it acts as the identity on the range (\(T\mathbf{r} = T^2\mathbf{u} = T\mathbf{u} = \mathbf{r}\)) and as zero on the kernel. In a basis adapted to the two pieces its matrix is \(\operatorname{diag}(1, \dots, 1, 0, \dots, 0)\), so every idempotent is diagonalizable with \(\operatorname{rank}T = \operatorname{tr}T\). The projection is orthogonal exactly when the two pieces are perpendicular, i.e. when the matrix is also symmetric.
\(\mathbf{v} = (\mathbf{v} - T\mathbf{v}) + T\mathbf{v}\); a vector in both pieces satisfies \(\mathbf{w} = T\mathbf{w} = \mathbf{0}\); hence \(V = \ker T \oplus \operatorname{range}T\).
Review: ·
73A \(5\times 7\) matrix \(A\) has nullity 4. Find \(\operatorname{rank}A\), decide whether \(A\mathbf{x} = \mathbf{b}\) is solvable for every \(\mathbf{b} \in \mathbb{R}^5\), and find the rank and nullity of \(A^T\). What can you say about \(A^TA\) and \(AA^T\)?
Solution
Rank–nullity on the 7 columns: \(\operatorname{rank}A = 7 - 4 = 3\).
\(A\mathbf{x} = \mathbf{b}\) is solvable for every \(\mathbf{b}\) iff \(\operatorname{Col}A = \mathbb{R}^5\), i.e. rank 5. The rank is only 3, so the column space is a 3-dimensional subspace of \(\mathbb{R}^5\) and most right-hand sides give inconsistent systems. When a system is consistent it has infinitely many solutions (4 free variables).
\(A^T\) is \(7\times 5\) with \(\operatorname{rank}A^T = \operatorname{rank}A = 3\), so its nullity is \(5 - 3 = 2\): the left null space of \(A\) is 2-dimensional, which is the number of independent consistency conditions a right-hand side must satisfy.
\(A^TA\) is \(7\times 7\) with the same null space as \(A\) (nullity 4), hence rank 3 and singular; \(AA^T\) is \(5\times 5\) with null space \(\operatorname{Nul}A^T\) (nullity 2), rank 3, also singular. Both are symmetric positive semidefinite.
\(\operatorname{rank}A = 3\); not solvable for all \(\mathbf{b}\) (rank \(\lt 5\)); \(A^T\) has rank 3, nullity 2; \(A^TA\) and \(AA^T\) both have rank 3 and are singular.
Review: ·
74Find \(k\) such that \((1, 2, k)\) lies in \(\operatorname{span}\{(1, 0, 1), (0, 1, 1)\}\). Then find an equation for the plane spanned by the two vectors and confirm the answer.
Solution
\((1, 2, k) = a(1, 0, 1) + b(0, 1, 1) = (a, b, a + b)\) requires \(a = 1\), \(b = 2\), and then \(k = a + b = 3\).
Plane equation. A normal vector is the cross product \((1, 0, 1)\times(0, 1, 1) = (0\cdot 1 - 1\cdot 1,\ 1\cdot 0 - 1\cdot 1,\ 1\cdot 1 - 0\cdot 0) = (-1, -1, 1)\), so the span is the plane \(-x - y + z = 0\), i.e. \(z = x + y\). Both spanning vectors satisfy it (\(1 = 1 + 0\), \(1 = 0 + 1\)), and \((1, 2, k)\) lies on it iff \(k = 1 + 2 = 3\). Equivalently \(\det\begin{bmatrix} 1 & 0 & 1 \\ 0 & 1 & 2 \\ 1 & 1 & k \end{bmatrix} = 1(k - 2) - 0 + 1(0 - 1) = k - 3\) vanishes iff \(k = 3\).
\(k = 3\); the span is the plane \(z = x + y\).
Review: ·
Challenge 3: eigenvalues and special matrices
Linear Algebra · Challenge problems 75 to 94
Problems 75 to 94
One hundred harder problems, still within the scope of a first linear algebra course: proofs, parameters, multi-step computations and applications. Each opens to a complete solution with every step shown and the final answer highlighted. Expect to need pencil and paper, and use the Review links to go back to the relevant tab.
75Find the eigenvalues, their algebraic and geometric multiplicities, and decide whether \(A = \begin{bmatrix} 2 & 1 & 0 \\ 0 & 2 & 0 \\ 0 & 0 & 3 \end{bmatrix}\) is diagonalizable. If not, find an invertible \(P\) and the simplest matrix \(J\) with \(A = PJP^{-1}\).
Solution
\(A\) is upper triangular: eigenvalues \(2\) (algebraic multiplicity 2) and \(3\) (multiplicity 1).
\(E_2 = \operatorname{Nul}(A - 2I)\), with \(A - 2I = \begin{bmatrix} 0 & 1 & 0 \\ 0 & 0 & 0 \\ 0 & 0 & 1 \end{bmatrix}\) of rank 2: nullity 1, \(E_2 = \operatorname{span}\{\mathbf{e}_1\}\). Geometric multiplicity \(1 \lt 2\), so \(A\) is not diagonalizable. \(E_3\): \(A - 3I = \begin{bmatrix} -1 & 1 & 0 \\ 0 & -1 & 0 \\ 0 & 0 & 0 \end{bmatrix}\) gives \(v_1 = v_2 = 0\): \(E_3 = \operatorname{span}\{\mathbf{e}_3\}\).
The best we can do is a Jordan form: take the generalized eigenvector \(\mathbf{w}\) with \((A - 2I)\mathbf{w} = \mathbf{e}_1\), e.g. \(\mathbf{w} = \mathbf{e}_2\). With \(P = [\mathbf{e}_1\ \mathbf{e}_2\ \mathbf{e}_3] = I\),
\[A = J = \begin{bmatrix} 2 & 1 & 0 \\ 0 & 2 & 0 \\ 0 & 0 & 3 \end{bmatrix}\]is already in Jordan form: a \(2\times 2\) block for \(\lambda = 2\) and a \(1\times 1\) block for \(\lambda = 3\). Consequence for powers: \(A^n\) has \(n\cdot 2^{n-1}\) in position \((1,2)\), the signature of a repeated eigenvalue without enough eigenvectors.
\(\lambda = 2\) (alg. 2, geom. 1), \(\lambda = 3\) (1, 1); not diagonalizable; \(A\) is itself a Jordan form.
Review: ·
76Let \(A = \begin{bmatrix} 1 & 2 & 2 \\ 2 & 1 & 2 \\ 2 & 2 & 1 \end{bmatrix}\). Find its eigenvalues, an orthonormal eigenbasis, and a closed formula for \(A^k\).
Solution
\(A = 2J - I\) with \(J\) the all-ones matrix. \(J\) has eigenvalues \(3, 0, 0\), so \(A\) has eigenvalues \(2\cdot 3 - 1 = 5\) and \(2\cdot 0 - 1 = -1\) (twice).
\(E_5 = \operatorname{span}\{(1,1,1)\}\). \(E_{-1}\): \(A + I = 2J\), so the condition is \(x + y + z = 0\); an orthonormal basis of this plane (Gram–Schmidt on \((1,-1,0)\), \((1,0,-1)\)) is \(\tfrac{1}{\sqrt2}(1, -1, 0)\), \(\tfrac{1}{\sqrt6}(1, 1, -2)\). Orthonormal eigenbasis:
\[\mathbf{q}_1 = \tfrac{1}{\sqrt3}(1, 1, 1)\] \[\mathbf{q}_2 = \tfrac{1}{\sqrt2}(1, -1, 0)\] \[\mathbf{q}_3 = \tfrac{1}{\sqrt6}(1, 1, -2).\]Powers. The projection onto \(E_5\) is \(\mathbf{q}_1\mathbf{q}_1^T = \tfrac13J\) and the projection onto \(E_{-1}\) is \(I - \tfrac13J\). Hence
\[A^k = 5^k\cdot\tfrac13J + (-1)^k\left(I - \tfrac13J\right) = \frac{5^k - (-1)^k}{3}J + (-1)^kI.\]Check \(k = 1\): \(\tfrac{5 + 1}{3}J - I = 2J - I = A\). Check \(k = 2\): \(\tfrac{25 - 1}{3}J + I = 8J + I\), and directly \(A^2 = (2J - I)^2 = 4J^2 - 4J + I = 12J - 4J + I = 8J + I\).
\(\lambda = 5, -1, -1\); \(A^k = \frac{5^k - (-1)^k}{3}J + (-1)^kI\).
Review: ·
77Find a matrix \(B\) with \(B^2 = A = \begin{bmatrix} 5 & 4 \\ 4 & 5 \end{bmatrix}\). How many real square roots does \(A\) have?
Solution
Diagonalize: \(p(\lambda) = \lambda^2 - 10\lambda + 9 = (\lambda - 9)(\lambda - 1)\); eigenvectors \((1, 1)\) for 9 and \((1, -1)\) for 1. So \(A = PDP^{-1}\) with \(P = \begin{bmatrix} 1 & 1 \\ 1 & -1 \end{bmatrix}\), \(D = \operatorname{diag}(9, 1)\). Define
\[B = P\operatorname{diag}(3, 1)P^{-1} = \frac12\begin{bmatrix} 1 & 1 \\ 1 & -1 \end{bmatrix}\begin{bmatrix} 3 & 0 \\ 0 & 1 \end{bmatrix}\begin{bmatrix} 1 & 1 \\ 1 & -1 \end{bmatrix} = \begin{bmatrix} 2 & 1 \\ 1 & 2 \end{bmatrix}.\]Then \(B^2 = P\operatorname{diag}(9, 1)P^{-1} = A\). Check directly: \(\begin{bmatrix} 2 & 1 \\ 1 & 2 \end{bmatrix}^2 = \begin{bmatrix} 5 & 4 \\ 4 & 5 \end{bmatrix}\).
Counting. Any square root \(B\) commutes with \(A = B^2\), so it preserves the eigenspaces of \(A\) (which are one-dimensional, since the eigenvalues are distinct) and is therefore diagonal in the same basis: \(B = P\operatorname{diag}(\pm3, \pm1)P^{-1}\). That gives exactly four real square roots: \(\pm\begin{bmatrix} 2 & 1 \\ 1 & 2 \end{bmatrix}\) and \(\pm\begin{bmatrix} 1 & 2 \\ 2 & 1 \end{bmatrix}\) (the latter from \(\operatorname{diag}(3, -1)\)). Only \(\begin{bmatrix} 2 & 1 \\ 1 & 2 \end{bmatrix}\) is positive definite, the "principal" square root.
\(B = \begin{bmatrix} 2 & 1 \\ 1 & 2 \end{bmatrix}\); four real square roots in all, \(\pm\begin{bmatrix} 2 & 1 \\ 1 & 2 \end{bmatrix}\), \(\pm\begin{bmatrix} 1 & 2 \\ 2 & 1 \end{bmatrix}\).
Review:
78For \(A = \begin{bmatrix} 1 & 2 \\ 3 & 4 \end{bmatrix}\), verify the Cayley–Hamilton theorem (\(A\) satisfies its own characteristic polynomial) and use it to express \(A^{-1}\) and \(A^3\) as combinations of \(A\) and \(I\).
Solution
\(p(\lambda) = \lambda^2 - (\operatorname{tr}A)\lambda + \det A = \lambda^2 - 5\lambda - 2\). Compute
\[A^2 = \begin{bmatrix} 7 & 10 \\ 15 & 22 \end{bmatrix}\] \[A^2 - 5A - 2I = \begin{bmatrix} 7 - 5 - 2 & 10 - 10 \\ 15 - 15 & 22 - 20 - 2 \end{bmatrix} = 0.\]Inverse. From \(A^2 - 5A = 2I\), factor \(A(A - 5I) = 2I\), so
\[A^{-1} = \tfrac12(A - 5I) = \tfrac12\begin{bmatrix} -4 & 2 \\ 3 & -1 \end{bmatrix} = \begin{bmatrix} -2 & 1 \\ \tfrac32 & -\tfrac12 \end{bmatrix}\]agreeing with the \(2\times 2\) formula \(\frac{1}{-2}\begin{bmatrix} 4 & -2 \\ -3 & 1 \end{bmatrix}\).
Cube. \(A^2 = 5A + 2I\), so \(A^3 = 5A^2 + 2A = 5(5A + 2I) + 2A = 27A + 10I = \begin{bmatrix} 37 & 54 \\ 81 & 118 \end{bmatrix}\). Check one entry directly: \((A^3)_{11} = (A^2A)_{11} = 7\cdot 1 + 10\cdot 3 = 37\). Every power of a \(2\times 2\) matrix is a combination of \(A\) and \(I\); in general \(A^n\) lies in the span of \(I, A, \dots, A^{n-1}\).
\(A^2 - 5A - 2I = 0\); \(A^{-1} = \tfrac12(A - 5I)\); \(A^3 = 27A + 10I\).
Review: ·
79Let \(A = \begin{bmatrix} 1 & -2 \\ 2 & 1 \end{bmatrix}\). Find its eigenvalues and eigenvectors, write \(A\) as a scalar times a rotation matrix, and describe \(A^n\mathbf{x}\) geometrically.
Solution
\(\operatorname{tr}A = 2\), \(\det A = 5\): \(\lambda^2 - 2\lambda + 5 = 0\), \(\lambda = 1 \pm 2i\). For \(\lambda = 1 + 2i\), the first row of \(A - \lambda I\) is \((-2i, -2)\), so \(-2iv_1 - 2v_2 = 0\), \(v_2 = -iv_1\): eigenvector \((1, -i)\); for \(1 - 2i\) the conjugate \((1, i)\).
Scalar times rotation. \(|\lambda| = \sqrt{1 + 4} = \sqrt5\) and
\[A = \sqrt5\begin{bmatrix} \tfrac{1}{\sqrt5} & -\tfrac{2}{\sqrt5} \\ \tfrac{2}{\sqrt5} & \tfrac{1}{\sqrt5} \end{bmatrix} = \sqrt5\begin{bmatrix} \cos\theta & -\sin\theta \\ \sin\theta & \cos\theta \end{bmatrix}\] \[\theta = \arctan2 \approx 63.4^\circ.\]This is exactly the matrix of multiplication by the complex number \(1 + 2i = \sqrt5e^{i\theta}\) acting on \(\mathbb{R}^2 \cong \mathbb{C}\).
Dynamics. \(A^n = 5^{n/2}R_{n\theta}\): each application rotates by \(63.4^\circ\) and stretches by \(\sqrt5\), so \(A^n\mathbf{x}\) spirals outward. Not stable, since \(|\lambda| = \sqrt5 \gt 1\). A real matrix with complex eigenvalues \(a \pm bi\) is always similar to \(\begin{bmatrix} a & -b \\ b & a \end{bmatrix}\), a rotation-scaling; here it already has that form.
\(\lambda = 1 \pm 2i\), eigenvectors \((1, \mp i)\); \(A = \sqrt5R_{\theta}\) with \(\tan\theta = 2\); \(A^n\mathbf{x}\) spirals out, scaling by \(5^{n/2}\).
Review: · ·
80The Fibonacci numbers satisfy \(F_{n+1} = F_n + F_{n-1}\), \(F_0 = 0\), \(F_1 = 1\). Write the recurrence as \(\mathbf{x}_{n+1} = A\mathbf{x}_n\), diagonalize \(A\), derive Binet’s formula, and compute \(F_{10}\).
Solution
With \(\mathbf{x}_n = (F_{n+1}, F_n)\): \(\mathbf{x}_{n+1} = \begin{bmatrix} 1 & 1 \\ 1 & 0 \end{bmatrix}\mathbf{x}_n = A\mathbf{x}_n\), so \(\mathbf{x}_n = A^n\mathbf{x}_0\) with \(\mathbf{x}_0 = (1, 0)\).
\(p(\lambda) = \lambda^2 - \lambda - 1\), roots \(\varphi = \tfrac{1 + \sqrt5}{2} \approx 1.618\) and \(\psi = \tfrac{1 - \sqrt5}{2} \approx -0.618\) (so \(\varphi + \psi = 1\), \(\varphi\psi = -1\), \(\varphi - \psi = \sqrt5\)). Eigenvectors: from the second row of \(A - \lambda I\), \(v_1 = \lambda v_2\), so \((\varphi, 1)\) and \((\psi, 1)\).
Write \(\mathbf{x}_0 = (1, 0) = c_1(\varphi, 1) + c_2(\psi, 1)\): \(c_1 + c_2 = 0\) and \(c_1\varphi + c_2\psi = 1\) give \(c_1 = \tfrac{1}{\sqrt5}\), \(c_2 = -\tfrac{1}{\sqrt5}\). Then \(\mathbf{x}_n = \tfrac{1}{\sqrt5}\big(\varphi^n(\varphi, 1) - \psi^n(\psi, 1)\big)\), whose second component is
\[F_n = \frac{\varphi^n - \psi^n}{\sqrt5} \quad(\text{Binet}).\]Since \(|\psi| \lt 1\), \(F_n\) is the integer nearest \(\varphi^n/\sqrt5\), and \(F_{n+1}/F_n \to \varphi\). For \(n = 10\): \(\varphi^{10} \approx 122.99\), \(\varphi^{10}/\sqrt5 \approx 55.0\), so \(F_{10} = 55\) (check by listing: 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55).
\(A = \begin{bmatrix} 1 & 1 \\ 1 & 0 \end{bmatrix}\), eigenvalues \(\varphi, \psi\); \(F_n = (\varphi^n - \psi^n)/\sqrt5\); \(F_{10} = 55\).
Review:
81A Markov chain on three states has transition matrix \(M = \begin{bmatrix} 0.5 & 0.2 & 0.3 \\ 0.3 & 0.6 & 0.1 \\ 0.2 & 0.2 & 0.6 \end{bmatrix}\) (columns sum to 1). Find the steady state, explain why the answer could have been predicted, and find the other eigenvalues.
Solution
Solve \((M - I)\mathbf{v} = \mathbf{0}\):
\[M - I = \begin{bmatrix} -0.5 & 0.2 & 0.3 \\ 0.3 & -0.4 & 0.1 \\ 0.2 & 0.2 & -0.4 \end{bmatrix}.\]Try \(\mathbf{v} = (1, 1, 1)\): each row sums to \(0\) (\(-0.5 + 0.2 + 0.3\), \(0.3 - 0.4 + 0.1\), \(0.2 + 0.2 - 0.4\)), so \(M\mathbf{1} = \mathbf{1}\). Normalizing to sum 1, the steady state is \((\tfrac13, \tfrac13, \tfrac13)\).
Why predictable. The rows of \(M\) also sum to 1 (\(0.5 + 0.2 + 0.3 = 1\), etc.): \(M\) is doubly stochastic. For such a matrix the uniform distribution is always stationary, since \((M\mathbf{1})_i = \sum_j m_{ij} = 1\). (Columns summing to 1 guarantee the eigenvalue 1 exists; rows summing to 1 identify its eigenvector.)
Other eigenvalues. \(\operatorname{tr}M = 1.7 = 1 + \lambda_2 + \lambda_3\) and \(\det M = 0.5(0.36 - 0.02) - 0.2(0.18 - 0.02) + 0.3(0.06 - 0.12) = 0.17 - 0.032 - 0.018 = 0.12 = 1\cdot\lambda_2\lambda_3\). So \(\lambda_2 + \lambda_3 = 0.7\) and \(\lambda_2\lambda_3 = 0.12\): \(\lambda = 0.4\) and \(0.3\). Both have modulus less than 1, so every initial distribution converges to the uniform one, the slowest error decaying like \(0.4^t\).
Steady state \((\tfrac13, \tfrac13, \tfrac13)\) (doubly stochastic); other eigenvalues \(0.4\) and \(0.3\).
Review: ·
82Prove that eigenvectors of a real symmetric matrix belonging to different eigenvalues are orthogonal. Then prove that every eigenvalue of a real orthogonal matrix has absolute value 1.
Solution
Symmetric. Let \(A\mathbf{v}_1 = \lambda_1\mathbf{v}_1\), \(A\mathbf{v}_2 = \lambda_2\mathbf{v}_2\) with \(\lambda_1 \ne \lambda_2\). Then
\[\lambda_1({\mathbf{v}_1\cdot \mathbf{v}_2}) = (A\mathbf{v}_1)\cdot\mathbf{v}_2 = (A\mathbf{v}_1)^T\mathbf{v}_2 = \mathbf{v}_1^TA^T\mathbf{v}_2 = \mathbf{v}_1^TA\mathbf{v}_2 = \lambda_2({\mathbf{v}_1\cdot \mathbf{v}_2}).\]So \((\lambda_1 - \lambda_2)({\mathbf{v}_1\cdot \mathbf{v}_2}) = 0\), and since \(\lambda_1 \ne \lambda_2\), \({\mathbf{v}_1\cdot \mathbf{v}_2} = 0\). (The step \(A^T = A\) is where symmetry enters.)
Orthogonal. Let \(Q\mathbf{v} = \lambda\mathbf{v}\) with \(\mathbf{v} \ne \mathbf{0}\), allowing complex \(\lambda\) and \(\mathbf{v}\). Orthogonal matrices preserve the complex length: \(\|Q\mathbf{v}\|^2 = (Q\mathbf{v})^*(Q\mathbf{v}) = \mathbf{v}^*Q^TQ\mathbf{v} = \mathbf{v}^*\mathbf{v} = \|\mathbf{v}\|^2\) (for real \(Q\), \(Q^* = Q^T\)). But also \(\|Q\mathbf{v}\|^2 = \|\lambda\mathbf{v}\|^2 = |\lambda|^2\|\mathbf{v}\|^2\). Hence \(|\lambda|^2 = 1\).
Example: the rotation \(\begin{bmatrix} 0 & -1 \\ 1 & 0 \end{bmatrix}\) has eigenvalues \(\pm i\), on the unit circle but not real; a reflection has \(\pm1\). For a \(3\times 3\) rotation (\(\det Q = 1\)) the real eigenvalue must be \(+1\): the axis.
\((\lambda_1 - \lambda_2){\mathbf{v}_1\cdot \mathbf{v}_2} = 0\) using \(A^T = A\); \(\|Q\mathbf{v}\| = \|\mathbf{v}\|\) forces \(|\lambda| = 1\).
Review:
83Show that every \(3\times 3\) rotation matrix \(Q\) (orthogonal with \(\det Q = 1\)) has \(1\) as an eigenvalue. Find the axis and angle of \(Q = \begin{bmatrix} 0 & 0 & 1 \\ 1 & 0 & 0 \\ 0 & 1 & 0 \end{bmatrix}\).
Solution
Using \(Q^TQ = I\) and \(\det Q = 1\):
\[\det(Q - I) = \det(Q - QQ^T) = \det\big(Q(I - Q^T)\big) = \det Q\det(I - Q)^T = \det(I - Q) = (-1)^3\det(Q - I) = -\det(Q - I).\]So \(\det(Q - I) = 0\): \(\lambda = 1\) is an eigenvalue, and its eigenvector is a line fixed by \(Q\), the axis of rotation. (The argument needs odd dimension and \(\det Q = +1\).)
The given \(Q\). It permutes coordinates cyclically: \(Q(x, y, z) = (z, x, y)\). Solve \((Q - I)\mathbf{v} = \mathbf{0}\): \(v_3 = v_1\), \(v_1 = v_2\), \(v_2 = v_3\), so the axis is \(\operatorname{span}\{(1, 1, 1)\}\).
The angle \(\theta\) satisfies \(\operatorname{tr}Q = 1 + 2\cos\theta\) (the eigenvalues are \(1, e^{\pm i\theta}\)). Here \(\operatorname{tr}Q = 0\), so \(\cos\theta = -\tfrac12\), \(\theta = 120^\circ\). Indeed \(Q^3 = I\): three cyclic permutations return every coordinate home. The direction of rotation is found by checking \(Q\mathbf{e}_1 = \mathbf{e}_2\): looking down the axis from \((1,1,1)\), the rotation carries the \(x\)-axis to the \(y\)-axis, counterclockwise.
\(\det(Q - I) = -\det(Q - I)\); axis \((1,1,1)\), angle \(120^\circ\) (\(\operatorname{tr}Q = 0 = 1 + 2\cos\theta\)).
Review: ·
84Classify the quadratic form \(q(x, y, z) = x^2 + y^2 + z^2 + 2xy + 2yz + 2xz\), find its principal axes, and describe the surface \(q = 1\).
Solution
The matrix of \(q\) has 1 on the diagonal and 1 (half of each cross coefficient 2) off the diagonal: \(A = J\), the all-ones matrix. Its eigenvalues are \(3\) (eigenvector \((1,1,1)\)) and \(0, 0\) (the plane \(x + y + z = 0\)).
In fact \(q = (x + y + z)^2\) by inspection, which says the same thing: along the axis \(\tfrac{1}{\sqrt3}(1,1,1)\) the form is \(3u^2\) (\(u = \tfrac{x + y + z}{\sqrt3}\)), and in the two perpendicular directions it is zero.
Classification: eigenvalues \(3, 0, 0\), none negative but two zero: positive semidefinite, not definite (\(q(1, -1, 0) = 0\) with \((1,-1,0) \ne \mathbf{0}\)).
Surface \(q = 1\): \((x + y + z)^2 = 1\) means \(x + y + z = \pm1\), a pair of parallel planes, not an ellipsoid. A definite form gives an ellipsoid, one zero eigenvalue a cylinder (elliptic), two zero eigenvalues a pair of planes. Principal axes: any orthonormal basis of the plane \(x + y + z = 0\) together with \((1,1,1)/\sqrt3\), e.g. \(\tfrac{1}{\sqrt2}(1,-1,0)\), \(\tfrac{1}{\sqrt6}(1,1,-2)\).
\(A = J\), eigenvalues \(3, 0, 0\): positive semidefinite; \(q = (x+y+z)^2\), and \(q = 1\) is the pair of planes \(x + y + z = \pm1\).
Review:
85For which \(k\) is \(q(x, y) = 2x^2 + 2kxy + 8y^2\) positive definite? Find the eigenvalues at the boundary value \(k = 4\), and describe the curve \(q = 1\) for \(k = 0\), \(k = 4\) and \(k = 5\).
Solution
Matrix \(A = \begin{bmatrix} 2 & k \\ k & 8 \end{bmatrix}\). Positive definite iff both leading principal minors are positive: \(2 \gt 0\) and \(\det A = 16 - k^2 \gt 0\), i.e. \(|k| \lt 4\). (Equivalently both eigenvalues positive: the trace \(10\) is positive, so this is the same as \(\det \gt 0\).)
\(k = 4\): \(\det A = 0\), eigenvalues from \(\lambda^2 - 10\lambda + 0 = 0\): \(\lambda = 10\) and \(0\). Eigenvector for 0: \(2x + 4y = 0\), direction \((2, -1)\); for 10: \((1, 2)\). Here \(q = 2(x + 2y)^2\), positive semidefinite.
- \(k = 0\) \(2x^2 + 8y^2 = 1\): an ellipse with semi-axes \(1/\sqrt2\) and \(1/\sqrt8\) along the coordinate axes.
- \(k = 4\) \(2(x + 2y)^2 = 1\): the pair of parallel lines \(x + 2y = \pm\tfrac{1}{\sqrt2}\) (the ellipse has stretched to infinite length along \((2, -1)\)).
- \(k = 5\) \(\det A = -9 \lt 0\): indefinite, eigenvalues \(5 \pm\sqrt{34}\) of opposite sign; the curve is a hyperbola whose asymptotes are the directions where \(q = 0\): \(2x^2 + 10xy + 8y^2 = 2(x + y)(x + 4y) = 0\).
Positive definite iff \(|k| \lt 4\); at \(k = 4\) eigenvalues \(10, 0\); \(q = 1\) is an ellipse (\(k = 0\)), two parallel lines (\(k = 4\)), a hyperbola (\(k = 5\)).
Review:
86Diagonalize \(A = \begin{bmatrix} 4 & 1 \\ 2 & 3 \end{bmatrix}\) and find a closed formula for \(A^n\). Then compute \(\lim_{n\to\infty}A^n/5^n\).
Solution
\(\lambda^2 - 7\lambda + 10 = (\lambda - 5)(\lambda - 2)\). Eigenvectors: \(\lambda = 5\): \(-v_1 + v_2 = 0\), \((1, 1)\); \(\lambda = 2\): \(2v_1 + v_2 = 0\), \((1, -2)\).
\[P = \begin{bmatrix} 1 & 1 \\ 1 & -2 \end{bmatrix},\quad D = \begin{bmatrix} 5 & 0 \\ 0 & 2 \end{bmatrix},\quad P^{-1} = \frac{1}{-3}\begin{bmatrix} -2 & -1 \\ -1 & 1 \end{bmatrix} = \frac13\begin{bmatrix} 2 & 1 \\ 1 & -1 \end{bmatrix}.\] \[A^n = PD^nP^{-1} = \frac13\begin{bmatrix} 1 & 1 \\ 1 & -2 \end{bmatrix}\begin{bmatrix} 5^n & 0 \\ 0 & 2^n \end{bmatrix}\begin{bmatrix} 2 & 1 \\ 1 & -1 \end{bmatrix} = \frac13\begin{bmatrix} 2\cdot5^n + 2^n & 5^n - 2^n \\ 2\cdot5^n - 2\cdot2^n & 5^n + 2\cdot2^n \end{bmatrix}.\]Check \(n = 1\): \(\tfrac13\begin{bmatrix} 12 & 3 \\ 6 & 9 \end{bmatrix} = A\). Check \(n = 0\): \(\tfrac13\begin{bmatrix} 3 & 0 \\ 0 & 3 \end{bmatrix} = I\).
Limit. Dividing by \(5^n\) kills the \((2/5)^n\) terms:
\[\lim_{n\to\infty}\frac{A^n}{5^n} = \frac13\begin{bmatrix} 2 & 1 \\ 2 & 1 \end{bmatrix} = \begin{bmatrix} 1 \\ 1 \end{bmatrix}\cdot\tfrac13\begin{bmatrix} 2 & 1 \end{bmatrix}\]the rank-one projection onto the dominant eigenvector \((1, 1)\) along the other eigenvector (its rows are the left eigenvector \((2, 1)\) of \(A\) for \(\lambda = 5\), scaled). This is the power method in closed form.
\(A^n = \tfrac13\begin{bmatrix} 2\cdot5^n + 2^n & 5^n - 2^n \\ 2\cdot5^n - 2\cdot2^n & 5^n + 2\cdot2^n \end{bmatrix}\); \(A^n/5^n \to \tfrac13\begin{bmatrix} 2 & 1 \\ 2 & 1 \end{bmatrix}\).
Review:
87Let \(A = \begin{bmatrix} 1 & 1 - i \\ 1 + i & 2 \end{bmatrix}\). Show \(A\) is Hermitian, prove \(\mathbf{x}^*A\mathbf{x}\) is real for every \(\mathbf{x} \in \mathbb{C}^2\), and find the eigenvalues and an orthonormal eigenbasis.
Solution
\(A^* = \bar A^T\): conjugating gives \(\begin{bmatrix} 1 & 1 + i \\ 1 - i & 2 \end{bmatrix}\), transposing gives back \(A\). Hermitian.
For any \(\mathbf{x}\), the number \(s = \mathbf{x}^*A\mathbf{x}\) is \(1\times 1\), so \(s = s^T\), and \(\bar s = \overline{\mathbf{x}^*A\mathbf{x}} = (\mathbf{x}^*A\mathbf{x})^* = \mathbf{x}^*A^*\mathbf{x} = \mathbf{x}^*A\mathbf{x} = s\). A number equal to its conjugate is real.
Eigenvalues. \(\operatorname{tr}A = 3\), \(\det A = 2 - (1 - i)(1 + i) = 2 - 2 = 0\): \(\lambda^2 - 3\lambda = 0\), \(\lambda = 0, 3\), both real as Hermitian requires.
\(\lambda = 0\): \(v_1 + (1 - i)v_2 = 0\), take \(\mathbf{v}_1 = (1 - i, -1)\). \(\lambda = 3\): \(-2v_1 + (1 - i)v_2 = 0\), take \(\mathbf{v}_2 = (1 - i, 2)\). Orthogonality with the complex inner product: \(\mathbf{v}_1^*\mathbf{v}_2 = \overline{(1 - i)}(1 - i) + \overline{(-1)}(2) = |1 - i|^2 - 2 = 2 - 2 = 0\). Lengths: \(\|\mathbf{v}_1\|^2 = 2 + 1 = 3\), \(\|\mathbf{v}_2\|^2 = 2 + 4 = 6\). Orthonormal eigenbasis:
\[\mathbf{q}_1 = \tfrac{1}{\sqrt3}(1 - i, -1)\] \[\mathbf{q}_2 = \tfrac{1}{\sqrt6}(1 - i, 2)\] \[A = U\operatorname{diag}(0, 3)U^*,\ U = [\mathbf{q}_1\ \mathbf{q}_2].\]Since \(\lambda = 0\) occurs, \(A\) is singular: it is \(3\) times the projection onto \(\mathbf{q}_2\).
Hermitian; \(\bar s = s\); eigenvalues \(0, 3\) with orthonormal eigenvectors \(\tfrac{1}{\sqrt3}(1-i, -1)\), \(\tfrac{1}{\sqrt6}(1-i, 2)\).
Review:
88Show that \(U = \dfrac{1}{\sqrt2}\begin{bmatrix} 1 & i \\ i & 1 \end{bmatrix}\) is unitary, find its eigenvalues, and verify they lie on the unit circle. Is \(U\) Hermitian? Is \(U^2\)?
Solution
\(U^* = \dfrac{1}{\sqrt2}\begin{bmatrix} 1 & -i \\ -i & 1 \end{bmatrix}\) (conjugate, then transpose; the matrix is symmetric so transposing changes nothing). Then
\[U^*U = \frac12\begin{bmatrix} 1 & -i \\ -i & 1 \end{bmatrix}\begin{bmatrix} 1 & i \\ i & 1 \end{bmatrix} = \frac12\begin{bmatrix} 1 + 1 & i - i \\ -i + i & 1 + 1 \end{bmatrix} = I.\]Unitary. Eigenvalues: \(\operatorname{tr}U = \sqrt2\), \(\det U = \tfrac12(1 - i^2) = 1\): \(\lambda^2 - \sqrt2\lambda + 1 = 0\),
\[\lambda = \frac{\sqrt2 \pm\sqrt{2 - 4}}{2} = \frac{1 \pm i}{\sqrt2} = e^{\pm i\pi/4}\] \[|\lambda| = 1.\]Not Hermitian: \(U^* \ne U\) (the off-diagonal entries are \(-i\), not \(i\)); consistently, its eigenvalues are not real. \(U\) is complex symmetric, which guarantees nothing.
\(U^2\): \(U^2 = \tfrac12\begin{bmatrix} 1 + i^2 & 2i \\ 2i & 1 + i^2 \end{bmatrix} = \begin{bmatrix} 0 & i \\ i & 0 \end{bmatrix}\), with \((U^2)^* = \begin{bmatrix} 0 & -i \\ -i & 0 \end{bmatrix} = -U^2\): skew-Hermitian (and still unitary), eigenvalues \(e^{\pm i\pi/2} = \pm i\), purely imaginary as it should be. \(U\) is a "square root of \(i\sigma_x\)", a standard gate in quantum computing.
\(U^*U = I\); \(\lambda = e^{\pm i\pi/4}\); \(U\) is not Hermitian; \(U^2 = \begin{bmatrix} 0 & i \\ i & 0 \end{bmatrix}\) is skew-Hermitian.
Review:
89(a) Show that \(A = \begin{bmatrix} 1 & 1 \\ 0 & 1 \end{bmatrix}\) and \(I\) have the same eigenvalues but are not similar. (b) Show that \(\begin{bmatrix} 2 & 0 \\ 0 & 3 \end{bmatrix}\) and \(\begin{bmatrix} 3 & 0 \\ 0 & 2 \end{bmatrix}\) are similar, and find \(S\). (c) Are \(A\) and \(A^T\) similar?
Solution
(a) Both have characteristic polynomial \((\lambda - 1)^2\). But if \(A = S^{-1}IS\) for some invertible \(S\), then \(A = S^{-1}S = I\), which is false. The identity is similar only to itself. Equivalently: similar matrices have the same geometric multiplicities, and \(\dim E_1\) is 2 for \(I\) but 1 for the shear \(A\). Same eigenvalues is necessary, not sufficient.
(b) Swapping the basis vectors swaps the diagonal entries: with \(S = \begin{bmatrix} 0 & 1 \\ 1 & 0 \end{bmatrix}\) (\(S^{-1} = S\)),
\[S^{-1}\begin{bmatrix} 2 & 0 \\ 0 & 3 \end{bmatrix}S = \begin{bmatrix} 0 & 1 \\ 1 & 0 \end{bmatrix}\begin{bmatrix} 0 & 2 \\ 3 & 0 \end{bmatrix} = \begin{bmatrix} 3 & 0 \\ 0 & 2 \end{bmatrix}.\]Any two diagonal matrices with the same entries in a different order are similar via a permutation matrix.
(c) Yes. Both \(A\) and \(A^T = \begin{bmatrix} 1 & 0 \\ 1 & 1 \end{bmatrix}\) have the single eigenvalue 1 with a one-dimensional eigenspace, so both have the same Jordan form \(A\) itself. Explicitly, the swap matrix \(S = \begin{bmatrix} 0 & 1 \\ 1 & 0 \end{bmatrix}\) works again: \(AS = \begin{bmatrix} 1 & 1 \\ 1 & 0 \end{bmatrix}\) and \(S(AS) = \begin{bmatrix} 1 & 0 \\ 1 & 1 \end{bmatrix} = A^T\), so \(S^{-1}AS = A^T\). In general every square matrix is similar to its transpose.
(a) \(S^{-1}IS = I \ne A\); (b) \(S\) = the swap matrix; (c) yes, \(SAS = A^T\) with the same swap matrix.
Review: ·
90A \(3\times 3\) matrix \(A\) has eigenvalues \(1, 2, 3\). Find \(\det(A^2 + I)\), \(\operatorname{tr}(A^{-1})\), \(\det(2A - I)\), and the eigenvalues of \(A^2 - 4A + 3I\). Is \(A^2 - 4A + 3I\) invertible?
Solution
If \(A\mathbf{v} = \lambda\mathbf{v}\) then \(p(A)\mathbf{v} = p(\lambda)\mathbf{v}\) for any polynomial \(p\), and \(A^{-1}\mathbf{v} = \lambda^{-1}\mathbf{v}\). With three distinct eigenvalues \(A\) is diagonalizable, so these account for all eigenvalues of the new matrices, and determinant and trace are the product and sum of eigenvalues.
- \(\det(A^2 + I)\) eigenvalues \(\lambda^2 + 1 = 2, 5, 10\): \(\det = 100\).
- \(\operatorname{tr}A^{-1}\) \(1 + \tfrac12 + \tfrac13 = \tfrac{11}{6}\).
- \(\det(2A - I)\) eigenvalues \(2\lambda - 1 = 1, 3, 5\): \(\det = 15\).
- \(A^2 - 4A + 3I\) eigenvalues \(\lambda^2 - 4\lambda + 3 = (\lambda - 1)(\lambda - 3) = 0, -1, 0\).
Two eigenvalues are 0, so \(A^2 - 4A + 3I = (A - I)(A - 3I)\) is not invertible; it has rank 1 (its null space is \(E_1 \oplus E_3\), dimension 2), and it kills every eigenvector except the one for \(\lambda = 2\), which it maps to \(-1\) times itself. Cayley–Hamilton would make \((A - I)(A - 2I)(A - 3I) = 0\) exactly.
\(100,\ \tfrac{11}{6},\ 15\); eigenvalues \(0, -1, 0\), so \(A^2 - 4A + 3I\) is singular (rank 1).
Review: ·
91Solve the difference equation \(x_{n+2} = x_{n+1} + 2x_n\) with \(x_0 = 1\), \(x_1 = 0\), using eigenvalues, and find \(\lim x_{n+1}/x_n\).
Solution
Let \(\mathbf{u}_n = (x_{n+1}, x_n)\). Then \(\mathbf{u}_{n+1} = \begin{bmatrix} 1 & 2 \\ 1 & 0 \end{bmatrix}\mathbf{u}_n = A\mathbf{u}_n\). Characteristic polynomial \(\lambda^2 - \lambda - 2 = (\lambda - 2)(\lambda + 1)\): eigenvalues \(2, -1\), with eigenvectors \((\lambda, 1)\) from the second row: \((2, 1)\) and \((-1, 1)\).
Write \(\mathbf{u}_0 = (x_1, x_0) = (0, 1) = c_1(2, 1) + c_2(-1, 1)\): \(2c_1 - c_2 = 0\), \(c_1 + c_2 = 1\), so \(c_1 = \tfrac13\), \(c_2 = \tfrac23\). Then \(\mathbf{u}_n = \tfrac13 2^n(2, 1) + \tfrac23(-1)^n(-1, 1)\), whose second component gives
\[x_n = \frac{2^n + 2(-1)^n}{3}.\]Check: \(x_0 = \tfrac{1 + 2}{3} = 1\), \(x_1 = \tfrac{2 - 2}{3} = 0\), \(x_2 = \tfrac{4 + 2}{3} = 2 = x_1 + 2x_0\), \(x_3 = \tfrac{8 - 2}{3} = 2 = x_2 + 2x_1\), \(x_4 = \tfrac{16 + 2}{3} = 6 = 2 + 4\).
The dominant eigenvalue is \(2\) (\(|2| \gt |{-1}|\)), so \(x_{n+1}/x_n \to 2\): the ratio converges to the largest eigenvalue in absolute value, the same mechanism as \(F_{n+1}/F_n \to \varphi\). (Directly: a trial solution \(x_n = r^n\) gives \(r^2 = r + 2\), the same roots.)
\(x_n = \dfrac{2^n + 2(-1)^n}{3}\); \(x_{n+1}/x_n \to 2\).
Review:
92Write \(A = \begin{bmatrix} 3 & 1 \\ 1 & 3 \end{bmatrix}\) as \(A = \lambda_1P_1 + \lambda_2P_2\) with \(P_1, P_2\) orthogonal projections (spectral decomposition). Verify \(P_1 + P_2 = I\), \(P_1P_2 = 0\), and use the decomposition to compute \(e^{A}\) and \(A^{-1}\).
Solution
Eigenvalues \(4\) and \(2\) with unit eigenvectors \(\mathbf{q}_1 = \tfrac{1}{\sqrt2}(1, 1)\), \(\mathbf{q}_2 = \tfrac{1}{\sqrt2}(1, -1)\). The projections onto the eigenlines are
\[P_1 = \mathbf{q}_1\mathbf{q}_1^T = \frac12\begin{bmatrix} 1 & 1 \\ 1 & 1 \end{bmatrix}\] \[P_2 = \mathbf{q}_2\mathbf{q}_2^T = \frac12\begin{bmatrix} 1 & -1 \\ -1 & 1 \end{bmatrix}.\] \[P_1 + P_2 = I\] \[P_1P_2 = \frac14\begin{bmatrix} 1 - 1 & -1 + 1 \\ 1 - 1 & -1 + 1 \end{bmatrix} = 0\] \[4P_1 + 2P_2 = \begin{bmatrix} 2 + 1 & 2 - 1 \\ 2 - 1 & 2 + 1 \end{bmatrix} = A.\]Because \(P_i^2 = P_i\) and \(P_1P_2 = 0\), any function of \(A\) is obtained by applying it to the eigenvalues:
\[f(A) = f(4)P_1 + f(2)P_2\] \[e^A = e^4P_1 + e^2P_2 = \frac12\begin{bmatrix} e^4 + e^2 & e^4 - e^2 \\ e^4 - e^2 & e^4 + e^2 \end{bmatrix}\] \[A^{-1} = \tfrac14P_1 + \tfrac12P_2 = \frac18\begin{bmatrix} 1 + 2 & 1 - 2 \\ 1 - 2 & 1 + 2 \end{bmatrix} = \frac18\begin{bmatrix} 3 & -1 \\ -1 & 3 \end{bmatrix}.\]Check \(A^{-1}\) against the formula \(\frac{1}{8}\begin{bmatrix} 3 & -1 \\ -1 & 3 \end{bmatrix}\): correct. The decomposition is the matrix form of \(A = QDQ^T\), written one eigenvalue at a time.
\(P_1 = \tfrac12\begin{bmatrix} 1 & 1 \\ 1 & 1 \end{bmatrix}\), \(P_2 = \tfrac12\begin{bmatrix} 1 & -1 \\ -1 & 1 \end{bmatrix}\); \(e^A = e^4P_1 + e^2P_2\); \(A^{-1} = \tfrac14P_1 + \tfrac12P_2\).
Review: ·
93Find the maximum and minimum of \(q(\mathbf{x}) = 2x^2 + 2y^2 + 2z^2 + 2xy + 2yz + 2xz\) on the unit sphere \(x^2 + y^2 + z^2 = 1\), and the points where they occur.
Solution
The matrix of \(q\) is \(A = \begin{bmatrix} 2 & 1 & 1 \\ 1 & 2 & 1 \\ 1 & 1 & 2 \end{bmatrix} = I + J\). Eigenvalues: \(1 + 3 = 4\) (eigenvector \((1,1,1)\)) and \(1 + 0 = 1\) (twice, on the plane \(x + y + z = 0\)).
For a symmetric matrix, \(\mathbf{x}^TA\mathbf{x}\) on the unit sphere equals \(\sum\lambda_iy_i^2\) with \(\sum y_i^2 = 1\) in the eigenbasis, so it lies between the smallest and largest eigenvalues, attaining them at the corresponding unit eigenvectors (Rayleigh quotient).
\[\max q = 4 \text{ at } \pm\tfrac{1}{\sqrt3}(1, 1, 1)\] \[\min q = 1 \text{ at every unit vector with } x + y + z = 0.\]Check the maximum: \(q\big(\tfrac{1}{\sqrt3}(1,1,1)\big) = \tfrac13(2 + 2 + 2 + 2 + 2 + 2) = 4\). Check a minimizer, \(\tfrac{1}{\sqrt2}(1, -1, 0)\): \(q = \tfrac12(2 + 2 + 0 - 2 + 0 + 0) = 1\). The minimum is attained on a whole great circle because the eigenvalue 1 is repeated. Geometrically \(q = 1\) is an ellipsoid of revolution, flattened along \((1,1,1)\) (semi-axis \(1/2\)) with circular cross-section of radius 1.
Max \(4\) at \(\pm(1,1,1)/\sqrt3\); min \(1\) on the unit circle of the plane \(x + y + z = 0\).
Review: ·
94Let \(A = \begin{bmatrix} 0.9 & 0.1 \\ 0.5 & 0.5 \end{bmatrix}\) (rows sum to 1). Find \(\lim_{n\to\infty}A^n\) and interpret it.
Solution
Row sums equal to 1 mean \(A\mathbf{1} = \mathbf{1}\): eigenvalue 1 with eigenvector \((1, 1)\). The other eigenvalue is \(\operatorname{tr}A - 1 = 0.4\) (or from \(\det A = 0.45 - 0.05 = 0.4\)), with eigenvector from \((A - 0.4I)\mathbf{v} = \mathbf{0}\): \(0.5v_1 + 0.1v_2 = 0\), \(\mathbf{v}_2 = (1, -5)\).
Since \(|0.4| \lt 1\), \(A^n = P\operatorname{diag}(1, 0.4^n)P^{-1} \to P\operatorname{diag}(1, 0)P^{-1}\), the projection onto \(\operatorname{span}\{(1,1)\}\) along \(\operatorname{span}\{(1,-5)\}\). A rank-one matrix with column space \(\operatorname{span}\{\mathbf{1}\}\) and the same row in each row: that row must be the left eigenvector \(\boldsymbol{\pi}\) for \(\lambda = 1\), normalized so that \(\boldsymbol{\pi}\mathbf{1} = 1\). Solve \(\boldsymbol{\pi}A = \boldsymbol{\pi}\): \(0.9\pi_1 + 0.5\pi_2 = \pi_1\) gives \(0.1\pi_1 = 0.5\pi_2\), so \(\boldsymbol{\pi} = (\tfrac56, \tfrac16)\).
\[\lim_{n\to\infty}A^n = \mathbf{1}\boldsymbol{\pi} = \begin{bmatrix} \tfrac56 & \tfrac16 \\ \tfrac56 & \tfrac16 \end{bmatrix}.\]Interpretation: \(A\) is a transition matrix written row-wise (state \(i\) moves to state \(j\) with probability \(a_{ij}\)); whatever the starting state, after many steps the system is in state 1 with probability \(5/6\) and state 2 with probability \(1/6\). Check \(\boldsymbol{\pi}\) is stationary: \((\tfrac56)(0.9) + (\tfrac16)(0.5) = 0.75 + 0.0833 = \tfrac56\). The error decays like \(0.4^n\); after 10 steps it is below \(10^{-3}\).
\(A^n \to \begin{bmatrix} 5/6 & 1/6 \\ 5/6 & 1/6 \end{bmatrix}\): every row tends to the stationary distribution \((5/6, 1/6)\).
Review:
Challenge 4: inner products, projections and least squares
Linear Algebra · Challenge problems 95 to 114
Problems 95 to 114
One hundred harder problems, still within the scope of a first linear algebra course: proofs, parameters, multi-step computations and applications. Each opens to a complete solution with every step shown and the final answer highlighted. Expect to need pencil and paper, and use the Review links to go back to the relevant tab.
95Apply Gram–Schmidt to the columns of \(A = \begin{bmatrix} 1 & 1 & 0 \\ 1 & 0 & 1 \\ 0 & 1 & 1 \end{bmatrix}\) and write the QR factorization \(A = QR\).
Solution
\(\mathbf{v}_1 = (1,1,0)\), \(\mathbf{v}_2 = (1,0,1)\), \(\mathbf{v}_3 = (0,1,1)\).
\(\mathbf{w}_1 = (1,1,0)\), \(\|\mathbf{w}_1\|^2 = 2\). \(\mathbf{w}_2 = \mathbf{v}_2 - \tfrac{1}{2}\mathbf{w}_1 = (\tfrac12, -\tfrac12, 1)\), \(\|\mathbf{w}_2\|^2 = \tfrac32\). \(\mathbf{w}_3 = \mathbf{v}_3 - \tfrac{{\mathbf{v}_3\cdot \mathbf{w}_1}}{2}\mathbf{w}_1 - \tfrac{{\mathbf{v}_3\cdot \mathbf{w}_2}}{3/2}\mathbf{w}_2 = (0,1,1) - \tfrac12(1,1,0) - \tfrac{1/2}{3/2}(\tfrac12,-\tfrac12,1) = (-\tfrac23, \tfrac23, \tfrac23)\), \(\|\mathbf{w}_3\|^2 = \tfrac43\).
\[Q = \begin{bmatrix} \tfrac{1}{\sqrt2} & \tfrac{1}{\sqrt6} & -\tfrac{1}{\sqrt3} \\ \tfrac{1}{\sqrt2} & -\tfrac{1}{\sqrt6} & \tfrac{1}{\sqrt3} \\ 0 & \tfrac{2}{\sqrt6} & \tfrac{1}{\sqrt3} \end{bmatrix}\] \[R = Q^TA = \begin{bmatrix} \sqrt2 & \tfrac{1}{\sqrt2} & \tfrac{1}{\sqrt2} \\ 0 & \tfrac{\sqrt6}{2} & \tfrac{1}{\sqrt6} \\ 0 & 0 & \tfrac{2}{\sqrt3} \end{bmatrix}.\]The entries of \(R\) are \(r_{ij} = {\mathbf{q}_i\cdot \mathbf{v}_j}\): e.g. \(r_{12} = \tfrac{1}{\sqrt2}(1 + 0 + 0) = \tfrac{1}{\sqrt2}\), \(r_{23} = \tfrac{1}{\sqrt6}(0 - 1 + 2) = \tfrac{1}{\sqrt6}\), and the diagonal entries are the lengths \(\|\mathbf{w}_j\|\). Check with determinants: \(\det R = \sqrt2\cdot\tfrac{\sqrt6}{2}\cdot\tfrac{2}{\sqrt3} = 2\), \(\det Q = -1\) (this orthonormal basis is left-handed), and directly \(\det A = 1(0 - 1) - 1(1 - 0) + 0 = -2 = \det Q\det R\). Correct.
\(Q\) with columns \(\tfrac{(1,1,0)}{\sqrt2}, \tfrac{(1,-1,2)}{\sqrt6}, \tfrac{(-1,1,1)}{\sqrt3}\); \(R = \begin{bmatrix} \sqrt2 & 1/\sqrt2 & 1/\sqrt2 \\ 0 & \sqrt6/2 & 1/\sqrt6 \\ 0 & 0 & 2/\sqrt3 \end{bmatrix}\).
Review:
96Find the matrix \(P\) of orthogonal projection onto the plane \(x + y + z = 0\) in \(\mathbb{R}^3\). Project \((1, 2, 3)\) onto the plane and find its distance from the plane.
Solution
The plane is the orthogonal complement of its normal \(\mathbf{n} = (1, 1, 1)\). Projecting onto the plane is the identity minus the projection onto \(\mathbf{n}\):
\[P = I - \frac{\mathbf{n}\mathbf{n}^T}{\mathbf{n}^T\mathbf{n}} = I - \frac13\begin{bmatrix} 1 & 1 & 1 \\ 1 & 1 & 1 \\ 1 & 1 & 1 \end{bmatrix} = \frac13\begin{bmatrix} 2 & -1 & -1 \\ -1 & 2 & -1 \\ -1 & -1 & 2 \end{bmatrix}.\]Checks: \(P\mathbf{n} = \mathbf{0}\) (each row sums to 0), \(P^T = P\), \(P^2 = P\) (eigenvalues 1, 1, 0), \(\operatorname{tr}P = 2 = \dim\) of the plane.
For \(\mathbf{v} = (1, 2, 3)\): \({\mathbf{v}\cdot \mathbf{n}} = 6\), so the component along \(\mathbf{n}\) is \(\tfrac63(1,1,1) = (2, 2, 2)\) and
\[P\mathbf{v} = (1, 2, 3) - (2, 2, 2) = (-1, 0, 1)\]which does satisfy \(x + y + z = 0\). The distance from \(\mathbf{v}\) to the plane is \(\|(2,2,2)\| = 2\sqrt3\), equivalently \(|{\mathbf{v}\cdot \mathbf{n}}|/\|\mathbf{n}\| = 6/\sqrt3\).
\(P = \tfrac13\begin{bmatrix} 2 & -1 & -1 \\ -1 & 2 & -1 \\ -1 & -1 & 2 \end{bmatrix}\); \(P(1,2,3) = (-1, 0, 1)\); distance \(2\sqrt3\).
Review: ·
97Find the distance between the skew lines \(L_1 : (1, 0, 0) + t(1, 1, 0)\) and \(L_2 : (0, 0, 2) + s(0, 1, 1)\), and the points where the common perpendicular meets them.
Solution
A vector perpendicular to both directions is \(\mathbf{n} = (1, 1, 0)\times(0, 1, 1) = (1\cdot 1 - 0\cdot 1,\ 0\cdot 0 - 1\cdot 1,\ 1\cdot 1 - 1\cdot 0) = (1, -1, 1)\). The distance is the component of the vector between the base points along \(\mathbf{n}\):
\[d = \frac{|(\mathbf{p}_2 - \mathbf{p}_1)\cdot\mathbf{n}|}{\|\mathbf{n}\|} = \frac{|(-1, 0, 2)\cdot(1, -1, 1)|}{\sqrt3} = \frac{|-1 + 0 + 2|}{\sqrt3} = \frac{1}{\sqrt3}.\]Since \(d \ne 0\) the lines do not meet, and since the directions are not parallel they are skew.
Feet of the common perpendicular. Require \(\mathbf{p}_2 + s\mathbf{d}_2 - \mathbf{p}_1 - t\mathbf{d}_1\) to be perpendicular to both directions. With \(\mathbf{u} = (-1 - t,\ s - t,\ 2 + s)\): \(\mathbf{u}\cdot(1,1,0) = -1 - 2t + s = 0\) and \(\mathbf{u}\cdot(0,1,1) = s - t + 2 + s = 0\). From the first \(s = 1 + 2t\); the second gives \(2 + 4t - t + 2 = 0\), \(t = -\tfrac43\), \(s = -\tfrac53\). Feet: \(\mathbf{a} = (1 - \tfrac43, -\tfrac43, 0) = (-\tfrac13, -\tfrac43, 0)\) and \(\mathbf{b} = (0, -\tfrac53, 2 - \tfrac53) = (0, -\tfrac53, \tfrac13)\). Then \(\mathbf{b} - \mathbf{a} = (\tfrac13, -\tfrac13, \tfrac13) = \tfrac13\mathbf{n}\), of length \(\tfrac{\sqrt3}{3} = \tfrac{1}{\sqrt3}\), confirming the distance.
\(d = 1/\sqrt3\); feet \((-\tfrac13, -\tfrac43, 0)\) on \(L_1\) and \((0, -\tfrac53, \tfrac13)\) on \(L_2\).
Review:
98Fit a parabola \(y = a + bx + cx^2\) by least squares to the points \((-1, 0), (0, 1), (1, 2), (2, 6)\). Give the residual vector and check it is orthogonal to the columns of the design matrix.
Solution
\[A = \begin{bmatrix} 1 & -1 & 1 \\ 1 & 0 & 0 \\ 1 & 1 & 1 \\ 1 & 2 & 4 \end{bmatrix},\quad \mathbf{b} = \begin{bmatrix} 0 \\ 1 \\ 2 \\ 6 \end{bmatrix}\] \[A^TA = \begin{bmatrix} 4 & 2 & 6 \\ 2 & 6 & 8 \\ 6 & 8 & 18 \end{bmatrix},\quad A^T\mathbf{b} = \begin{bmatrix} 9 \\ 14 \\ 26 \end{bmatrix}.\]Solve the normal equations. From \(4a + 2b + 6c = 9\), \(2a + 6b + 8c = 14\), \(6a + 8b + 18c = 26\): subtracting \(\tfrac32\times\) the first from the third gives \(5b + 9c = 12.5\); subtracting \(\tfrac12\times\) the first from the second gives \(5b + 5c = 9.5\). Hence \(4c = 3\), \(c = \tfrac34\); \(5b = 9.5 - 3.75 = 5.75\), \(b = \tfrac{23}{20}\); \(4a = 9 - 2.3 - 4.5 = 2.2\), \(a = \tfrac{11}{20}\).
\[y = \tfrac{11}{20} + \tfrac{23}{20}x + \tfrac34x^2.\]Fitted values at \(x = -1, 0, 1, 2\): \(\tfrac{11 - 23 + 15}{20} = \tfrac{3}{20}\), \(\tfrac{11}{20}\), \(\tfrac{11 + 23 + 15}{20} = \tfrac{49}{20}\), \(\tfrac{11 + 46 + 60}{20} = \tfrac{117}{20}\). Residuals \(\mathbf{b} - A\hat{\mathbf{x}} = \left(-\tfrac{3}{20}, \tfrac{9}{20}, -\tfrac{9}{20}, \tfrac{3}{20}\right)\).
Orthogonality: against the constant column, \(-3 + 9 - 9 + 3 = 0\); against \(x\), \(3 + 0 - 9 + 6 = 0\); against \(x^2\), \(-3 + 0 - 9 + 12 = 0\). The residual is orthogonal to \(\operatorname{Col}A\), so \(\hat{\mathbf{x}}\) is the least squares solution; the minimum error is \(\|\mathbf{r}\| = \tfrac{\sqrt{180}}{20} = \tfrac{3\sqrt5}{10}\).
\(y = \tfrac{11}{20} + \tfrac{23}{20}x + \tfrac34x^2\); residual \(\tfrac{1}{20}(-3, 9, -9, 3)\), orthogonal to all three columns.
Review:
99Find the least squares solution of \(x + y = 3,\ x = 1,\ y = 1\), the projection of \(\mathbf{b}\) onto the column space, and the residual. Then redo the problem with \(\mathbf{b} = (2, 1, 1)\) and explain the difference.
Solution
\(A = \begin{bmatrix} 1 & 1 \\ 1 & 0 \\ 0 & 1 \end{bmatrix}\), \(\mathbf{b} = (3, 1, 1)\):
\[A^TA = \begin{bmatrix} 2 & 1 \\ 1 & 2 \end{bmatrix}\] \[A^T\mathbf{b} = \begin{bmatrix} 4 \\ 4 \end{bmatrix}\] \[\hat{\mathbf{x}} = \frac13\begin{bmatrix} 2 & -1 \\ -1 & 2 \end{bmatrix}\begin{bmatrix} 4 \\ 4 \end{bmatrix} = \begin{bmatrix} 4/3 \\ 4/3 \end{bmatrix}.\]Projection \(A\hat{\mathbf{x}} = (\tfrac83, \tfrac43, \tfrac43)\); residual \(\mathbf{b} - A\hat{\mathbf{x}} = (\tfrac13, -\tfrac13, -\tfrac13)\). Check orthogonality: \((1,1,0)\cdot\mathbf{r} = 0\), \((1,0,1)\cdot\mathbf{r} = 0\). The three equations are inconsistent (\(1 + 1 \ne 3\)) and least squares splits the disagreement evenly: each equation is missed by \(\tfrac13\).
With \(\mathbf{b} = (2, 1, 1)\): \(A^T\mathbf{b} = (3, 3)\), \(\hat{\mathbf{x}} = (1, 1)\), and \(A\hat{\mathbf{x}} = (2, 1, 1) = \mathbf{b}\): zero residual. This \(\mathbf{b}\) lies in the column space (the system is consistent, \(x = y = 1\) satisfies all three equations), so the least squares solution is the exact solution. Least squares never does worse than exact solving; it only adds something when no exact solution exists.
\(\hat{\mathbf{x}} = (\tfrac43, \tfrac43)\), projection \((\tfrac83, \tfrac43, \tfrac43)\), residual \((\tfrac13, -\tfrac13, -\tfrac13)\); for \(\mathbf{b} = (2,1,1)\) the system is consistent and \(\hat{\mathbf{x}} = (1,1)\) exactly.
Review:
100In \(C[-1, 1]\) with \({\langle f, g\rangle} = \int_{-1}^1 fg\,dx\), find the best approximation to \(e^x\) by a polynomial of degree at most 1 (the least squares line), and compare it with the tangent line at 0.
Solution
The polynomials \(1\) and \(x\) are orthogonal on \([-1, 1]\) (odd integrand), with \(\|1\|^2 = 2\) and \(\|x\|^2 = \tfrac23\). The best approximation is the orthogonal projection:
\[p(x) = \frac{{\langle e^x, 1\rangle}}{\|1\|^2}\cdot 1 + \frac{{\langle e^x, x\rangle}}{\|x\|^2}\cdot x.\] \[{\langle e^x, 1\rangle} = \int_{-1}^1 e^x\,dx = e - e^{-1}\] \[{\langle e^x, x\rangle} = \int_{-1}^1 xe^x\,dx = \big[(x - 1)e^x\big]_{-1}^1 = 0 - (-2e^{-1}) = \frac2e.\] \[p(x) = \frac{e - e^{-1}}{2} + \frac{2/e}{2/3}\,x = \sinh(1) + \frac3e\,x \approx 1.1752 + 1.1036\,x.\]The tangent line at 0 is \(1 + x\). The least squares line is higher at the center (\(1.175\) vs \(1\)) and slightly steeper, because it minimizes the total squared error over the interval rather than matching \(e^x\) perfectly at one point; at the endpoints \(p(\pm1) \approx 2.279, 0.072\) versus \(e^{\pm1} \approx 2.718, 0.368\) and \(1 \pm 1 = 2, 0\). The residual \(e^x - p(x)\) is orthogonal to both \(1\) and \(x\): its integral and its first moment vanish.
\(p(x) = \sinh(1) + \tfrac3e x \approx 1.175 + 1.104x\); the tangent line \(1 + x\) is not the mean-square best fit.
Review: ·
101Let \(W = \operatorname{span}\{(1, 1, 1, 1), (1, -1, 1, -1)\} \subseteq \mathbb{R}^4\). Find a basis of \(W^\perp\), verify the dimension count, and decompose \(\mathbf{v} = (1, 2, 3, 4)\) as \(\mathbf{w} + \mathbf{w}^\perp\).
Solution
\(W^\perp\) is the null space of the matrix with the two spanning vectors as rows: \(x_1 + x_2 + x_3 + x_4 = 0\) and \(x_1 - x_2 + x_3 - x_4 = 0\). Adding and subtracting: \(x_1 + x_3 = 0\) and \(x_2 + x_4 = 0\). Basis:
\[W^\perp = \operatorname{span}\{(1, 0, -1, 0),\ (0, 1, 0, -1)\}\] \[\dim W + \dim W^\perp = 2 + 2 = 4.\]Decomposition. The two spanning vectors of \(W\) are orthogonal with squared length 4, so
\[\mathbf{w} = \frac{\mathbf{v}\cdot(1,1,1,1)}{4}(1,1,1,1) + \frac{\mathbf{v}\cdot(1,-1,1,-1)}{4}(1,-1,1,-1) = \frac{10}{4}(1,1,1,1) + \frac{-2}{4}(1,-1,1,-1) = (2, 3, 2, 3).\]Then \(\mathbf{w}^\perp = \mathbf{v} - \mathbf{w} = (-1, -1, 1, 1)\), which is indeed in \(W^\perp\) (\(x_1 + x_3 = 0\), \(x_2 + x_4 = 0\)); it equals \(-(1,0,-1,0) - (0,1,0,-1)\). Check Pythagoras: \(\|\mathbf{v}\|^2 = 30 = \|\mathbf{w}\|^2 + \|\mathbf{w}^\perp\|^2 = 26 + 4\).
\(W^\perp = \operatorname{span}\{(1,0,-1,0), (0,1,0,-1)\}\); \((1,2,3,4) = (2,3,2,3) + (-1,-1,1,1)\).
Review: ·
102Prove the parallelogram law \(\|\mathbf{u} + \mathbf{v}\|^2 + \|\mathbf{u} - \mathbf{v}\|^2 = 2\|\mathbf{u}\|^2 + 2\|\mathbf{v}\|^2\) in any inner product space, and use it to show that the max norm \(\|\mathbf{x}\|_\infty = \max|x_i|\) on \(\mathbb{R}^2\) does not come from an inner product.
Solution
Expand with bilinearity and symmetry:
\[\|\mathbf{u} \pm \mathbf{v}\|^2 = {\langle\mathbf{u} \pm \mathbf{v}, \mathbf{u} \pm \mathbf{v}\rangle} = \|\mathbf{u}\|^2 \pm 2{\langle\mathbf{u}, \mathbf{v}\rangle} + \|\mathbf{v}\|^2.\]Adding the two versions cancels the cross terms: \(\|\mathbf{u} + \mathbf{v}\|^2 + \|\mathbf{u} - \mathbf{v}\|^2 = 2\|\mathbf{u}\|^2 + 2\|\mathbf{v}\|^2\). (Geometrically: the diagonals of a parallelogram satisfy \(d_1^2 + d_2^2 = 2a^2 + 2b^2\).)
Max norm. Take \(\mathbf{u} = (1, 0)\), \(\mathbf{v} = (0, 1)\). Then \(\|\mathbf{u} + \mathbf{v}\|_\infty = \|(1, 1)\|_\infty = 1\), \(\|\mathbf{u} - \mathbf{v}\|_\infty = 1\), so the left side is \(1 + 1 = 2\), while the right side is \(2\cdot 1 + 2\cdot 1 = 4\). The law fails, so no inner product has \(\|\cdot\|_\infty\) as its norm. (The same test rules out the taxicab norm \(|x_1| + |x_2|\): there the left side is \(4 + 4 = 8 \ne 4\).) Conversely, any norm satisfying the parallelogram law does come from an inner product, recovered by the polarization identity \({\langle\mathbf{u}, \mathbf{v}\rangle} = \tfrac14\big(\|\mathbf{u} + \mathbf{v}\|^2 - \|\mathbf{u} - \mathbf{v}\|^2\big)\).
Cross terms cancel when the two expansions are added; for the max norm \(\mathbf{u} = \mathbf{e}_1\), \(\mathbf{v} = \mathbf{e}_2\) gives \(2 \ne 4\).
Review:
103Use the Cauchy–Schwarz inequality to prove \((a + b + c)^2 \le 3(a^2 + b^2 + c^2)\) for all real \(a, b, c\), with equality iff \(a = b = c\). Then show that for positive numbers \(\left(\sum_{i=1}^n x_i\right)\left(\sum_{i=1}^n \frac{1}{x_i}\right) \ge n^2\).
Solution
First inequality. Apply \(|{\mathbf{u}\cdot \mathbf{v}}| \le \|\mathbf{u}\|\|\mathbf{v}\|\) to \(\mathbf{u} = (a, b, c)\) and \(\mathbf{v} = (1, 1, 1)\):
\[|a + b + c| \le \sqrt{a^2 + b^2 + c^2}\cdot\sqrt3\] \[\Longrightarrow\ (a + b + c)^2 \le 3(a^2 + b^2 + c^2).\]Equality in Cauchy–Schwarz holds iff the vectors are parallel, i.e. \((a, b, c) = t(1, 1, 1)\), i.e. \(a = b = c\). (Interpretation: the mean of the squares is at least the square of the mean.)
Second inequality. Take \(\mathbf{u} = (\sqrt{x_1}, \dots, \sqrt{x_n})\) and \(\mathbf{v} = (1/\sqrt{x_1}, \dots, 1/\sqrt{x_n})\). Then \({\mathbf{u}\cdot \mathbf{v}} = n\), \(\|\mathbf{u}\|^2 = \sum x_i\), \(\|\mathbf{v}\|^2 = \sum 1/x_i\), and Cauchy–Schwarz gives
\[n^2 = ({\mathbf{u}\cdot \mathbf{v}})^2 \le \left(\sum x_i\right)\left(\sum\frac1{x_i}\right)\]with equality iff \(\mathbf{u} \parallel \mathbf{v}\), i.e. \(x_i = t/x_i\) for all \(i\), i.e. all \(x_i\) equal. This is the statement that the harmonic mean never exceeds the arithmetic mean.
Cauchy–Schwarz with \((1,1,1)\), equality iff \(a = b = c\); with \((\sqrt{x_i})\) and \((1/\sqrt{x_i})\), giving \(\text{AM} \ge \text{HM}\).
Review: ·
104Find the matrix \(R\) of the reflection of \(\mathbb{R}^3\) across the plane \(x + y + z = 0\). Verify that \(R\) is symmetric and orthogonal, find \(\det R\) and its eigenvalues, and compute \(R(1, 2, 3)\).
Solution
With unit normal \(\mathbf{n} = \tfrac{1}{\sqrt3}(1,1,1)\), reflection reverses the normal component and keeps the rest: \(R = I - 2\mathbf{n}\mathbf{n}^T\):
\[R = I - \frac23\begin{bmatrix} 1 & 1 & 1 \\ 1 & 1 & 1 \\ 1 & 1 & 1 \end{bmatrix} = \frac13\begin{bmatrix} 1 & -2 & -2 \\ -2 & 1 & -2 \\ -2 & -2 & 1 \end{bmatrix}.\]\(R^T = R\) is clear. \(R^TR = R^2 = (I - 2\mathbf{n}\mathbf{n}^T)^2 = I - 4\mathbf{n}\mathbf{n}^T + 4\mathbf{n}(\mathbf{n}^T\mathbf{n})\mathbf{n}^T = I\) since \(\mathbf{n}^T\mathbf{n} = 1\): orthogonal, and an involution.
Eigenvalues. \(R\mathbf{n} = \mathbf{n} - 2\mathbf{n} = -\mathbf{n}\): eigenvalue \(-1\) on the normal. Any \(\mathbf{v}\) in the plane has \(\mathbf{n}^T\mathbf{v} = 0\), so \(R\mathbf{v} = \mathbf{v}\): eigenvalue \(1\) with multiplicity 2. Hence \(\det R = (1)(1)(-1) = -1\) and \(\operatorname{tr}R = 1 = 1 + 1 - 1\) (check: \(\tfrac13(1 + 1 + 1) = 1\)).
\(R(1, 2, 3) = \tfrac13(1 - 4 - 6,\ -2 + 2 - 6,\ -2 - 4 + 3) = (-3, -2, -1)\). Check: \((1,2,3)\) and \((-3,-2,-1)\) have the same length \(\sqrt{14}\), their midpoint \((-1, 0, 1)\) lies on the plane, and their difference \((4, 4, 4)\) is along the normal.
\(R = \tfrac13\begin{bmatrix} 1 & -2 & -2 \\ -2 & 1 & -2 \\ -2 & -2 & 1 \end{bmatrix}\); eigenvalues \(1, 1, -1\), \(\det R = -1\); \(R(1,2,3) = (-3,-2,-1)\).
Review: ·
105On \([-\pi, \pi]\) with \({\langle f, g\rangle} = \int_{-\pi}^\pi fg\,dx\), project \(f(x) = x\) onto \(W = \operatorname{span}\{\sin x, \sin 2x\}\). Compute \(\|f\|^2\), the squared length of the projection, and the squared error, and explain why the error is positive.
Solution
\(\sin x\) and \(\sin 2x\) are orthogonal with \(\|\sin nx\|^2 = \pi\). Projection coefficients:
\[\frac{{\langle x, \sin nx\rangle}}{\pi} = \frac1\pi\int_{-\pi}^\pi x\sin nx\,dx = \frac1\pi\cdot\frac{2\pi(-1)^{n+1}}{n} = \frac{2(-1)^{n+1}}{n}\](integration by parts: \(\int_{-\pi}^\pi x\sin nx\,dx = \big[-\tfrac{x\cos nx}{n}\big]_{-\pi}^{\pi} + \tfrac1n\int\cos nx\,dx = -\tfrac{2\pi\cos n\pi}{n}\)). So
\[\operatorname{proj}_Wf = 2\sin x - \sin2x.\]These are the first two Fourier sine coefficients of \(x\).
\[\|f\|^2 = \int_{-\pi}^\pi x^2\,dx = \frac{2\pi^3}{3} \approx 20.67\] \[\|\operatorname{proj}_Wf\|^2 = 2^2\pi + 1^2\pi = 5\pi \approx 15.71\] \[\text{error}^2 = \|f - \operatorname{proj}_Wf\|^2 = \|f\|^2 - \|\operatorname{proj}_Wf\|^2 = \frac{2\pi^3}{3} - 5\pi \approx 4.96.\]The error is positive because \(f = x\) is not in the two-dimensional space \(W\); Bessel’s inequality \(\sum b_n^2\pi \le \|f\|^2\) becomes Parseval’s equality only when all harmonics are included: \(\sum_{n\ge1}\tfrac{4}{n^2}\pi = \tfrac{2\pi^3}{3}\), which is \(\sum 1/n^2 = \pi^2/6\).
\(\operatorname{proj}_W x = 2\sin x - \sin 2x\); \(\|f\|^2 = 2\pi^3/3\), projection length squared \(5\pi\), error squared \(2\pi^3/3 - 5\pi \approx 4.96\).
Review:
106Orthogonally diagonalize \(A = \begin{bmatrix} 2 & 1 & 1 \\ 1 & 2 & 1 \\ 1 & 1 & 2 \end{bmatrix}\): find \(Q\) orthogonal and \(D\) diagonal with \(A = QDQ^T\).
Solution
\(A = I + J\): eigenvalues \(1 + 3 = 4\) (eigenvector \((1,1,1)\)) and \(1 + 0 = 1\) (twice), with \(E_1\) the plane \(x + y + z = 0\).
Eigenvectors from different eigenvalues are automatically orthogonal, but inside \(E_1\) we must choose an orthonormal pair. Start with \((1, -1, 0)\) and \((1, 0, -1)\); Gram–Schmidt: \(\mathbf{w}_2 = (1, 0, -1) - \tfrac12(1, -1, 0) = (\tfrac12, \tfrac12, -1) \propto (1, 1, -2)\). Normalize everything:
\[Q = \begin{bmatrix} \tfrac{1}{\sqrt3} & \tfrac{1}{\sqrt2} & \tfrac{1}{\sqrt6} \\ \tfrac{1}{\sqrt3} & -\tfrac{1}{\sqrt2} & \tfrac{1}{\sqrt6} \\ \tfrac{1}{\sqrt3} & 0 & -\tfrac{2}{\sqrt6} \end{bmatrix}\] \[D = \begin{bmatrix} 4 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{bmatrix}.\]Check \(Q^TQ = I\): the columns are unit vectors (\(\tfrac13\cdot 3\), \(\tfrac12\cdot 2\), \(\tfrac16(1 + 1 + 4)\)) and mutually orthogonal (\(1 - 1 + 0\), \(1 + 1 - 2\), \(1 - 1 + 0\), each divided by the appropriate roots). Check \(AQ = QD\) on the second column: \(A(1, -1, 0) = (2 - 1, 1 - 2, 1 - 1) = (1, -1, 0)\), eigenvalue 1. Then \(A = QDQ^T = 4\mathbf{q}_1\mathbf{q}_1^T + (I - \mathbf{q}_1\mathbf{q}_1^T) = I + 3\cdot\tfrac13J\), consistent.
\(D = \operatorname{diag}(4, 1, 1)\), \(Q\) with columns \(\tfrac{(1,1,1)}{\sqrt3}, \tfrac{(1,-1,0)}{\sqrt2}, \tfrac{(1,1,-2)}{\sqrt6}\).
Review: ·
107Fit the line \(y = a + bx\) to \((1, 1), (2, 2), (3, 2), (4, 4)\) using the closed-form least squares formulas, and check with the normal equations. Verify that the residuals sum to zero.
Solution
\(n = 4\), \(\sum x = 10\), \(\sum y = 9\), \(\sum xy = 1 + 4 + 6 + 16 = 27\), \(\sum x^2 = 1 + 4 + 9 + 16 = 30\).
\[b = \frac{n\sum xy - \sum x\sum y}{n\sum x^2 - (\sum x)^2} = \frac{108 - 90}{120 - 100} = \frac{18}{20} = 0.9\] \[a = \bar y - b\bar x = 2.25 - 0.9(2.5) = 0.\]The line is \(y = 0.9x\), through the origin.
Normal equations. \(A^TA = \begin{bmatrix} 4 & 10 \\ 10 & 30 \end{bmatrix}\), \(A^T\mathbf{b} = \begin{bmatrix} 9 \\ 27 \end{bmatrix}\): \(4a + 10b = 9\), \(10a + 30b = 27\). From the second, \(a = 2.7 - 3b\); the first gives \(10.8 - 12b + 10b = 9\), \(b = 0.9\), \(a = 0\). Same answer.
Residuals. Fitted values \(0.9, 1.8, 2.7, 3.6\); residuals \(0.1, 0.2, -0.7, 0.4\); sum \(0\) (orthogonality to the constant column) and \(\sum x_ir_i = 0.1 + 0.4 - 2.1 + 1.6 = 0\) (orthogonality to the \(x\) column). The data point \((3, 2)\) is the outlier pulling the line down there.
\(y = 0.9x\); residuals \(0.1, 0.2, -0.7, 0.4\), summing to zero.
Review:
108Find the projection matrix onto \(\operatorname{Col}A\) for \(A = \begin{bmatrix} 1 & 0 \\ 1 & 1 \\ 1 & 2 \end{bmatrix}\) using \(P = A(A^TA)^{-1}A^T\), check \(P^2 = P\), and project \(\mathbf{b} = (1, 3, 4)\).
Solution
\[A^TA = \begin{bmatrix} 3 & 3 \\ 3 & 5 \end{bmatrix}\] \[(A^TA)^{-1} = \frac16\begin{bmatrix} 5 & -3 \\ -3 & 3 \end{bmatrix}.\] \[P = A(A^TA)^{-1}A^T = \frac16\begin{bmatrix} 1 & 0 \\ 1 & 1 \\ 1 & 2 \end{bmatrix}\begin{bmatrix} 5 & -3 \\ -3 & 3 \end{bmatrix}\begin{bmatrix} 1 & 1 & 1 \\ 0 & 1 & 2 \end{bmatrix} = \frac16\begin{bmatrix} 5 & 2 & -1 \\ 2 & 2 & 2 \\ -1 & 2 & 5 \end{bmatrix}.\](Middle step: \(A(A^TA)^{-1} = \tfrac16\begin{bmatrix} 5 & -3 \\ 2 & 0 \\ -1 & 3 \end{bmatrix}\).) \(P\) is symmetric, its trace is \(\tfrac{12}{6} = 2 = \operatorname{rank}A\), and \(P\mathbf{a}_1 = \tfrac16(6, 6, 6) = \mathbf{a}_1\), \(P\mathbf{a}_2 = \tfrac16(0, 6, 12) = \mathbf{a}_2\): it fixes the column space. \(P^2 = P\) follows from \(A(A^TA)^{-1}A^TA(A^TA)^{-1}A^T = A(A^TA)^{-1}A^T\); numerically, row 1 of \(P\) times column 1 of \(P\) is \(\tfrac{1}{36}(25 + 4 + 1) = \tfrac{30}{36} = \tfrac56\), matching \(p_{11}\).
\[P\mathbf{b} = \frac16\begin{bmatrix} 5 + 6 - 4 \\ 2 + 6 + 8 \\ -1 + 6 + 20 \end{bmatrix} = \begin{bmatrix} 7/6 \\ 8/3 \\ 25/6 \end{bmatrix}\]which is the fitted-values vector of the least squares line through \((0,1), (1,3), (2,4)\) (slope \(\tfrac32\), intercept \(\tfrac76\)); the residual \(\mathbf{b} - P\mathbf{b} = (-\tfrac16, \tfrac13, -\tfrac16)\) is in the left null space of \(A\).
\(P = \tfrac16\begin{bmatrix} 5 & 2 & -1 \\ 2 & 2 & 2 \\ -1 & 2 & 5 \end{bmatrix}\); \(P(1,3,4) = (\tfrac76, \tfrac83, \tfrac{25}{6})\).
Review: ·
109Prove that the only matrix that is simultaneously an orthogonal projection (\(P^2 = P = P^T\)) and an orthogonal matrix is the identity.
Solution
If \(P\) is orthogonal then \(P^TP = I\). If also \(P^T = P\) and \(P^2 = P\), then
\[I = P^TP = PP = P^2 = P.\]So \(P = I\). In eigenvalue terms: a projection has eigenvalues in \(\{0, 1\}\) and an orthogonal matrix has eigenvalues of absolute value 1, so every eigenvalue must be 1; a symmetric matrix with all eigenvalues 1 is \(QIQ^T = I\). Geometrically, a projection onto a proper subspace shortens the vectors it kills, while an orthogonal matrix preserves every length; only the trivial projection does both.
Note that the hypothesis \(P^T = P\) matters: the matrix \(\begin{bmatrix} 0 & 1 \\ 1 & 0 \end{bmatrix}\) is orthogonal and symmetric but not idempotent (it is a reflection, \(R^2 = I\)), and \(\begin{bmatrix} 1 & 1 \\ 0 & 0 \end{bmatrix}\) is idempotent but neither symmetric nor orthogonal (an oblique projection).
\(I = P^TP = P^2 = P\).
Review:
110Show that the Gram matrix \(G = A^TA\) is positive semidefinite for every real matrix \(A\), and positive definite exactly when the columns of \(A\) are independent. Illustrate with \(A = \begin{bmatrix} 1 & 2 \\ 1 & 2 \end{bmatrix}\) and \(A = \begin{bmatrix} 1 & 0 \\ 1 & 1 \end{bmatrix}\).
Solution
For any \(\mathbf{x}\), \(\mathbf{x}^TG\mathbf{x} = \mathbf{x}^TA^TA\mathbf{x} = (A\mathbf{x})^T(A\mathbf{x}) = \|A\mathbf{x}\|^2 \ge 0\). So \(G\) (which is symmetric) is positive semidefinite, and \(\mathbf{x}^TG\mathbf{x} = 0\) iff \(A\mathbf{x} = \mathbf{0}\). Hence \(G\) is positive definite (\(\mathbf{x}^TG\mathbf{x} \gt 0\) for all \(\mathbf{x} \ne \mathbf{0}\)) iff \(A\mathbf{x} = \mathbf{0}\) only for \(\mathbf{x} = \mathbf{0}\), i.e. iff the columns of \(A\) are linearly independent. Equivalently \(\operatorname{Nul}G = \operatorname{Nul}A\), and \(G\) is invertible iff \(A\) has full column rank: this is why the normal equations have a unique solution exactly then.
Dependent columns. \(A = \begin{bmatrix} 1 & 2 \\ 1 & 2 \end{bmatrix}\): \(G = \begin{bmatrix} 2 & 4 \\ 4 & 8 \end{bmatrix}\), \(\det G = 0\), eigenvalues \(10\) and \(0\) (semidefinite, not definite); \(\mathbf{x} = (2, -1)\) gives \(A\mathbf{x} = \mathbf{0}\) and \(\mathbf{x}^TG\mathbf{x} = 0\).
Independent columns. \(A = \begin{bmatrix} 1 & 0 \\ 1 & 1 \end{bmatrix}\): \(G = \begin{bmatrix} 2 & 1 \\ 1 & 1 \end{bmatrix}\), leading minors \(2 \gt 0\) and \(\det G = 1 \gt 0\): positive definite, eigenvalues \(\tfrac{3 \pm\sqrt5}{2} \gt 0\). The entries of \(G\) are the dot products of the columns of \(A\), which is why it is called the Gram matrix.
\(\mathbf{x}^TA^TA\mathbf{x} = \|A\mathbf{x}\|^2 \ge 0\), zero only on \(\operatorname{Nul}A\); first example singular (eigenvalues \(10, 0\)), second positive definite.
Review: ·
111(a) Show that \(\mathbf{u}\cdot({\mathbf{v}\times \mathbf{w}}) = \det[\mathbf{u}\ \mathbf{v}\ \mathbf{w}]\) and that \({\mathbf{u}\times \mathbf{v}}\) is perpendicular to \(\mathbf{u}\). (b) Find the volume of the tetrahedron with vertices \((0,0,0), (1,0,0), (0,2,0), (0,0,3)\), and of the one with vertices \((1,1,1), (2,3,1), (1,2,4), (3,1,2)\).
Solution
(a) With \({\mathbf{v}\times \mathbf{w}} = (v_2w_3 - v_3w_2,\ v_3w_1 - v_1w_3,\ v_1w_2 - v_2w_1)\),
\[\mathbf{u}\cdot({\mathbf{v}\times \mathbf{w}}) = u_1(v_2w_3 - v_3w_2) - u_2(v_1w_3 - v_3w_1) + u_3(v_1w_2 - v_2w_1)\]which is exactly the cofactor expansion of \(\det\begin{bmatrix} u_1 & u_2 & u_3 \\ v_1 & v_2 & v_3 \\ w_1 & w_2 & w_3 \end{bmatrix}\) along the first row (and the determinant is the same whether the vectors are rows or columns). Then \(\mathbf{u}\cdot({\mathbf{u}\times \mathbf{v}}) = \det[\mathbf{u}\ \mathbf{u}\ \mathbf{v}] = 0\) (repeated row), so \({\mathbf{u}\times \mathbf{v}} \perp \mathbf{u}\); likewise \(\perp\mathbf{v}\).
(b) The volume of a tetrahedron is \(\tfrac16\) of the parallelepiped spanned by three edges from one vertex: \(V = \tfrac16|\det[\mathbf{a}\ \mathbf{b}\ \mathbf{c}]|\). First tetrahedron: edges \((1,0,0), (0,2,0), (0,0,3)\), determinant \(6\), volume \(1\). Second: edges from \((1,1,1)\) are \((1,2,0), (0,1,3), (2,0,1)\):
\[\det\begin{bmatrix} 1 & 2 & 0 \\ 0 & 1 & 3 \\ 2 & 0 & 1 \end{bmatrix} = 1(1 - 0) - 2(0 - 6) + 0 = 13\] \[V = \frac{13}{6}.\]The sign of the determinant records orientation (whether the three edges form a right-handed triple); the volume takes the absolute value.
(a) cofactor expansion along the first row; a repeated row gives 0. (b) volumes \(1\) and \(13/6\).
Review: ·
112In \(\mathbb{C}^2\) with \({\langle\mathbf{u}, \mathbf{v}\rangle} = \mathbf{u}^*\mathbf{v}\), apply Gram–Schmidt to \(\mathbf{v}_1 = (1, i)\), \(\mathbf{v}_2 = (1, 1)\), and verify the result is orthonormal. What goes wrong if the conjugate is omitted?
Solution
\({\langle\mathbf{v}_1, \mathbf{v}_1\rangle} = \bar1\cdot 1 + \bar{i}\cdot i = 1 + 1 = 2\), so \(\mathbf{q}_1 = \tfrac{1}{\sqrt2}(1, i)\).
\({\langle\mathbf{v}_1, \mathbf{v}_2\rangle} = \bar1\cdot 1 + \bar{i}\cdot 1 = 1 - i\). Subtract the projection (the coefficient multiplies \(\mathbf{v}_1\), with the inner product taken in this order because it is linear in the second slot):
\[\mathbf{w}_2 = \mathbf{v}_2 - \frac{{\langle\mathbf{v}_1, \mathbf{v}_2\rangle}}{{\langle\mathbf{v}_1, \mathbf{v}_1\rangle}}\mathbf{v}_1 = (1, 1) - \frac{1 - i}{2}(1, i) = \left(1 - \frac{1 - i}{2},\ 1 - \frac{(1 - i)i}{2}\right)\] \[= \left(\frac{1 + i}{2},\ \frac{1 - i}{2}\right).\]Check orthogonality: \({\langle\mathbf{v}_1, \mathbf{w}_2\rangle} = \bar1\cdot\tfrac{1 + i}{2} + \bar{i}\cdot\tfrac{1 - i}{2} = \tfrac{1 + i}{2} + \tfrac{-i - 1}{2} = 0\). Length: \(\|\mathbf{w}_2\|^2 = \left|\tfrac{1 + i}{2}\right|^2 + \left|\tfrac{1 - i}{2}\right|^2 = \tfrac12 + \tfrac12 = 1\), so \(\mathbf{q}_2 = \mathbf{w}_2 = \tfrac12(1 + i, 1 - i)\) already. Orthonormal basis \(\{\tfrac{1}{\sqrt2}(1, i),\ \tfrac12(1 + i, 1 - i)\}\).
Without the conjugate, \((1, i)\cdot(1, i) = 1 + i^2 = 0\): the "length" of a nonzero vector would be zero, division by it impossible, and \((1, i)\) would be "orthogonal to itself". The conjugate is what makes \(\|\mathbf{v}\|^2 = \sum|v_k|^2 \gt 0\).
\(\mathbf{q}_1 = \tfrac{1}{\sqrt2}(1, i)\), \(\mathbf{q}_2 = \tfrac12(1 + i, 1 - i)\); without conjugation \((1,i)\) has length 0.
Review: ·
113Among all solutions of \(x + y + z = 3\), find the one of smallest norm. Then find the smallest-norm solution of \(x + y + z = 3,\ x - y = 1\).
Solution
The solution set of \(\mathbf{a}^T\mathbf{x} = 3\) with \(\mathbf{a} = (1,1,1)\) is a plane parallel to \(\operatorname{Nul}(\mathbf{a}^T)\). The shortest vector in it is perpendicular to the null space, hence a multiple of \(\mathbf{a}\) (the row space): \(\mathbf{x} = t\mathbf{a}\) with \(3t = 3\), so
\[\mathbf{x}_{\min} = (1, 1, 1)\] \[\|\mathbf{x}_{\min}\| = \sqrt3.\]Any other solution is \((1,1,1) + \mathbf{h}\) with \(\mathbf{h} \perp (1,1,1)\), and by Pythagoras its norm is larger.
Two constraints. \(A = \begin{bmatrix} 1 & 1 & 1 \\ 1 & -1 & 0 \end{bmatrix}\), \(\mathbf{b} = (3, 1)\). The minimum-norm solution lies in the row space: \(\mathbf{x} = A^T\mathbf{c}\) with \(AA^T\mathbf{c} = \mathbf{b}\). Here \(AA^T = \begin{bmatrix} 3 & 0 \\ 0 & 2 \end{bmatrix}\) (the rows happen to be orthogonal), so \(\mathbf{c} = (1, \tfrac12)\) and
\[\mathbf{x}_{\min} = A^T\mathbf{c} = 1\cdot(1, 1, 1) + \tfrac12(1, -1, 0) = \left(\tfrac32, \tfrac12, 1\right).\]Check: \(\tfrac32 + \tfrac12 + 1 = 3\), \(\tfrac32 - \tfrac12 = 1\). Norm \(\sqrt{\tfrac94 + \tfrac14 + 1} = \sqrt{7/2}\). The general solution is \(\mathbf{x}_{\min} + t(1, 1, -2)\) (the null space direction, perpendicular to both rows), and \(\|\mathbf{x}\|^2 = \tfrac72 + 6t^2\) is minimized at \(t = 0\).
\((1,1,1)\); then \((\tfrac32, \tfrac12, 1) = A^T(AA^T)^{-1}\mathbf{b}\).
Review: ·
114Show that an orthogonal matrix preserves angles as well as lengths. Then find all \(2\times 2\) orthogonal matrices and classify them.
Solution
For orthogonal \(Q\), \((Q\mathbf{u})\cdot(Q\mathbf{v}) = \mathbf{u}^TQ^TQ\mathbf{v} = {\mathbf{u}\cdot \mathbf{v}}\) and (taking \(\mathbf{v} = \mathbf{u}\)) \(\|Q\mathbf{u}\| = \|\mathbf{u}\|\). Therefore
\[\cos\angle(Q\mathbf{u}, Q\mathbf{v}) = \frac{(Q\mathbf{u})\cdot(Q\mathbf{v})}{\|Q\mathbf{u}\|\|Q\mathbf{v}\|} = \frac{{\mathbf{u}\cdot \mathbf{v}}}{\|\mathbf{u}\|\|\mathbf{v}\|} = \cos\angle(\mathbf{u}, \mathbf{v}).\]All \(2\times 2\) orthogonal matrices. The first column is a unit vector, \((\cos\theta, \sin\theta)\) for some \(\theta\). The second column must be a unit vector perpendicular to it, so it is \(\pm(-\sin\theta, \cos\theta)\). Hence
\[Q = \begin{bmatrix} \cos\theta & -\sin\theta \\ \sin\theta & \cos\theta \end{bmatrix} \ (\det = 1,\ \text{rotation by } \theta) \quad\text{or}\quad Q = \begin{bmatrix} \cos\theta & \sin\theta \\ \sin\theta & -\cos\theta \end{bmatrix} \ (\det = -1,\ \text{reflection}).\]The second family consists of reflections across the line at angle \(\theta/2\): these matrices are symmetric, square to \(I\), and fix \((\cos\tfrac\theta2, \sin\tfrac\theta2)\) (check with the double-angle formulas). So every orthogonal map of the plane is a rotation or a reflection; the rotations form a group, the reflections do not (the product of two reflections is a rotation).
\(Q^TQ = I\) preserves dot products, hence lengths and cosines; the \(2\times 2\) orthogonal matrices are the rotations (\(\det 1\)) and the reflections (\(\det -1\)).
Review:
Challenge 5: proofs and applications
Linear Algebra · Challenge problems 115 to 134
Problems 115 to 134
One hundred harder problems, still within the scope of a first linear algebra course: proofs, parameters, multi-step computations and applications. Each opens to a complete solution with every step shown and the final answer highlighted. Expect to need pencil and paper, and use the Review links to go back to the relevant tab.
115Prove that if \(A\) is invertible then \(A^T\) is invertible and \((A^T)^{-1} = (A^{-1})^T\). Deduce that a matrix is invertible iff its rows are linearly independent.
Solution
Transpose the identity \(AA^{-1} = I\): \((A^{-1})^TA^T = I^T = I\). Transposing \(A^{-1}A = I\) gives \(A^T(A^{-1})^T = I\). So \((A^{-1})^T\) is a two-sided inverse of \(A^T\), and by uniqueness of inverses \((A^T)^{-1} = (A^{-1})^T\).
Rows. \(A\) is invertible iff \(A^T\) is (just shown, both directions by symmetry). \(A^T\) is invertible iff its columns are linearly independent (invertible matrix theorem). The columns of \(A^T\) are the rows of \(A\). Hence \(A\) is invertible iff its rows are independent. Combined with the column statement, independence of the rows and of the columns are equivalent for square matrices, which is a disguised form of "row rank equals column rank".
Transposing \(AA^{-1} = A^{-1}A = I\) shows \((A^{-1})^T\) inverts \(A^T\); rows of \(A\) are columns of \(A^T\).
Review:
116Prove that an upper triangular matrix is invertible iff all its diagonal entries are nonzero, and that its inverse is then upper triangular. Illustrate with \(\begin{bmatrix} 2 & 1 & 3 \\ 0 & 1 & 4 \\ 0 & 0 & 5 \end{bmatrix}\).
Solution
The determinant of a triangular matrix is the product of its diagonal entries, so \(\det U \ne 0\) iff every diagonal entry is nonzero. That settles invertibility.
Inverse is triangular. Solve \(U\mathbf{x} = \mathbf{e}_j\) by back substitution: the last equation \(u_{nn}x_n = (\mathbf{e}_j)_n\) gives \(x_n = 0\) unless \(j = n\); going upward, \(x_i = 0\) for all \(i \gt j\) because each equation involves only \(x_i, \dots, x_n\) and the right-hand side is zero there. So column \(j\) of \(U^{-1}\) has zeros below position \(j\): \(U^{-1}\) is upper triangular, with diagonal entries \(1/u_{jj}\). (Alternatively, Gauss–Jordan on \([U\mid I]\) uses only operations that add multiples of lower rows to upper rows, preserving the upper triangular shape on the right.)
Example. Back substitution for each \(\mathbf{e}_j\), or \(U = D(I + N)\): here
\[U^{-1} = \begin{bmatrix} \tfrac12 & -\tfrac12 & \tfrac1{10} \\ 0 & 1 & -\tfrac45 \\ 0 & 0 & \tfrac15 \end{bmatrix}.\]Check row 1 of \(UU^{-1}\): \((1,\ -1 + 1,\ \tfrac{2}{10} - \tfrac45 + \tfrac35) = (1, 0, 0)\). Row 2: \((0, 1, -\tfrac45 + \tfrac45) = (0, 1, 0)\). The diagonal of \(U^{-1}\) is \(\tfrac12, 1, \tfrac15\), the reciprocals.
\(\det U = \prod u_{ii}\); back substitution gives zeros below the diagonal; the example inverse is \(\begin{bmatrix} 1/2 & -1/2 & 1/10 \\ 0 & 1 & -4/5 \\ 0 & 0 & 1/5 \end{bmatrix}\).
Review: ·
117Let \(N = \begin{bmatrix} 0 & 1 & 1 \\ 0 & 0 & 1 \\ 0 & 0 & 0 \end{bmatrix}\). Compute \(N^2, N^3\), find all eigenvalues and eigenvectors of \(N\), decide whether \(N\) is diagonalizable, and find \((I - N)^{-1}\).
Solution
\[N^2 = \begin{bmatrix} 0 & 0 & 1 \\ 0 & 0 & 0 \\ 0 & 0 & 0 \end{bmatrix}\] \[N^3 = 0.\]\(N\) is nilpotent of index 3. Its characteristic polynomial is \(\lambda^3\) (triangular, zeros on the diagonal), so the only eigenvalue is \(0\). Eigenvectors: \(N\mathbf{v} = \mathbf{0}\) gives \(v_2 + v_3 = 0\), \(v_3 = 0\), so \(E_0 = \operatorname{span}\{\mathbf{e}_1\}\), one-dimensional. Geometric multiplicity \(1 \lt 3\): not diagonalizable (the only diagonalizable nilpotent matrix is \(0\)).
\[(I - N)^{-1} = I + N + N^2 = \begin{bmatrix} 1 & 1 & 2 \\ 0 & 1 & 1 \\ 0 & 0 & 1 \end{bmatrix}\]since \((I - N)(I + N + N^2) = I - N^3 = I\). Check: \((I - N)\) has rows \((1, -1, -1), (0, 1, -1), (0, 0, 1)\); times column 3 of the claimed inverse, \((2, 1, 1)\): \(2 - 1 - 1 = 0\), \(1 - 1 = 0\), \(1\). Correct. The chain \(\mathbf{e}_3 \to N\mathbf{e}_3 = (1, 1, 0) \to N^2\mathbf{e}_3 = \mathbf{e}_1 \to \mathbf{0}\) shows the single Jordan block structure.
\(N^3 = 0\); only eigenvalue 0 with \(E_0 = \operatorname{span}\{\mathbf{e}_1\}\); not diagonalizable; \((I - N)^{-1} = I + N + N^2\).
Review: ·
118Let \(A\) be a \(2\times 2\) real matrix with \(A^2 = 0\) but \(A \ne 0\). Prove \(\operatorname{rank}A = 1\), show \(\operatorname{Im}A = \ker A\), and find all such matrices.
Solution
\(A \ne 0\) gives \(\operatorname{rank}A \ge 1\). If \(\operatorname{rank}A = 2\), \(A\) is invertible and \(A^2 = 0\) would give \(A = A^{-1}A^2 = 0\), contradiction. So \(\operatorname{rank}A = 1\) and \(\dim\ker A = 1\).
\(A^2 = 0\) means \(A(A\mathbf{x}) = \mathbf{0}\) for all \(\mathbf{x}\), i.e. \(\operatorname{Im}A \subseteq \ker A\). Both are one-dimensional, so \(\operatorname{Im}A = \ker A\).
All such matrices. \(A^2 = 0\) forces both eigenvalues to be 0, so \(\operatorname{tr}A = 0\) and \(\det A = 0\): \(A = \begin{bmatrix} a & b \\ c & -a \end{bmatrix}\) with \(a^2 + bc = 0\) (Cayley–Hamilton then gives \(A^2 = -(\det A)I = 0\) automatically). Examples: \(\begin{bmatrix} 0 & 1 \\ 0 & 0 \end{bmatrix}\), \(\begin{bmatrix} 1 & 1 \\ -1 & -1 \end{bmatrix}\), \(\begin{bmatrix} 2 & 4 \\ -1 & -2 \end{bmatrix}\). Each is \(\mathbf{u}\mathbf{v}^T\) with \({\mathbf{v}\cdot \mathbf{u}} = 0\): e.g. \(\begin{bmatrix} 1 & 1 \\ -1 & -1 \end{bmatrix} = \begin{bmatrix} 1 \\ -1 \end{bmatrix}\begin{bmatrix} 1 & 1 \end{bmatrix}\), image and kernel both \(\operatorname{span}\{(1, -1)\}\). Every such \(A\) is similar to \(\begin{bmatrix} 0 & 1 \\ 0 & 0 \end{bmatrix}\).
Rank 2 would make \(A\) invertible; \(\operatorname{Im}A \subseteq \ker A\) with equal dimensions; \(A = \begin{bmatrix} a & b \\ c & -a \end{bmatrix}\), \(a^2 + bc = 0\).
Review: ·
119Let \(\mathbf{b} \ne \mathbf{0}\) and suppose \(A\mathbf{x} = \mathbf{b}\) is consistent. Prove that the solution set \(S\) is not a subspace, but that \(S = \mathbf{x}_p + \operatorname{Nul}A\) for any particular solution \(\mathbf{x}_p\). What is \(\dim\operatorname{Nul}A\) if \(S\) is a line? A plane?
Solution
Not a subspace. \(A\mathbf{0} = \mathbf{0} \ne \mathbf{b}\), so \(\mathbf{0} \notin S\). (Also, if \(\mathbf{x}, \mathbf{y} \in S\) then \(A(\mathbf{x} + \mathbf{y}) = 2\mathbf{b} \ne \mathbf{b}\): not closed under addition.)
Translate of the null space. If \(\mathbf{x} \in S\) then \(A(\mathbf{x} - \mathbf{x}_p) = \mathbf{b} - \mathbf{b} = \mathbf{0}\), so \(\mathbf{x} - \mathbf{x}_p \in \operatorname{Nul}A\) and \(\mathbf{x} \in \mathbf{x}_p + \operatorname{Nul}A\). Conversely, if \(\mathbf{h} \in \operatorname{Nul}A\) then \(A(\mathbf{x}_p + \mathbf{h}) = \mathbf{b} + \mathbf{0} = \mathbf{b}\), so \(\mathbf{x}_p + \mathbf{h} \in S\). Hence \(S = \mathbf{x}_p + \operatorname{Nul}A\), an affine subspace (a flat) parallel to \(\operatorname{Nul}A\) and of the same dimension.
If \(S\) is a line, \(\dim\operatorname{Nul}A = 1\) (one free variable); a plane, \(\dim\operatorname{Nul}A = 2\); a single point, \(\operatorname{Nul}A = \{\mathbf{0}\}\). The choice of \(\mathbf{x}_p\) is irrelevant: two particular solutions differ by an element of the null space, so they describe the same flat. For a differential equation the same structure appears as \(y = y_p + y_h\).
\(\mathbf{0} \notin S\); \(\mathbf{x} - \mathbf{x}_p \in \operatorname{Nul}A\) and \(\mathbf{x}_p + \mathbf{h} \in S\); line \(\Rightarrow\) nullity 1, plane \(\Rightarrow\) nullity 2.
Review: ·
120Let \(U\) and \(W\) be 3-dimensional subspaces of \(\mathbb{R}^5\). Prove that \(U\cap W\) contains a nonzero vector. Can \(\dim(U\cap W)\) be 1? 2? 3? Give examples.
Solution
By the dimension formula, \(\dim(U\cap W) = \dim U + \dim W - \dim(U + W) = 6 - \dim(U + W)\). Since \(U + W \subseteq \mathbb{R}^5\), \(\dim(U + W) \le 5\), so \(\dim(U\cap W) \ge 1\): the intersection contains a nonzero vector. (Direct argument: a basis of \(U\) together with a basis of \(W\) is 6 vectors in \(\mathbb{R}^5\), hence dependent; a dependence \(\sum a_i\mathbf{u}_i + \sum b_j\mathbf{w}_j = \mathbf{0}\) with not all coefficients zero gives \(\sum a_i\mathbf{u}_i = -\sum b_j\mathbf{w}_j\), a nonzero common vector.)
- \(\dim = 1\) \(U = \operatorname{span}\{\mathbf{e}_1, \mathbf{e}_2, \mathbf{e}_3\}\), \(W = \operatorname{span}\{\mathbf{e}_3, \mathbf{e}_4, \mathbf{e}_5\}\): intersection \(\operatorname{span}\{\mathbf{e}_3\}\), \(U + W = \mathbb{R}^5\). The generic case.
- \(\dim = 2\) \(W = \operatorname{span}\{\mathbf{e}_2, \mathbf{e}_3, \mathbf{e}_4\}\): intersection \(\operatorname{span}\{\mathbf{e}_2, \mathbf{e}_3\}\), \(U + W\) four-dimensional.
- \(\dim = 3\) \(W = U\).
In \(\mathbb{R}^6\) the same two dimensions could meet only at \(\mathbf{0}\); in \(\mathbb{R}^4\) they would have to share at least a plane. The rule is \(\dim(U\cap W) \ge \dim U + \dim W - n\).
\(\dim(U\cap W) = 6 - \dim(U+W) \ge 1\); dimensions 1, 2, 3 all occur (coordinate subspaces).
Review:
121Prove that the eigenvalues of an idempotent matrix (\(P^2 = P\)) are 0 or 1, and that \(\operatorname{rank}P = \operatorname{tr}P\). Verify with \(P = \tfrac13J\) (\(J\) the \(3\times 3\) all-ones matrix) and with \(P = \begin{bmatrix} 1 & 1 \\ 0 & 0 \end{bmatrix}\).
Solution
If \(P\mathbf{v} = \lambda\mathbf{v}\), \(\mathbf{v} \ne \mathbf{0}\), then \(P^2\mathbf{v} = \lambda^2\mathbf{v}\), and \(P^2 = P\) gives \(\lambda^2\mathbf{v} = \lambda\mathbf{v}\), so \(\lambda^2 = \lambda\): \(\lambda \in \{0, 1\}\).
Rank equals trace. Every idempotent is diagonalizable: \(V = \ker P \oplus \operatorname{Im}P\) (write \(\mathbf{v} = (\mathbf{v} - P\mathbf{v}) + P\mathbf{v}\)), \(P\) is 0 on the first summand and the identity on the second (\(P(P\mathbf{u}) = P\mathbf{u}\)). In a basis adapted to this splitting, \(P = \operatorname{diag}(0, \dots, 0, 1, \dots, 1)\) with \(\operatorname{rank}P\) ones. The trace is basis-independent, so \(\operatorname{tr}P = \) number of ones \(= \operatorname{rank}P\).
\(P = \tfrac13J\): \(P^2 = \tfrac19J^2 = \tfrac19\cdot 3J = \tfrac13J = P\). Trace \(= 3\cdot\tfrac13 = 1 = \operatorname{rank}J\). It is the orthogonal projection onto \((1,1,1)\).
\(P = \begin{bmatrix} 1 & 1 \\ 0 & 0 \end{bmatrix}\): \(P^2 = \begin{bmatrix} 1 & 1 \\ 0 & 0 \end{bmatrix} = P\), trace 1, rank 1. Not symmetric, so it is an oblique projection: onto the \(x\)-axis (its image) along the line \(x + y = 0\) (its kernel, since \(P(1, -1) = \mathbf{0}\)). Eigenvalues 1 (eigenvector \(\mathbf{e}_1\)) and 0 (eigenvector \((1, -1)\)), as predicted.
\(\lambda^2 = \lambda\); \(P\) is diagonalizable with \(\operatorname{rank}P\) eigenvalues equal to 1; both examples have trace = rank = 1.
Review: ·
122Using \(\det(AB) = \det A\det B\), prove: (a) \(\det Q = \pm1\) for every orthogonal \(Q\); (b) \(\det(A^{-1}) = 1/\det A\); (c) similar matrices have equal determinants; (d) if \(A\) is \(n\times n\) with \(A^T = -A\) and \(n\) is odd, \(\det A = 0\).
Solution
(a) \(Q^TQ = I\) gives \(\det(Q^T)\det Q = 1\), and \(\det Q^T = \det Q\), so \((\det Q)^2 = 1\), \(\det Q = \pm1\). Rotations have \(+1\), reflections \(-1\).
(b) \(AA^{-1} = I\) gives \(\det A\cdot\det A^{-1} = \det I = 1\).
(c) \(\det(S^{-1}AS) = \det S^{-1}\det A\det S = \dfrac{1}{\det S}\det A\det S = \det A\). (The same manipulation does not work for the trace, which needs \(\operatorname{tr}(XY) = \operatorname{tr}(YX)\) instead.)
(d) \(\det A = \det A^T = \det(-A) = (-1)^n\det A = -\det A\) for odd \(n\), so \(\det A = 0\). Here \(\det(-A) = (-1)^n\det A\) because \(-A = (-I)A\) and \(\det(-I) = (-1)^n\): the product rule again.
All four are one-line consequences of multiplicativity; none of them is easy from the cofactor definition directly.
(a) \((\det Q)^2 = 1\); (b) \(\det A\det A^{-1} = 1\); (c) the \(\det S\) factors cancel; (d) \(\det A = (-1)^n\det A\).
Review: ·
123Prove: if \(\lambda\) is an eigenvalue of \(A\) with eigenvector \(\mathbf{v}\), then \(p(\lambda)\) is an eigenvalue of \(p(A)\) for every polynomial \(p\), with the same eigenvector. Use this to find the eigenvalues of \(B = A^3 - 2A + 5I\) when \(A = \begin{bmatrix} 2 & 1 \\ 1 & 2 \end{bmatrix}\), and compute \(\det B\) without forming \(B\).
Solution
By induction \(A^k\mathbf{v} = \lambda^k\mathbf{v}\): true for \(k = 0, 1\), and if \(A^k\mathbf{v} = \lambda^k\mathbf{v}\) then \(A^{k+1}\mathbf{v} = A(\lambda^k\mathbf{v}) = \lambda^kA\mathbf{v} = \lambda^{k+1}\mathbf{v}\). For \(p(x) = \sum c_kx^k\),
\[p(A)\mathbf{v} = \sum c_kA^k\mathbf{v} = \sum c_k\lambda^k\mathbf{v} = p(\lambda)\mathbf{v}.\]\(A = \begin{bmatrix} 2 & 1 \\ 1 & 2 \end{bmatrix}\) has eigenvalues \(1\) and \(3\) (eigenvectors \((1,-1)\), \((1,1)\)). With \(p(x) = x^3 - 2x + 5\): \(p(1) = 1 - 2 + 5 = 4\) and \(p(3) = 27 - 6 + 5 = 26\). Since \(A\) is diagonalizable (symmetric), these are all the eigenvalues of \(B\), with the same eigenvectors, so
\[\det B = 4\cdot 26 = 104\] \[\operatorname{tr}B = 30.\]Check by forming \(B\): \(A^2 = \begin{bmatrix} 5 & 4 \\ 4 & 5 \end{bmatrix}\), \(A^3 = \begin{bmatrix} 14 & 13 \\ 13 & 14 \end{bmatrix}\), \(B = A^3 - 2A + 5I = \begin{bmatrix} 14 - 4 + 5 & 13 - 2 \\ 13 - 2 & 15 \end{bmatrix} = \begin{bmatrix} 15 & 11 \\ 11 & 15 \end{bmatrix}\), \(\det B = 225 - 121 = 104\). Agreed.
\(p(A)\mathbf{v} = p(\lambda)\mathbf{v}\); eigenvalues of \(B\) are \(4\) and \(26\); \(\det B = 104\).
Review:
124Find a real \(2\times 2\) matrix \(A \ne I\) with \(A^3 = I\). Find its eigenvalues and characteristic polynomial, and show that no real \(2\times 2\) matrix other than \(I\) and such rotations satisfies \(A^3 = I\).
Solution
Rotation by \(120^\circ\) does it: \(R^3\) is rotation by \(360^\circ\), the identity.
\[A = \begin{bmatrix} \cos\tfrac{2\pi}{3} & -\sin\tfrac{2\pi}{3} \\ \sin\tfrac{2\pi}{3} & \cos\tfrac{2\pi}{3} \end{bmatrix} = \begin{bmatrix} -\tfrac12 & -\tfrac{\sqrt3}{2} \\ \tfrac{\sqrt3}{2} & -\tfrac12 \end{bmatrix}\] \[p(\lambda) = \lambda^2 - (\operatorname{tr}A)\lambda + \det A = \lambda^2 + \lambda + 1.\]Eigenvalues \(\lambda = \tfrac{-1 \pm i\sqrt3}{2} = e^{\pm 2\pi i/3}\), the primitive cube roots of unity; indeed \(\lambda^3 = 1\) and \(\lambda^2 + \lambda + 1 = 0\).
Classification. If \(A^3 = I\) then every eigenvalue satisfies \(\lambda^3 = 1\), so \(\lambda \in \{1, e^{\pm 2\pi i/3}\}\). For a real \(2\times 2\) matrix the eigenvalues are both real or a conjugate pair. If both are real they both equal 1; then \(A = I + N\) with \(N^2 = 0\), and \(A^3 = I + 3N = I\) forces \(N = 0\), \(A = I\). Otherwise the eigenvalues are \(e^{\pm 2\pi i/3}\), the characteristic polynomial is \(\lambda^2 + \lambda + 1\), and \(A\) is similar to the rotation above: \(A = SRS^{-1}\) for some invertible \(S\). So the solutions are \(I\) and all matrices \(SRS^{-1}\) (rotation by \(\pm120^\circ\) in some possibly skewed coordinate system), e.g. \(\begin{bmatrix} 0 & -1 \\ 1 & -1 \end{bmatrix}\), which has trace \(-1\) and determinant 1.
\(A = R_{120^\circ}\), \(p(\lambda) = \lambda^2 + \lambda + 1\), \(\lambda = e^{\pm2\pi i/3}\); all solutions are \(I\) or similar to \(R_{120^\circ}\).
Review: ·
125Prove that \(A^TA\) is invertible if and only if the columns of \(A\) are linearly independent, and conclude that the normal equations \(A^TA\hat{\mathbf{x}} = A^T\mathbf{b}\) have a unique solution exactly in that case. Show the normal equations are always consistent.
Solution
Null spaces agree. If \(A\mathbf{x} = \mathbf{0}\) then \(A^TA\mathbf{x} = \mathbf{0}\). Conversely, if \(A^TA\mathbf{x} = \mathbf{0}\) then \(\mathbf{x}^TA^TA\mathbf{x} = \|A\mathbf{x}\|^2 = 0\), so \(A\mathbf{x} = \mathbf{0}\). Hence \(\operatorname{Nul}(A^TA) = \operatorname{Nul}A\).
\(A^TA\) is square (\(n\times n\)), so it is invertible iff its null space is trivial iff \(\operatorname{Nul}A = \{\mathbf{0}\}\) iff the columns of \(A\) are independent. In that case the normal equations have the unique solution \(\hat{\mathbf{x}} = (A^TA)^{-1}A^T\mathbf{b}\).
Always consistent. \(A^T\mathbf{b}\) must lie in \(\operatorname{Col}(A^TA)\). Since \(\operatorname{Nul}(A^TA) = \operatorname{Nul}A\), rank–nullity gives \(\operatorname{rank}(A^TA) = \operatorname{rank}A = \operatorname{rank}A^T\), and \(\operatorname{Col}(A^TA) \subseteq \operatorname{Col}A^T\) (each column of \(A^TA\) is \(A^T\) times something); equal dimensions force \(\operatorname{Col}(A^TA) = \operatorname{Col}A^T \ni A^T\mathbf{b}\). Geometrically: \(\mathbf{b}\) always has a projection onto \(\operatorname{Col}A\), and any \(\hat{\mathbf{x}}\) with \(A\hat{\mathbf{x}}\) equal to that projection solves the normal equations; when the columns are dependent there are infinitely many such \(\hat{\mathbf{x}}\), all giving the same projection.
\(\operatorname{Nul}(A^TA) = \operatorname{Nul}A\) via \(\|A\mathbf{x}\|^2\); so invertible iff independent columns; \(\operatorname{Col}(A^TA) = \operatorname{Col}A^T\) makes the normal equations consistent.
Review:
126Find the matrix of orthogonal projection onto the line \(y = 3x\), verify \(P^2 = P\) and \(P^T = P\), find its eigenvalues and eigenvectors, and compute the projection of \((5, 5)\).
Solution
Unit vector along the line: \(\mathbf{u} = \tfrac{1}{\sqrt{10}}(1, 3)\). Then
\[P = \mathbf{u}\mathbf{u}^T = \frac{1}{10}\begin{bmatrix} 1 & 3 \\ 3 & 9 \end{bmatrix}.\]\(P^T = P\) is visible. \(P^2 = \mathbf{u}(\mathbf{u}^T\mathbf{u})\mathbf{u}^T = \mathbf{u}\mathbf{u}^T = P\); numerically \(\tfrac{1}{100}\begin{bmatrix} 1 + 9 & 3 + 27 \\ 3 + 27 & 9 + 81 \end{bmatrix} = \tfrac{1}{100}\begin{bmatrix} 10 & 30 \\ 30 & 90 \end{bmatrix} = P\).
Eigenvalues. \(P\mathbf{u} = \mathbf{u}\) (eigenvalue 1 along the line) and \(P(3, -1) = \tfrac{1}{10}(3 - 3, 9 - 9) = \mathbf{0}\) (eigenvalue 0 across it). \(\operatorname{tr}P = 1 = \operatorname{rank}P\), \(\det P = 0\).
Projection of \((5, 5)\): \(P(5, 5) = \tfrac{1}{10}(5 + 15, 15 + 45) = (2, 6)\). Check: \((2, 6)\) is on \(y = 3x\), and the residual \((5, 5) - (2, 6) = (3, -1)\) is perpendicular to \((1, 3)\). The reflection across the same line is \(2P - I = \tfrac15\begin{bmatrix} -4 & 3 \\ 3 & 4 \end{bmatrix}\), and the projection onto the perpendicular line is \(I - P\).
\(P = \tfrac{1}{10}\begin{bmatrix} 1 & 3 \\ 3 & 9 \end{bmatrix}\); eigenvalues 1 on \((1,3)\), 0 on \((3,-1)\); \(P(5,5) = (2, 6)\).
Review: ·
127The adjacency matrix of the triangle graph (three vertices, each pair joined by an edge) is \(A = J - I\). Show that \((A^k)_{ij}\) counts walks of length \(k\) from vertex \(i\) to vertex \(j\), compute \(A^3\) using eigenvalues, and find the number of closed walks of length 3 and of length 10 from a vertex to itself.
Solution
Counting walks. \((A^2)_{ij} = \sum_m a_{im}a_{mj}\) counts the vertices \(m\) adjacent to both \(i\) and \(j\), i.e. the walks \(i \to m \to j\) of length 2. Inductively \((A^k)_{ij} = \sum_m (A^{k-1})_{im}a_{mj}\) counts walks of length \(k - 1\) to some \(m\) followed by an edge \(m \to j\).
Eigenvalues. \(J\) has eigenvalues \(3, 0, 0\), so \(A = J - I\) has \(2, -1, -1\). With the projections \(\tfrac13J\) (onto \(\mathbf{1}\)) and \(I - \tfrac13J\),
\[A^k = 2^k\cdot\tfrac13J + (-1)^k\left(I - \tfrac13J\right) = \frac{2^k - (-1)^k}{3}J + (-1)^kI.\]For \(k = 3\): \(A^3 = \tfrac{8 + 1}{3}J - I = 3J - I = \begin{bmatrix} 2 & 3 & 3 \\ 3 & 2 & 3 \\ 3 & 3 & 2 \end{bmatrix}\). Check directly: \(A^2 = J^2 - 2J + I = J + I\), \(A^3 = (J + I)(J - I) = J^2 - I = 3J - I\).
Closed walks of length 3 from a vertex: \((A^3)_{11} = 2\) (go around the triangle clockwise or counterclockwise). Length 10: \((A^{10})_{11} = \tfrac{2^{10} - 1}{3} + 1 = \tfrac{1023}{3} + 1 = 342\). The total number of closed walks of length \(k\) is \(\operatorname{tr}A^k = 2^k + 2(-1)^k\), the sum of the \(k\)-th powers of the eigenvalues.
\(A^k = \tfrac{2^k - (-1)^k}{3}J + (-1)^kI\); \(A^3 = 3J - I\); closed walks: 2 of length 3, 342 of length 10.
Review: ·
128In a Leontief input–output model, producing one unit of sector 1 consumes 0.2 units of sector 1 and 0.4 units of sector 2; one unit of sector 2 consumes 0.3 units of sector 1 and 0.1 of sector 2. Find the production \(\mathbf{x}\) needed to meet an external demand \(\mathbf{d} = (10, 20)\).
Solution
The consumption matrix (column \(j\) = inputs needed per unit of sector \(j\)) is \(C = \begin{bmatrix} 0.2 & 0.3 \\ 0.4 & 0.1 \end{bmatrix}\). Production must cover internal consumption plus demand: \(\mathbf{x} = C\mathbf{x} + \mathbf{d}\), i.e.
\[(I - C)\mathbf{x} = \mathbf{d}\] \[I - C = \begin{bmatrix} 0.8 & -0.3 \\ -0.4 & 0.9 \end{bmatrix}\] \[\det(I - C) = 0.72 - 0.12 = 0.6.\] \[\mathbf{x} = (I - C)^{-1}\mathbf{d} = \frac{1}{0.6}\begin{bmatrix} 0.9 & 0.3 \\ 0.4 & 0.8 \end{bmatrix}\begin{bmatrix} 10 \\ 20 \end{bmatrix} = \frac{1}{0.6}\begin{bmatrix} 15 \\ 20 \end{bmatrix} = \begin{bmatrix} 25 \\ 33\tfrac13 \end{bmatrix}.\]Check: \(C\mathbf{x} = (5 + 10,\ 10 + 3.33) = (15, 13.33)\), and \(\mathbf{x} - C\mathbf{x} = (10, 20) = \mathbf{d}\). The economy must produce \(25\) and \(33.3\) units to deliver \(10\) and \(20\) to consumers; the rest is eaten internally. Because every column of \(C\) sums to less than 1 (\(0.6\) and \(0.4\)), \(I - C\) is invertible with nonnegative inverse \(I + C + C^2 + \cdots\), so every nonnegative demand is feasible.
\(\mathbf{x} = (I - C)^{-1}\mathbf{d} = (25, 100/3)\).
Review: ·
129In a least squares fit of \(y = a + bx\) (or any model with a constant term), prove that the residuals sum to zero and that the fitted line passes through the point of means \((\bar x, \bar y)\).
Solution
The residual \(\mathbf{r} = \mathbf{b} - A\hat{\mathbf{x}}\) is orthogonal to every column of \(A\) (that is the content of the normal equations \(A^T\mathbf{r} = \mathbf{0}\)). The model has a constant term, so one column of \(A\) is \(\mathbf{1} = (1, \dots, 1)\), and
\[{\mathbf{1}\cdot \mathbf{r}} = \sum_i r_i = 0.\]Writing \(r_i = y_i - (a + bx_i)\) and summing: \(\sum y_i - na - b\sum x_i = 0\), i.e. \(\bar y = a + b\bar x\): the point \((\bar x, \bar y)\) satisfies the fitted equation. (The second normal equation, orthogonality to the \(x\)-column, says \(\sum x_ir_i = 0\): the residuals are uncorrelated with \(x\).)
Both facts fail for a model without an intercept (\(y = bx\) through the origin), where \(\mathbf{1}\) is not in the column space; there the residuals need not sum to zero. For the data \((1,1), (2,2), (3,2), (4,4)\) the fitted line \(y = 0.9x\) happens to have intercept 0 but was fitted with an intercept, so its residuals \(0.1, 0.2, -0.7, 0.4\) still sum to zero and it passes through \((2.5, 2.25)\).
\(\mathbf{1} \in \operatorname{Col}A\) and \(\mathbf{r} \perp \operatorname{Col}A\) give \(\sum r_i = 0\), which rearranges to \(\bar y = a + b\bar x\).
Review: ·
130Let \(R_z\) be rotation by \(90^\circ\) about the \(z\)-axis and \(R_x\) rotation by \(90^\circ\) about the \(x\)-axis (both counterclockwise looking down the axis toward the origin). Compute \(M = R_xR_z\), show it is a rotation, and find its axis and angle.
Solution
\[R_z = \begin{bmatrix} 0 & -1 & 0 \\ 1 & 0 & 0 \\ 0 & 0 & 1 \end{bmatrix}\] \[R_x = \begin{bmatrix} 1 & 0 & 0 \\ 0 & 0 & -1 \\ 0 & 1 & 0 \end{bmatrix}\] \[M = R_xR_z = \begin{bmatrix} 0 & -1 & 0 \\ 0 & 0 & -1 \\ 1 & 0 & 0 \end{bmatrix}.\](\(M\) acts first by \(R_z\), then by \(R_x\).) \(M\) is a product of orthogonal matrices, so orthogonal, and \(\det M = \det R_x\det R_z = 1\cdot 1 = 1\): a rotation. Read off its columns: \(M\mathbf{e}_1 = \mathbf{e}_3\), \(M\mathbf{e}_2 = -\mathbf{e}_1\), \(M\mathbf{e}_3 = -\mathbf{e}_2\), a signed permutation of the axes.
Axis. Solve \((M - I)\mathbf{v} = \mathbf{0}\): \(-v_1 - v_2 = 0\), \(-v_2 - v_3 = 0\), \(v_1 - v_3 = 0\), so \(\mathbf{v} = (1, -1, 1)\). Check: \(M(1, -1, 1) = (1, -1, 1)\).
Angle. \(\operatorname{tr}M = 0 = 1 + 2\cos\theta\) gives \(\cos\theta = -\tfrac12\), \(\theta = 120^\circ\). Consistent with \(M^3 = I\): \(M\) sends \(\mathbf{e}_1 \to \mathbf{e}_3 \to -\mathbf{e}_2 \to \mathbf{e}_1\): indeed \(M^3\mathbf{e}_1 = M^2\mathbf{e}_3 = M(-\mathbf{e}_2) = \mathbf{e}_1\). Two quarter-turns about perpendicular axes compose to a third-turn about a diagonal, a fact familiar from turning a cube.
\(M = \begin{bmatrix} 0 & -1 & 0 \\ 0 & 0 & -1 \\ 1 & 0 & 0 \end{bmatrix}\), orthogonal with \(\det 1\); axis \((1,-1,1)\), angle \(120^\circ\).
Review: ·
131(a) Find the area of the parallelogram spanned by \((2, 1)\) and \((1, 3)\). (b) Find the area of the triangle with vertices \((1, 1), (4, 2), (2, 5)\). (c) The linear map with matrix \(A = \begin{bmatrix} 1 & 2 & 0 \\ 0 & 1 & 0 \\ 3 & 0 & 2 \end{bmatrix}\) is applied to a solid of volume 7. Find the volume of the image.
Solution
(a) Area \(= |\det[\mathbf{u}\ \mathbf{v}]| = \left|\det\begin{bmatrix} 2 & 1 \\ 1 & 3 \end{bmatrix}\right| = |6 - 1| = 5\).
(b) Translate so one vertex is at the origin: edges \((4,2) - (1,1) = (3, 1)\) and \((2,5) - (1,1) = (1, 4)\). The triangle is half the parallelogram:
\[\text{Area} = \tfrac12\left|\det\begin{bmatrix} 3 & 1 \\ 1 & 4 \end{bmatrix}\right| = \tfrac12|12 - 1| = \tfrac{11}{2}.\](c) A linear map multiplies every volume by \(|\det A|\). Expanding along the third column (only \(a_{33} = 2\) is nonzero there): \(\det A = 2\cdot\det\begin{bmatrix} 1 & 2 \\ 0 & 1 \end{bmatrix} = 2\). The image has volume \(2\cdot 7 = 14\). The sign of \(\det A\) (positive here) says the map preserves orientation; a negative determinant would also flip handedness. Note that the shear entries \(2\) and \(3\) do not affect the volume at all.
(a) \(5\); (b) \(11/2\); (c) \(14\).
Review: ·
132Let \(A\) and \(B\) be \(n\times n\) matrices with \(AB = I\). Prove that \(BA = I\), so a one-sided inverse of a square matrix is two-sided. Show by example that this fails for non-square matrices.
Solution
From \(AB = I\): if \(B\mathbf{x} = \mathbf{0}\) then \(\mathbf{x} = AB\mathbf{x} = \mathbf{0}\), so \(\operatorname{Nul}B = \{\mathbf{0}\}\). \(B\) is square with trivial null space, hence invertible (invertible matrix theorem): there is \(B^{-1}\) with \(BB^{-1} = B^{-1}B = I\). Multiply \(AB = I\) on the right by \(B^{-1}\): \(A = B^{-1}\). Therefore \(BA = BB^{-1} = I\).
(Alternative: \(\det A\det B = 1\) shows both are invertible, then the same algebra.)
Non-square counterexample. \(A = \begin{bmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \end{bmatrix}\) (\(2\times 3\)) and \(B = \begin{bmatrix} 1 & 0 \\ 0 & 1 \\ 0 & 0 \end{bmatrix}\) (\(3\times 2\)): \(AB = I_2\), but \(BA = \begin{bmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 0 \end{bmatrix} \ne I_3\). Indeed \(BA\) is \(3\times 3\) of rank at most 2, so it can never be \(I_3\): a wide matrix can have a right inverse and a tall one a left inverse, but neither can have both. The squareness in the theorem is used exactly where "trivial null space implies invertible" is invoked.
\(\operatorname{Nul}B = \{\mathbf{0}\}\) makes the square \(B\) invertible, then \(A = B^{-1}\); for a \(2\times 3\) and a \(3\times 2\) matrix \(AB = I_2\) but \(BA \ne I_3\).
Review: ·
133Let \(\mathbf{a}\) be a unit vector in \(\mathbb{R}^3\) and define \(T(\mathbf{x}) = {\mathbf{a}\times \mathbf{x}}\). Show \(T\) is linear, find its matrix \(K\) for \(\mathbf{a} = (0, 0, 1)\), show \(K\) is skew-symmetric with \(K^3 = -K\), and describe \(T\) geometrically.
Solution
The cross product is bilinear, so \(T(c\mathbf{x} + d\mathbf{y}) = \mathbf{a}\times(c\mathbf{x} + d\mathbf{y}) = cT(\mathbf{x}) + dT(\mathbf{y})\): linear.
For \(\mathbf{a} = \mathbf{e}_3\): \({\mathbf{e}_3\times \mathbf{e}_1} = \mathbf{e}_2\), \({\mathbf{e}_3\times \mathbf{e}_2} = -\mathbf{e}_1\), \({\mathbf{e}_3\times \mathbf{e}_3} = \mathbf{0}\). Columns:
\[K = \begin{bmatrix} 0 & -1 & 0 \\ 1 & 0 & 0 \\ 0 & 0 & 0 \end{bmatrix}\] \[K^T = -K.\]\(K^2 = \begin{bmatrix} -1 & 0 & 0 \\ 0 & -1 & 0 \\ 0 & 0 & 0 \end{bmatrix}\) (minus the projection onto the \(xy\)-plane), so \(K^3 = K^2K = -K\). The eigenvalues are \(0\) (eigenvector \(\mathbf{a}\), since \({\mathbf{a}\times \mathbf{a}} = \mathbf{0}\)) and \(\pm i\) (purely imaginary, as skew-symmetry requires); \(K\) is singular, \(\det K = 0\), consistent with every odd-size skew-symmetric matrix.
Geometry. \(T\) kills the component of \(\mathbf{x}\) along \(\mathbf{a}\) and rotates the perpendicular component by \(90^\circ\) about \(\mathbf{a}\) (\(\mathbf{e}_1 \to \mathbf{e}_2 \to -\mathbf{e}_1\)): a projection followed by a quarter-turn. That is why \(K^2\) is \(-\)(projection) and why \(e^{\theta K} = I + \sin\theta\,K + (1 - \cos\theta)K^2\) is the rotation by \(\theta\) about \(\mathbf{a}\) (Rodrigues’ formula). For a general unit \(\mathbf{a} = (a_1, a_2, a_3)\), \(K = \begin{bmatrix} 0 & -a_3 & a_2 \\ a_3 & 0 & -a_1 \\ -a_2 & a_1 & 0 \end{bmatrix}\).
\(K = \begin{bmatrix} 0 & -1 & 0 \\ 1 & 0 & 0 \\ 0 & 0 & 0 \end{bmatrix}\), \(K^T = -K\), \(K^3 = -K\); project onto the plane \(\perp\mathbf{a}\) then rotate \(90^\circ\).
Review: ·
134Two tanks each hold 100 L of brine and exchange liquid at 2 L/min in each direction (well mixed). Tank 1 starts with 10 kg of salt, tank 2 with none. Set up \(\mathbf{x}' = A\mathbf{x}\) for the salt amounts, solve it by diagonalization, and describe the long-run state.
Solution
Salt leaves each tank at \(2\cdot\dfrac{x_i}{100}\) kg/min and arrives from the other at the same rate per kilogram there:
\[\mathbf{x}' = \frac{1}{50}\begin{bmatrix} -1 & 1 \\ 1 & -1 \end{bmatrix}\mathbf{x} = A\mathbf{x}\] \[\mathbf{x}(0) = \begin{bmatrix} 10 \\ 0 \end{bmatrix}.\]\(A = \tfrac{1}{50}(J - 2I)\) has eigenvalues \(\tfrac{1}{50}(2 - 2) = 0\) (eigenvector \((1, 1)\)) and \(\tfrac{1}{50}(0 - 2) = -\tfrac{1}{25}\) (eigenvector \((1, -1)\)). Decompose \(\mathbf{x}(0) = 5(1, 1) + 5(1, -1)\):
\[\mathbf{x}(t) = 5e^{0t}\begin{bmatrix} 1 \\ 1 \end{bmatrix} + 5e^{-t/25}\begin{bmatrix} 1 \\ -1 \end{bmatrix} = \begin{bmatrix} 5 + 5e^{-t/25} \\ 5 - 5e^{-t/25} \end{bmatrix}.\]Check: \(x_1 + x_2 = 10\) for all \(t\) (salt is conserved: eigenvalue 0 on the total), and \(x_1' = -\tfrac15e^{-t/25} = \tfrac{1}{50}(x_2 - x_1) = \tfrac{1}{50}(-10e^{-t/25})\). The difference \(x_1 - x_2 = 10e^{-t/25}\) decays with time constant 25 min; after 25 ln 2 ≈ 17.3 min the imbalance has halved, and in the long run each tank holds 5 kg. In matrix form \(e^{At} = \tfrac12\begin{bmatrix} 1 + e^{-t/25} & 1 - e^{-t/25} \\ 1 - e^{-t/25} & 1 + e^{-t/25} \end{bmatrix}\).
\(\mathbf{x}(t) = (5 + 5e^{-t/25},\ 5 - 5e^{-t/25})\); total conserved, each tank tends to 5 kg.
Review: ·