Unfinished learning resource · TMP-SCI-132. Units 1–8 are available; whole-course validation remains unfinished. This is not a completed semester, registered course, degree credit or accreditation. The teaching has received bounded assistant review, not subject-specialist or learner validation. Workload estimates and rubrics remain unpiloted. All application data are fictional. No account, installation, purchase or private upload is needed.
Study route
Unit 5 found bases in which a linear map acts by separate scalings. Unit 6 found bases that preserve lengths and angles. For a real symmetric matrix these two wishes are compatible: an orthonormal eigenbasis exists. The same directions reveal whether a quadratic expression is always positive, can be zero away from the origin, or can take either sign. They also describe how least-squares error grows away from a fit.
Preparation: real eigenvalues and eigenspaces, matrix multiplication and transpose, basis coordinates, dot products, normalization, Gram–Schmidt, kernels and the least-squares normal equations. Review Units 5–6 where necessary. All vectors and matrices here are real. No calculus, probability model or complex-inner-product theory is assumed.
The retained week-12 allocation is eight hours: three teaching/guided, one independent practice and corrections, one homework, one quiz/delayed work and two project hours. This is an unpiloted design budget, not a measured completion time. Work in three sessions. Attempt each question before opening the explained answers; retain your first attempt and correction. Typed, handwritten or spoken explanations with a transcript are equally acceptable. Every diagram has a complete text equivalent; no colour, plotting software or drawing is required.
Outcomes
- O1. Construct and verify orthogonal diagonalizations, including repeated eigenspaces, and distinguish the theorem from the proof supplied here.
- O2. Represent a real quadratic form by its symmetric matrix and correctly change to orthonormal coordinates.
- O3. Classify definite, semidefinite and indefinite forms using justified spectral or small-matrix tests, including boundary cases.
- O4. Derive directional bounds and interpret level sets without confusing a form's value with a vector's length.
- O5. Explain least-squares curvature, uniqueness and flat directions, separating a chosen error measure from evidence about a real process.
Readiness
R1. For v=(2,1), w=(−1,2), find their dot product and norms, then normalize them. Why is the resulting two-column matrix invertible?
R2. For S=[5 2;2 2], compute det(zI−S), factor it and verify S(2,1)=6(2,1).
R3. Expand (u+v)²+(u−v)². Explain why the mixed terms cancel.
R4. For A=[1 0;0 1;1 1], compute AᵀA and show its kernel is {0}. Which Unit 6 result connects this to uniqueness of least-squares coefficients?
Session A. When the eigenbasis can be orthonormal
A1. Symmetry has an algebraic consequence
A square real matrix S is symmetric if Sᵀ=S. Its entries mirror across the diagonal. A square real matrix Q is orthogonal if QᵀQ=I. Its columns are an orthonormal basis, Q⁻¹=Qᵀ, and ||Qy||²=yᵀQᵀQy=||y||². The words describe different properties: a symmetric matrix need not be orthogonal, and an orthogonal matrix need not be symmetric.
For symmetric S and real vectors u,v,
(Su)·v = u·(Sv).
If Su=λu and Sv=μv, then λ(u·v)=μ(u·v). When λ≠μ, subtraction and division by the nonzero λ−μ give u·v=0. Thus eigenvectors for distinct eigenvalues are orthogonal. This proof does not say arbitrary eigenvectors for the same eigenvalue are orthogonal. Within a repeated eigenspace, take a basis and apply Gram–Schmidt. Its linear combinations remain in that eigenspace, so the resulting orthonormal vectors retain their eigenvalue.
A2. Precisely what is proved here
Real symmetric spectral theorem. Every real symmetric n×n matrix has an orthonormal basis of real eigenvectors. Equivalently, S=QDQᵀ for a real orthogonal Q and real diagonal D. Zero and repeated eigenvalues are allowed.
We use this general theorem but do not prove it in all dimensions here. Orthogonality of distinct eigenspaces alone does not prove that enough real eigenvectors exist. The following argument does prove the entire assertion for 2×2 matrices, the main assessed calculation size in this unit.
Write S=[a b;b c]. Its characteristic polynomial is z²−(a+c)z+ac−b², whose discriminant is (a−c)²+4b²≥0. If the discriminant is positive, there are two distinct real roots. At each root S−λI is singular, so it has a nonzero real kernel vector. The preceding argument makes these two vectors perpendicular; normalizing them gives an orthonormal basis of R². If the discriminant is zero, both a−c and b are zero. Then S=aI and any orthonormal basis consists of eigenvectors. This covers both cases without an unproved assertion about repeated roots.
For any size, the converse is immediate: if S=QDQᵀ with Q orthogonal and D real diagonal, then Sᵀ=QDᵀQᵀ=S. Hence a real nonsymmetric matrix cannot have a real orthogonal diagonalization, even if it has an ordinary eigenbasis.
A3. A full worked diagonalization
Take S=[5 2;2 2]. Its characteristic polynomial is (z−6)(z−1). E₆=span{(2,1)} and E₁=span{(−1,2)}. Normalize these vectors, preserving the matching eigenvalue order:
q₁=(2,1)/sqrt(5), q₂=(−1,2)/sqrt(5),
Q=(1/sqrt(5))[2 −1;1 2], D=diag(6,1).
QᵀQ=I and SQ=QD verify the claimed factorization S=QDQᵀ. The input coordinates are y=Qᵀx; reconstruction is x=Qy. Q changes the description, not the underlying vector. Switching the two columns is allowed only if the corresponding entries of D switch too. Eigenvector signs may change without changing S. Orthogonal diagonalization is not unique.
Diagram A, text equivalent. The unit direction q₁ points two units right for every unit up; q₂ points one left for every two up. These directions are perpendicular. S scales vectors along the first line by 6 and along the second by 1. This describes the map; it does not yet describe the scalar expression xᵀSx.
G1. Verify QᵀQ=I and SQ=QD for this example. Find y for x=(3,4), reconstruct x and compare ||x||² with ||y||².
G2. Let T=[2 1 0;1 2 0;0 0 3]. Find its eigenspaces. The vectors (1,1,0),(1,1,1) lie in E₃ but are not orthogonal. Apply Gram–Schmidt within E₃ and combine with a unit E₁ vector to construct Q,D. Verify TQ=QD. Explain why this computation is not a proof of the spectral theorem for every 3×3 matrix.
Session B. Quadratic expressions and their signs
B1. The mixed coefficient is doubled
A real quadratic form is a homogeneous degree-two expression q(x)=xᵀSx. For a symmetric 2×2 matrix,
q(u,v)=a u²+2b uv+c v², S=[a b;b c].
Thus 5u²+4uv+2v² corresponds to [5 2;2 2], not [5 4;4 2]. Homogeneous means q(tx)=t²q(x). A translated least-squares objective generally also has linear and constant terms, so it is not itself a homogeneous quadratic form.
Even when an expression is first supplied with a nonsymmetric B, its symmetric part S=(B+Bᵀ)/2 gives the same scalar: xᵀBx=xᵀSx. To see this, set K=(B−Bᵀ)/2. The scalar xᵀKx equals its transpose xᵀKᵀx=−xᵀKx, so it is zero over R. This does not say B and S represent the same linear map or have the same eigenvalues. For quadratic-form sign tests, first use the symmetric representative.
With S=QDQᵀ and x=Qy,
q(x)=yᵀDy=λ₁y₁²+⋯+λₙyₙ².
The mixed terms disappear because these are eigenvector coordinates. For the worked S, q(x)=6y₁²+y₂²; at x=(3,4), y=(10/sqrt(5),5/sqrt(5)) and q=125. The same value comes from 5·9+4·12+2·16. Length remains 25, not 125: an orthogonal coordinate change preserves length but does not turn this form into the ordinary squared norm.
G3. For B=[2 6;0 2], find its symmetric part, the scalar quadratic form and the symmetric part's eigenvalues. Give a vector where the form is negative. B has eigenvalues 2,2: why does that not prove the form is positive definite?
B2. Definitions require every direction
For real symmetric S and q(x)=xᵀSx:
- Positive definite: q(x)>0 for every nonzero x. This holds exactly when every eigenvalue is positive.
- Negative definite: q(x)<0 for every nonzero x. This holds exactly when every eigenvalue is negative.
- Positive semidefinite: q(x)≥0 for every x, equivalently every eigenvalue is nonnegative.
- Negative semidefinite: q(x)≤0 for every x, equivalently every eigenvalue is nonpositive.
- Indefinite: some vector has positive value and some vector has negative value, equivalently there is a positive and a negative eigenvalue.
These semidefinite definitions include definite matrices. Say “positive semidefinite but not definite” when a nonzero zero direction exists. The zero matrix is both positive and negative semidefinite, and neither definite nor indefinite. A singular matrix need not be semidefinite: diag(1,−1,0) is singular and indefinite.
Here is why the spectral tests hold. In eigenvector coordinates q is a sum of eigenvalues times squares. Nonnegative eigenvalues give nonnegative values; all positive eigenvalues give a positive value whenever y≠0, because some coordinate is nonzero. Conversely testing a unit eigenvector gives precisely its eigenvalue. The negative and mixed cases follow the same reasoning. These arguments rely on the stated spectral theorem in general dimension, not just on a list of numerical examples.
For semidefinite S, q(x)=0 exactly when x belongs to ker S: every nonzero-eigenvalue coordinate must vanish. Without semidefiniteness this fails. For diag(1,−1), x=(1,1) has q(x)=0 but Sx=(1,−1)≠0. Cancellation is not a kernel condition.
G4. Classify diag(−2,−5), [2 −2;−2 2], [0 2;2 0] and the 2×2 zero matrix. Give explicit sign or zero-direction witnesses where relevant; state all applicable semidefinite labels for zero.
B3. A 2×2 test without solving eigenvalues
When a≠0, complete the square:
a u²+2buv+c v² = a(u+(b/a)v)² + ((ac−b²)/a)v².
Therefore a real symmetric 2×2 matrix is positive definite exactly when a>0 and ac−b²>0. Sufficiency follows because the two squares cannot both vanish for nonzero (u,v). Necessity uses q(1,0)=a>0 and then chooses (u,v)=(−b/a,1), forcing (ac−b²)/a>0. Negative definiteness follows by applying this criterion to −S: a<0 and ac−b²>0.
For positive semidefiniteness, the exact 2×2 criterion is a≥0, c≥0 and ac−b²≥0. Necessity of a,c≥0 comes from coordinate directions. If a>0, the square completion forces the determinant to be nonnegative. If a=0 and b≠0, fix v=1 and choose u so 2bu+c<0, a contradiction; thus b=0. Conversely, for a>0 the displayed squares are nonnegative; if a=0, the determinant condition forces b=0 and q=cv²≥0. This separate boundary case avoids division by zero. Negative semidefiniteness follows by testing −S.
Determinant alone cannot distinguish positive from negative definiteness. Positive diagonal entries alone are also insufficient: [1 2;2 1] gives q(1,−1)=−2. These are 2×2 criteria, not an instruction to inspect only the first two rows of a larger matrix.
B4. Directional bounds and level sets
Let λ_min and λ_max be the smallest and largest eigenvalues of symmetric S. Then
λ_min ||x||² ≤ xᵀSx ≤ λ_max ||x||².
This follows by bounding each λ_i y_i² and adding, since ||y||²=||x||². On the unit sphere the extreme form values are λ_min and λ_max. Equality holds exactly in the corresponding extreme eigenspace, apart from the zero vector which satisfies both equalities. “Largest” here means the usual signed order, not largest absolute value.
For our worked positive definite S, the level q=6 becomes 6y₁²+y₂²=6. It is an ellipse with semiaxes 1 along q₁ and sqrt(6) along q₂. Larger positive eigenvalue means a shorter semiaxis for a fixed positive form value. For diag(1,0), q=1 gives the two lines y₁=±1, with y₂ unrestricted. For diag(1,−1), q=1 gives a hyperbola; q=0 instead gives two crossing lines. “A quadratic form makes an ellipse” needs a definiteness hypothesis and a positive level.
Diagram B, text equivalent. In the worked example, the ellipse is centered at the origin. Its intersections with the q₁-axis are ±q₁; its intersections with the q₂-axis are ±sqrt(6)q₂. No axis is horizontal or vertical in the original coordinates. The descriptions and equations specify the entire level set without an image.
G5. For C=[2 1;1 2], prove the unit-vector bounds for xᵀCx, identify all unit directions attaining them and describe the semiaxes of xᵀCx=3.
Session C. Why an error surface has a unique fit or a flat direction
C1. Translate to a least-squares solution
For a real m×n matrix A and vector b, let F(x)=||Ax−b||². Here residuals use predicted minus observed, Ax−b, the opposite sign to Unit 6's b−Ax. Their squared norms and zero normal equations are unchanged; keep the chosen sign consistent when reporting a residual. Unit 6 gives at least one minimizer x* satisfying Aᵀ(Ax*−b)=0. Put h=x−x*. Expanding and using that normal equation,
F(x*+h)=F(x*)+2hᵀAᵀ(Ax*−b)+hᵀAᵀAh
=F(x*)+hᵀAᵀAh.
The Gram matrix S=AᵀA is symmetric, and hᵀSh=||Ah||²≥0. It is positive definite exactly when ker A={0}, or equivalently A has full column rank. Thus the coefficient fit is unique exactly then. In the deficient-rank case, all minimizers are x*+ker A. The fitted vector Ax* remains unique, as proved in Unit 6. Spectral language explains the same distinction: a zero eigenvalue of S gives a flat direction in coefficient space; positive eigenvalues give growth rates in normalized directions.
C2. A complete small example
Take A=[1 0;0 1;1 1], b=(1,0,2). The normal equations are [2 1;1 2]x=(3,2), giving x*=(4/3,1/3). The residual Ax*−b=(1/3,1/3,−1/3) has squared norm 1/3. Use q₊=(1,1)/sqrt(2), q₋=(1,−1)/sqrt(2) and write h=y₊q₊+y₋q₋. Then
F(x*+h)=1/3+3y₊²+y₋².
A unit displacement along the sum direction increases F by 3; a unit displacement along the difference direction increases it by 1. The inequality F≤4/3 describes a filled ellipse centered at x*, with semiaxes 1/sqrt(3) and 1. Its boundary has F=4/3. This is a chosen error budget, not a statistical confidence region: no random-error distribution or probability has been supplied.
Diagram C, text equivalent. Shift the origin to x*. Through that center draw perpendicular sum and difference directions. The acceptable-error region extends 1/sqrt(3) in each sum direction and 1 in each difference direction. The center has error 1/3; the boundary has error 4/3. The entire region is specified by 3y₊²+y₋²≤1.
G6. Verify every normal-equation, residual and eigenvalue calculation in C2. Compare the increases F(x*+h)−F(x*) for h=(1,0), h=(1,1) and h=(1,−1). Explain why those last two values should not be compared with a unit-direction value until the displacements are normalized.
Independent practice
I1. Orthogonally diagonalize [4 −1;−1 4]. Expand its form and classify it. Give the unit directions where its form is smallest and largest.
I2. Represent 2u²+6uv+5v² by a symmetric matrix. Classify it by completing the square, and find the semiaxes of q=1 using its eigenvalues.
I3. Classify [0 0;0 4], [0 1;1 0] and [−1 0;0 −3]. Explain why a zero first diagonal entry is not permission to use a formula dividing by that entry.
I4. For S_t=[t 1;1 t] and real t, classify the form for all t, including t=±1. Identify any nonzero zero directions at those boundary values.
I5. For S=diag(4,4,−2), find the maximum and minimum of q on unit vectors and describe every equality case. Find a nonzero vector with q=0 but Sx≠0.
I6. Let B=[1 1;2 2] and b=(3,7). Find all least-squares minimizers, their common fitted vector and residual Bx−b, the minimum squared error, and an orthogonal diagonalization of BᵀB. Interpret its zero eigenvalue.
Homework: reasons and limitations
H1. Reconstruct the complete 2×2 spectral proof. State exactly what is proved in every dimension here, and identify the existence claim that is accepted without proof for larger matrices.
H2. Prove xᵀBx=xᵀ((B+Bᵀ)/2)x over R. Give a concrete counterexample to the claim that B and its symmetric part must therefore have identical eigenvalues. Explain why q(x)=0 implies Sx=0 for positive semidefinite S but not for all symmetric S.
H3. Prove the translated least-squares identity and the full-column-rank uniqueness criterion without calculus. Explain why a small positive eigenvalue, a zero eigenvalue and a negative eigenvalue have different meanings for a supposed Gram matrix. Can exact AᵀA have a negative eigenvalue?
Formative quiz: 30 points
These changed calculations rehearse taught methods, not a validated unseen-transfer test. The quiz and project remain separate rubric groups, not an automatic semester grade.
Q1 (8). For S=[5 −2;−2 2], find an orthonormal eigenbasis and D, verify SQ=QD, and express xᵀSx in eigenvector coordinates. Classify the form.
Q2 (8). Classify [3 3;3 3] and [−2 1;1 −2], with eigenvalues and justified zero-direction claims. Then decide whether [1 3;3 1] is positive definite merely because its diagonal entries are positive; supply a witness.
Q3 (8). For S=[5 −2;−2 2], determine all unit directions attaining the largest and smallest form values. Describe the center, directions and semiaxes of xᵀSx=12, and explain why the longer semiaxis belongs to the smaller eigenvalue.
Q4 (6). For B=[1 0;2 0] and b=(2,3), find all least-squares coefficients, the fitted vector, residual Bx−b and minimum squared error. Use BᵀB to explain the flat direction and why the fitted vector is nevertheless unique.
Formative project: an error budget is a modelling choice, 40 points
A fictional two-channel logger reports three dimensionless values: channel 1 reports 2, channel 2 reports 1, and a sum channel reports 4. The chosen reconciliation minimizes
F(u,v)=(u−2)²+(v−1)²+(u+v−4)².
Inputs u,v are unrestricted real numbers in this mathematical model. Equal squared-residual weights are an explicit choice, not known measurement reliability. No real-world records are required.
P1 (10). Explain the exact inconsistency. Construct A,b, solve the normal equations, and give x*, the fitted observations, residual Ax*−b and F(x*). Prove coefficient uniqueness using the Gram matrix.
P2 (10). Derive F(x*+h) in orthonormal sum/difference coordinates. Describe the region F≤F(x*)+2, including its center, boundary, axis directions and semiaxes. Prove the largest and smallest increases for unit h. Distinguish the given error budget from a confidence region or a causal diagnosis.
P3 (10). A proposed direction-dependent expression is E_ρ(h)=h₁²+h₂²+(h₁+h₂)²+ρ(h₁−h₂)² for real ρ. Find its symmetric matrix, eigenvalues and complete classification for every ρ, including the boundary. State when it is a sum of the displayed terms with nonnegative weights, and whether positivity alone proves each displayed weight is nonnegative. Explain why ρ<−1/2 is unsuitable as a nonnegative squared-error penalty.
P4 (10). A replacement logger reports only u+v=3 and 2u+2v=7, with equal squared-residual weights. Recompute its entire minimizer set, common fit, residual (predicted minus observed) and minimum. Explain its unmeasured direction and the shape of the region whose error is at most one above its minimum. Compare the old and new coefficient-uniqueness claims. Write a short accessible conclusion separating what the mathematics establishes from what these fictional records cannot establish about a real logger.
Delayed follow-through
D1. After a pause, let S=[2 −1;−1 2] and center c=(1,−2). Describe all x satisfying (x−c)ᵀS(x−c)≤6, including axes and semiaxes. Test x=(2,−1) and x=(3,−4) exactly. This is changed-data near transfer, not evidence that transfer has been measured.
D2. Retain and correct an unsupported step from your work. If none occurred, critique “a positive determinant means a positive definite form, and any zero form value means a kernel vector.” Give a separate counterexample and corrected condition for each clause.
Feedback, proof boundary and next step
Look for the first unsupported step: forgetting symmetry, using full rather than half the mixed coefficient, confusing Q with Qᵀ, mismatching eigenvalue order, treating repeated eigenvectors as automatically orthogonal, dividing by a zero diagonal, omitting a semidefinite boundary, confusing an indefinite zero with a kernel vector, or treating an error ellipse as statistical evidence. Correct the reason, then try new data.
Unit 8, integration and transfer, is available in this reader. The full general spectral proof, complex Hermitian theory, general constrained optimization, statistical inference and stable production eigensolvers are outside this unit. Subject-specialist appraisal, real learner timing/attempts, rubric calibration, rendered reading/navigation and device/assistive-technology checks remain needed. Exact calculations and assistant review do not establish those outcomes.
Reference and original-material note
The teaching text, examples, fictional data, diagrams described in words, tasks and keys are original. No third-party video, image, worksheet or exercise is reproduced. For an optional external treatment, see MIT OpenCourseWare: Symmetric Matrices and Positive Definiteness, checked 4 November 2026. Its terms and license apply to its material, not as an endorsement or certification of this manuscript. No affiliation, exact course equivalence or transferable credit is implied.