Symmetric Matrices and Quadratic Forms

Symmetric Matrices, Quadratic Forms and the SVD

Symmetric matrices have real eigenvalues and an orthonormal basis of eigenvectors. Learn to diagonalize them orthogonally with the spectral theorem and to rewrite quadratic forms without cross terms. Classify forms as positive definite, semidefinite or indefinite, and find their largest and smallest values on the unit sphere. Then compute the singular value decomposition of any matrix, use it to read rank, subspaces and least-squares solutions, build the best low-rank approximation, and see how principal component analysis comes from the SVD of centered data.

IntermediateLesson 9 of 9 in Linear Algebra 1 Course

What you will learn

  1. Recognize symmetric and orthogonal matrices, state and use the spectral theorem, compute an orthogonal diagonalization, and write a symmetric matrix as a weighted sum of projections.
    • Work with symmetric and orthogonal matrices
      Identify symmetric and orthogonal matrices, use their algebraic properties, and show why eigenvectors of a symmetric matrix that belong to different eigenvalues are orthogonal.
    • State and apply the spectral theorem
      Know exactly what the spectral theorem guarantees for a real symmetric matrix, why the converse holds, and which tempting conclusions do not follow.
    • Compute an orthogonal diagonalization
      Go from the characteristic polynomial to an orthonormal eigenvector matrix, handle eigenspaces of dimension two or more with Gram–Schmidt, and check the result.
    • Write a symmetric matrix as a sum of projections
      Express a symmetric matrix through its spectral decomposition, a weighted sum of rank-one projection matrices, and use it to compute products, powers and inverses.
  2. Write quadratic forms with symmetric matrices, remove cross-product terms with an orthogonal change of variable, decide definiteness, and find maximum and minimum values on the unit sphere.
    • Write a quadratic form with a symmetric matrix
      Translate between a homogeneous quadratic polynomial and the symmetric matrix of the form, evaluate the form, and use its basic properties.
    • Remove cross terms with a change of variable
      Use an orthogonal diagonalization to rewrite a quadratic form without cross-product terms, and describe its level curves and graph through the principal axes.
    • Classify forms as definite, semidefinite or indefinite
      Decide definiteness with eigenvalues, the 2×2 determinant test, leading principal minors or pivots, and connect definiteness to matrices of the form B^T B, invertibility and minima.
    • Find constrained maximum and minimum values
      Find the largest and smallest values of a quadratic form on the unit sphere and where they occur, and use further orthogonality constraints and the Rayleigh quotient.
  3. Find singular values and singular vectors of any matrix, factor it as A=UΣVT, and read rank, the four fundamental subspaces, the condition number and least-squares solutions from the factorization.
    • Find singular values and their geometric meaning
      Compute singular values from the eigenvalues of A^T A, interpret them as the stretch factors of A, and distinguish them from eigenvalues.
    • Build the factorization A = UΣV^T
      Assemble U, Σ and V for square and rectangular matrices step by step, check the product, and interpret the factorization as rotate, stretch, rotate.
    • Read subspaces, rank and least-squares solutions from the SVD
      Use singular vectors as orthonormal bases of the four fundamental subspaces, write the reduced SVD and the pseudoinverse, and judge sensitivity with the condition number.
  4. Truncate the SVD to get the best low-rank approximation of a matrix, measure its error with singular values, and explain how principal components come from the SVD of centered data.
    • Build the best rank-k approximation
      Truncate the outer-product expansion of the SVD, measure the error with the discarded singular values, and weigh storage against accuracy.
    • Connect the SVD to principal component analysis
      Center a data matrix, form its covariance matrix, and show that the principal components are eigenvectors of that matrix and left singular vectors of the centered data.

Symmetric Matrices and Quadratic Forms study guide

4 chapters

1

Use perpendicular eigenvector axes

A symmetric matrix can be understood by choosing perpendicular axes along its eigenvectors. This chapter develops the spectral theorem, explains why those axes exist, and shows how to compute them even when an eigenvalue repeats. You will then use rank-one projections to describe the action of the matrix one direction at a time. The main checks are concrete: unit-length columns, matching eigenvalues, and a product that reconstructs the original matrix.

1.1 Symmetry and orthonormal columns

Symmetry concerns entries; orthogonality concerns lengths and angles. Both properties involve a transpose, but they answer different questions about a matrix.

Read the two conditions

A square matrix is symmetric when AT=A. Its entry in position (i,j) equals the entry in position (j,i). For example, [6223] is symmetric. The diagonal entries need not agree. For every rectangular matrix B, both BTB and BBT are symmetric: transposing the product reverses the factors and returns the same product.

An orthogonal matrix is a square matrix with orthonormal columns: every column has length 1, and different columns have dot product 0. This is exactly QTQ=I, because the entries of that product are the column dot products. It follows that Q−1=QT and that the rows are orthonormal too.

For Q=[3/5−4/54/53/5], each column has squared length 9/25+16/25=1 and their dot product is −12/25+12/25=0. In contrast, M=[111−1] has perpendicular columns of length 2. Here MTM=2I. Divide each column by 2 before using its transpose as its inverse.

Why lengths are preserved

For any vectors 𝐱,𝐲,

(Q𝐱)T(Q𝐲)=𝐱TQTQ𝐲=𝐱T𝐲.

Thus dot products, lengths, and angles are unchanged. An orthogonal matrix has determinant 1 or −1. In the plane these are rotations and reflections; the displayed matrix rotates through the angle with cosine 3/5. Orthogonality does not require symmetry: a rotation usually fails QT=Q.

Why different eigenvalues give perpendicular vectors

Suppose A is symmetric and A𝐯=λ𝐯, A𝐰=μ𝐰. Move the matrix across the dot product by transposing it:

λ𝐯T𝐰=(A𝐯)T𝐰=𝐯TAT𝐰=𝐯TA𝐰=μ𝐯T𝐰.

Therefore (λ−μ)𝐯T𝐰=0. When the eigenvalues differ, the dot product must be 0. The step replacing AT by A is where symmetry enters. If the eigenvalues are equal, the final equation is 0=0 and places no restriction on the dot product. For instance, every nonzero vector is an eigenvector of 2I, but two such vectors need not be perpendicular. Choosing an orthonormal basis within that eigenspace is a separate step.

For A=[2112], the eigenvectors (1,1) and (1,−1) have eigenvalues 3 and 1; their dot product is 0. This guarantee fails for a nonsymmetric matrix: [1102] has eigenvectors (1,0) and (1,1) for eigenvalues 1 and 2, and their dot product is 1.

Vectors here are columns. The product 𝐱T𝐲 is a scalar dot product; reversing the order to 𝐱𝐲T gives a matrix. Keeping that distinction clear matters when building projections.

Key Takeaways

  • Symmetry means AT=A; an orthogonal matrix is square with orthonormal columns.
  • For an orthogonal matrix, Q−1=QT and multiplication preserves dot products.
  • Eigenvectors of a symmetric matrix for distinct eigenvalues are perpendicular.
  • Perpendicular columns must also be normalized to make an orthogonal matrix.

1.2 What the spectral theorem guarantees

The spectral theorem turns symmetry into a complete set of usable coordinate axes. It guarantees more than real eigenvalues: it guarantees enough eigenvectors, with the right perpendicularity, to form an orthonormal basis.

The theorem and its meaning

Every real symmetric n×n matrix has real eigenvalues and an orthonormal basis of eigenvectors. If those unit eigenvectors are the columns of P, then

A=PDPT,PTAP=D,

where D contains the matching eigenvalues. This is orthogonal diagonalization. An eigenvalue repeated as a root of the characteristic polynomial has an eigenspace of that same dimension. Eigenspaces belonging to distinct eigenvalues are mutually perpendicular. The eigenvalues together form the spectrum.

To understand the factorization, start with AP=PD: multiplying each column of P by A multiplies it by its own eigenvalue. Since P−1=PT, multiplication on the right gives A=PDPT. For a vector 𝐱, the coordinates in this basis are 𝐲=PT𝐱. The matrix acts by scaling each new coordinate by its eigenvalue.

The converse is useful

If a real matrix has an orthogonal diagonalization, then

AT=(PDPT)T=PDTPT=PDPT=A.

Thus a real square matrix is orthogonally diagonalizable exactly when it is symmetric. You can decide whether such a factorization exists by checking mirrored entries before finding a characteristic polynomial.

Ordinary diagonalization A=PDP−1 is less restrictive. For example, [1102] has two distinct eigenvalues and can be diagonalized, but its two eigenvector directions are not perpendicular. Its eigenvector matrix cannot be made orthogonal just by normalizing columns.

Real, repeated, and zero eigenvalues

For A=[abbd], the characteristic polynomial has discriminant

(a+d)2−4(ad−b2)=(a−d)2+4b2≥0.

So both eigenvalues are real. They coincide only if a=d and b=0, giving A=aI. In higher dimensions repeated eigenvalues are common, and the theorem still provides a full eigenbasis. This differs from [1101], whose repeated eigenvalue 1 has only one independent eigenvector.

Symmetry does not ensure invertibility or positive eigenvalues. The symmetric matrix [1111] has eigenvalues 2 and 0. It still has an orthonormal eigenbasis, although it is singular. A diagonal matrix with a negative diagonal entry is another symmetric matrix, so negative eigenvalues are allowed too.

Why answers can look different

Changing the sign of a unit eigenvector keeps it a unit eigenvector. Reordering the columns of P works if the same reordering is made in D. In a repeated eigenspace, any orthonormal basis works. The eigenvalues are fixed apart from order, but the axes need not have unique signs or unique choices within repeated eigenspaces.

Key Takeaways

  • Every real symmetric matrix has an orthonormal eigenbasis and real eigenvalues.
  • The eigenspace dimension equals the multiplicity of its eigenvalue.
  • A real square matrix is orthogonally diagonalizable exactly when it is symmetric.
  • Symmetry allows zero and negative eigenvalues.
  • Signs, matching order, and bases within repeated eigenspaces can vary.

1.3 Build and check an orthogonal diagonalization

Finding eigenvectors is only part of orthogonal diagonalization. The columns must also have unit length, be mutually perpendicular, and match the eigenvalues in the same order.

A two-dimensional calculation

Take A=[6223]. It is symmetric, so the spectral theorem applies. Its characteristic equation is

det⁡(A−λI)=(6−λ)(3−λ)−4=(λ−7)(λ−2)=0.

For eigenvalue 7, the equation −x1+2x2=0 gives the vector (2,1). For eigenvalue 2, 4x1+2x2=0 gives (1,−2). Their dot product is 0, as expected for distinct eigenvalues. Both lengths are 5. Normalize and place the larger eigenvalue first:

P=15[211−2],D=[7002].

Check PTP=I and AP=PD. The latter checks one eigenvector equation per column, so it catches an incorrect eigenvalue order. As arithmetic checks, the eigenvalues sum to the trace, 7+2=9, and multiply to the determinant, 7⋅2=14.

A repeated eigenvalue needs a basis inside its eigenspace

Consider C=[211121112]. To see its eigenvalues directly, write C=I+J, where every entry of J is 1. For any vector, J𝐱 has each coordinate equal to x1+x2+x3. Thus J(1,1,1)=3(1,1,1), while J sends the sum-zero plane to zero. Adding I gives eigenvalues 4 along the first line and 1 throughout that plane, so the eigenvalues of C are 4, 1, and 1. The eigenvalue 4 has eigenvector (1,1,1). For eigenvalue 1, the equation is x1+x2+x3=0. A basis for that plane is 𝐚=(1,−1,0) and 𝐛=(1,0,−1).

These two vectors have dot product 1, so they are not perpendicular. Apply Gram–Schmidt within the plane:

𝐛−𝐚T𝐛𝐚T𝐚𝐚=(1,0,−1)−12(1,−1,0)=(1/2,1/2,−1).

Scale the last vector to (1,1,−2) and normalize. A valid choice is

P=[1/31/21/61/3−1/21/61/30−2/6],D=diag⁡(4,1,1).

Each linear combination stayed inside the eigenvalue-1 plane. That is why the orthogonalized vectors remain eigenvectors. Vectors from distinct eigenspaces already are perpendicular; combining them generally destroys the eigenvector property. For instance, adding (1,1,1) and (1,−1,0) gives (2,0,1), and C(2,0,1)=(5,3,4) is not a scalar multiple.

Finish with the right checks

Forgetting to normalize the two-dimensional example gives a column matrix M with MTM=5I. It would produce MDMT=5A, not A. An opposite sign on any one unit eigenvector is harmless, but pairing that vector with the wrong eigenvalue is not. Use PTP=I to check the basis and AP=PD to check the matching; together they prove the claimed factorization.

Key Takeaways

  • Find each eigenspace, then make its basis orthonormal.
  • Apply Gram–Schmidt within a repeated eigenspace.
  • Keep eigenvector columns and diagonal eigenvalues in matching order.
  • Check both PTP=I and AP=PD.
  • Trace and determinant provide quick checks on eigenvalues.
  • Different valid eigenbases can give different-looking correct factorizations.

1.4 Describe a matrix one projection at a time

An orthogonal diagonalization can be expanded into a sum of simple matrices. Each piece projects onto one eigenvector direction and then multiplies that component by an eigenvalue.

Outer products are projection matrices

For a unit column vector 𝐮, let E=𝐮𝐮T. Then

E𝐱=𝐮(𝐮T𝐱)=(𝐮⋅𝐱)𝐮.

This is the orthogonal projection onto the line through 𝐮. The matrix is symmetric, has rank 1, and satisfies E2=E: projecting twice gives the same result as projecting once. The expression 𝐮T𝐮=1 is a scalar; 𝐮𝐮T is an outer product, with one entry for each pair of coordinates.

If 𝐮1,…,𝐮n is an orthonormal basis, its projection matrices satisfy EiEj=0 when i≠j and E1+⋯+En=I. Every vector is the sum of its components along those perpendicular directions.

Expand a diagonalization

Multiplying PDPT column by row gives the spectral decomposition

A=∑i=1nλi𝐮i𝐮iT.

For A=[6223], the unit eigenvectors are (2,1)/5 and (1,−2)/5. Their projection matrices are

E1=15[4221],E2=15[1−2−24].

Now 7E1+2E2=A, while E1+E2=I. At 𝐱=(1,0), the two projected components are (4/5,2/5) and (1/5,−2/5). Their weighted sum is (6,2), which agrees with direct multiplication by A.

Powers and inverses become scalar operations

Because different projections multiply to zero, powers do not create mixed terms:

Ak=∑iλikEi(k≥1).

For this example,

A3=343E1+8E2=[27613413475].

If every eigenvalue is nonzero, the inverse is A−1=∑iλi−1Ei. Here this gives

A−1=17E1+12E2=114[3−2−26].

A zero eigenvalue prevents this reciprocal formula for the inverse: the matrix has collapsed that direction.

Normalize before forming the outer product

For the unnormalized vector 𝐯=(2,1), the outer product is [4221], five times the projection. The correct formula for a nonzero vector of any length is 𝐯𝐯T/(𝐯T𝐯). Dropping small-magnitude eigenvalue terms leaves a lower-rank symmetric matrix. The SVD extends this idea to arbitrary matrices, using different input and output directions in each rank-one term.

Key Takeaways

  • For a unit vector, 𝐮𝐮T projects onto its line.
  • A symmetric matrix is ∑iλi𝐮i𝐮iT.
  • Powers replace each eigenvalue by its power; inverses use reciprocals when all eigenvalues are nonzero.
2

Understand quadratic forms

A quadratic form assigns a number to a vector using squares and cross terms. Its symmetric matrix connects algebraic expressions to geometry: eigenvectors give the principal axes, and eigenvalues give growth along them. This chapter shows how to remove cross terms, classify the signs a form can take, and find its extreme values under a length constraint. The same ideas explain why covariance matrices and squared lengths have nonnegative values.

2.1 Translate a quadratic form into a matrix

A quadratic form is a scalar function built from terms of total degree 2. Squares and products of two variables are allowed; linear and constant terms are absent. Writing the form as a matrix product makes the spectral theorem available.

Where each coefficient goes

For a symmetric matrix,

Q(𝐱)=𝐱TA𝐱,𝐱T[abbc]𝐱=ax12+2bx1x2+cx22.

The diagonal entries are the square coefficients. Each cross term comes from two positions, so put half its coefficient in each mirrored position. The form 5x12+4x1x2+2x22 therefore has matrix A=[5222].

Evaluate at 𝐱=(1,−1) in two ways. Direct substitution gives 5−4+2=3. The matrix calculation gives A𝐱=(3,0) and then 𝐱T(A𝐱)=3. The middle result is a vector, but the final answer is a number.

More variables use the same rule

For Q=x12−3x22+2x32+6x1x2−4x2x3, the matrix is

A=[1303−3−20−22].

Expanding by positions explains the split: the entries a12 and a21 contribute a12x1x2+a21x2x1. Since the scalar coordinates commute and the matrix is symmetric, these combine into 2a12x1x2. The coefficient 6 is split into two entries of 3. The coefficient −4 is split into two entries of −2. There is no x1x3 term, so both corresponding positions are zero. For a diagonal matrix, all cross terms disappear; diag⁡(9,4,3) gives 9x12+4x22+3x32.

Why require a symmetric matrix?

Putting the full cross coefficient in just one position can reproduce the form but gives a nonsymmetric matrix. For example, [5402] gives the same scalar form as the symmetric matrix above. Putting 4 in both off-diagonal positions would instead give a cross coefficient of 8, which is wrong.

Every square matrix M gives the same form as its symmetric part, A=(M+MT)/2. To see why, the scalar 𝐱TM𝐱 equals its transpose, 𝐱TMT𝐱, so averaging changes nothing. Requiring symmetry gives one unique matrix for each form and allows orthogonal diagonalization.

Scaling is quadratic

At the zero vector, Q(𝟎)=0. Scaling the input gives Q(t𝐱)=t2Q(𝐱), so a form keeps the same sign along a line through the origin, except at the origin. It is not a linear function. Expanding a sum gives

Q(𝐱+𝐲)=Q(𝐱)+2𝐱TA𝐲+Q(𝐲).

Squared length is the form ∥𝐱∥2=𝐱TI𝐱. More generally, ∥B𝐱∥2=𝐱TBTB𝐱. These examples connect quadratic forms to nonnegative quantities, energy models, and variance calculations.

Key Takeaways

  • The matrix of a quadratic form is symmetric, and the output is a scalar.
  • Each off-diagonal entry is half the matching cross coefficient.
  • Missing cross terms give zero entries in both mirrored positions.
  • Quadratic scaling means Q(t𝐱)=t2Q(𝐱).

2.2 Rotate the axes to remove cross terms

Cross terms often make a quadratic form difficult to recognize. An orthonormal eigenvector basis gives coordinates in which the form is a sum of squares with eigenvalue coefficients.

Change coordinates in the correct direction

Write A=PDPT and substitute 𝐱=P𝐲. Then

𝐱TA𝐱=𝐲TPTAP𝐲=𝐲TD𝐲=∑iλiyi2.

This is the principal axes theorem. The columns of P are the principal axes. The inverse coordinate change is 𝐲=PT𝐱: each new coordinate is the dot product with a unit eigenvector. Orthogonality preserves lengths and angles during this change.

For Q=6x12+4x1x2+3x22, use A=[6223] and P=15[211−2]. The form becomes

Q=7y12+2y22,y1=2x1+x25,y2=x1−2x25.

At (1,0) the new coordinates give 7(4/5)+2(1/5)=6, agreeing with the original form.

Read an ellipse from its coefficients

The level Q=14 becomes 7y12+2y22=14, or y12/2+y22/7=1. It is an ellipse with semi-axis 2 along (2,1)/5 and semi-axis 7 along (1,−2)/5. For positive eigenvalues and positive level c, the lengths are c/λi. The larger eigenvalue gives the shorter axis because the form reaches the specified level sooner in that direction.

Keep the zero level separate

For Q=x12−8x1x2−5x22, the symmetric matrix has eigenvalues 3 and −7, with directions (2,−1) and (1,2). In unit coordinates,

Q=3y12−7y22.

At level 21 this is y12/7−y22/3=1, a hyperbola with vertices at distance 7 along the positive-eigenvalue axis. At level 0 it is instead a pair of intersecting lines, y1=±7/3 y2.

If one eigenvalue is zero, the level equation is λy12=c with λ≠0. It gives two parallel lines if c/λ>0, one line if c=0, and no points if c/λ<0. For Q=(x1+x2)2=2y12, the level 2 gives y1=±1 and hence x1+x2=±2. The zero level gives the single line x1+x2=0. The level −1 is empty, since a real square cannot be negative. In each nonempty case the second principal coordinate is free; zero eigenvalue means that moving along its axis does not change the form.

Normalization preserves the intended geometry

Using unnormalized columns (2,1) and (1,−2) in the first example gives coefficients 35 and 10, not 7 and 2. That substitution also rescales length. With unit eigenvectors the graph of the form is easy to classify: positive eigenvalues give an upward bowl, negative ones a downward bowl, opposite signs a saddle, and a positive and a zero eigenvalue a flat-bottomed trough.

Key Takeaways

  • Use 𝐱=P𝐲 and recover coordinates with 𝐲=PT𝐱.
  • The new square coefficients are the eigenvalues when the axes are orthonormal.
  • For an ellipse, a larger positive eigenvalue gives a shorter semi-axis.
  • Opposite eigenvalue signs give a hyperbola at nonzero levels and intersecting lines at level zero.
  • A single nonzero eigenvalue can give two parallel lines, one line, or an empty level set.

2.3 Determine the signs a quadratic form can take

Definiteness describes the values of a quadratic form over all vectors. Checking one positive value does not establish positive definiteness; the claim must hold in every nonzero direction.

Classify by eigenvalue signs

After an orthogonal change of coordinates, Q=∑iλiyi2. Each squared coordinate is nonnegative, so the eigenvalue signs give an exact test.

ClassValues of the formEigenvalues
Positive definitePositive at every nonzero vectorAll positive
Negative definiteNegative at every nonzero vectorAll negative
Positive semidefiniteNonnegative everywhereAll nonnegative
Negative semidefiniteNonpositive everywhereAll nonpositive
IndefiniteBoth positive and negative valuesAt least one of each sign

A positive definite matrix also counts as positive semidefinite. The zero matrix belongs to both semidefinite classes. The matrix [5222] has eigenvalues 6 and 1 and is positive definite. The form (x1+x2)2 has eigenvalues 2 and 0; it is positive semidefinite but vanishes at the nonzero vector (1,−1).

Efficient tests

For A=[abbc], the determinant is the product of the eigenvalues. A negative determinant means indefinite. A positive determinant means both eigenvalues have the same sign: use a=Q(1,0) to choose positive definite if a>0 or negative definite if a<0. A zero determinant makes the matrix semidefinite; the remaining eigenvalue can also be zero.

For a larger symmetric matrix, Sylvester's criterion says that positive definiteness is equivalent to all leading principal minors being positive. These are the determinants of the successive upper-left square submatrices. For

T=[2−10−12−10−12],

they are 2, 3, and 4. Elimination without row exchanges has positive pivots 2,3/2,4/3. Its eigenvalues 2+2,2,2−2 confirm the result.

Positive diagonal entries alone do not suffice. The matrix [1331] has eigenvalues 4 and −2, and its form gives −4 at (1,−1). Nonnegative leading minors do not test positive semidefiniteness either: diag⁡(0,−1) has leading minors 0 and 0 but takes negative values. Use eigenvalue signs for that test.

The distinction between definite and semidefinite also appears when solving A𝐱=𝟎. For a positive semidefinite matrix, write Q=∑iλiyi2. A sum of these nonnegative terms is zero exactly when every coordinate with λi>0 vanishes. The remaining coordinates lie in the zero-eigenvalue eigenspace. Thus Q(𝐱)=0 exactly on Nul⁡A. For a positive definite matrix that space contains only the origin; for a singular semidefinite matrix it gives the flat directions.

Squared lengths and minima

For any B, 𝐱TBTB𝐱=∥B𝐱∥2≥0. It is strictly positive at all nonzero inputs exactly when the columns of B are independent. A positive definite matrix has a Cholesky factorization A=RTR with R upper triangular and positive diagonal. For example, R=[2101] gives A=[4222].

To find that Cholesky factor directly, write R=[ab0c] with positive a,c. Matching RTR to [4222] gives a2=4, ab=2, and b2+c2=2. Solve in order: a=2, b=1, c=1. The factor makes the form ∥R𝐱∥2, with no nonzero input sent to zero.

A positive definite form has a strict minimum of 0 at the origin; an indefinite form has a saddle there. In the second-derivative test, apply these signs to the Hessian at a critical point: positive definite gives a local minimum, negative definite a local maximum, and indefinite a saddle. For f(x,y)=x2+xy+y2, the Hessian has eigenvalues 3 and 1, so the origin is a minimum.

Key Takeaways

  • Eigenvalue signs classify definiteness; a zero eigenvalue rules out strict definiteness.
  • Positive definite also implies positive semidefinite.
  • For a symmetric 2×2 matrix, a negative determinant means indefinite.
  • Positive leading principal minors test positive definiteness.
  • Positive entries or diagonal entries alone do not establish positive definiteness.
  • Every BTB is positive semidefinite; independent columns of B make it positive definite.
  • A positive definite Hessian at a critical point gives a local minimum.

2.4 Find extreme values under a length constraint

A quadratic form usually has no largest value over the whole space: scaling a vector multiplies the value by the square of the scale factor. A fixed-length constraint makes its extreme values meaningful.

On the unit sphere

Let A be symmetric, with eigenvalues λ1≥⋯≥λn and orthonormal eigenvectors 𝐮i. On ∥𝐱∥=1,

max⁡𝐱TA𝐱=λ1,min⁡𝐱TA𝐱=λn.

Unit vectors in the top and bottom eigenspaces attain the corresponding bounds. For a simple top eigenvalue the maximizers are 𝐮1 and −𝐮1. A repeated top eigenvalue allows every unit vector in its eigenspace.

To prove the bounds, write 𝐱=P𝐲. Since P is orthogonal, ∑iyi2=1. The form is a weighted average of eigenvalues:

λn∑iyi2≤∑iλiyi2≤λ1∑iyi2.

Equality at the top requires all components outside the top eigenspace to vanish. The lower bound works the same way.

Compute a value and its location

For A=[6223], the eigenvalues are 7 and 2. The maximum on the unit circle is 7 at ±(2,1)/5, and the minimum is 2 at ±(1,−2)/5. At the first vector, direct substitution gives (24+8+3)/5=7. Reporting the vector alone would omit the maximum value; reporting 7 alone would omit where it occurs if both are requested.

For a diagonal example, 9x12+4x22+3x32 has maximum 9 at (±1,0,0) and minimum 3 at (0,0,±1) on the unit sphere. The coefficients already are the eigenvalues.

Additional orthogonality constraints

If a unit vector must also be perpendicular to 𝐮1, its first coordinate in the eigenbasis is zero. The largest remaining eigenvalue is λ2. Requiring perpendicularity to 𝐮1,…,𝐮k−1 makes the maximum λk. For [211121112], the largest value is 4 along (1,1,1). On the unit vectors perpendicular to that line, the form is always 1.

Remove the length dependence

The Rayleigh quotient is

R(𝐱)=𝐱TA𝐱𝐱T𝐱,𝐱≠𝟎.

It is unchanged by nonzero scaling, and its extreme values are the same largest and smallest eigenvalues. Therefore λn∥𝐱∥2≤Q(𝐱)≤λ1∥𝐱∥2. On a sphere of radius r, multiply both unit-sphere extremes by r2. In the two-dimensional example, Q(2,1)=35 does not contradict a maximum of 7 on the unit circle: that input has length 5. Applying these bounds to ATA will identify the largest stretch of an arbitrary matrix.

Key Takeaways

  • On the unit sphere, the extreme values are the smallest and largest eigenvalues.
  • Unit eigenvectors locate the extremes; repeated eigenvalues can give whole sets of maximizers.
  • Additional orthogonality constraints remove the corresponding eigenvector coordinates.
  • The Rayleigh quotient is unchanged by nonzero scaling.
  • On a radius-r sphere, extreme values are multiplied by r2.
3

Compute and use the SVD

The singular value decomposition describes every real matrix, including rectangular matrices and matrices that cannot be diagonalized. It gives perpendicular input directions, perpendicular output directions, and a nonnegative stretch between each pair. Here you will compute those directions, assemble the factors with the correct dimensions, and use them to identify subspaces and solve least-squares problems. Small singular values also reveal sensitivity.

3.1 Measure a matrix’s stretches with singular values

A matrix can stretch vectors very differently in different directions. Singular values measure its stretches along a special orthonormal set of input directions, even when the matrix is rectangular.

Start from a symmetric matrix

For an m×n matrix A, the matrix ATA is symmetric and positive semidefinite. Indeed, 𝐱TATA𝐱=∥A𝐱∥2≥0. Let its ordered eigenvalues be λ1≥⋯≥λn≥0 with orthonormal eigenvectors 𝐯i. The singular values are σi=λi.

For a unit eigenvector,

∥A𝐯i∥2=𝐯iTATA𝐯i=λi.

Thus σi is the length of the image of 𝐯i. The largest singular value is the maximum of ∥A𝐱∥ over all unit inputs. The eigenvalue of ATA is a squared stretch; take its square root to get a length.

Work through a nonsymmetric example

For A=[3045],

ATA=[25202025].

Its eigenvalues are 45 and 5, with unit eigenvectors 𝐯1=(1,1)/2 and 𝐯2=(1,−1)/2. Therefore σ1=35≈6.708 and σ2=5≈2.236. Direct multiplication gives A𝐯1=(3,9)/2 and A𝐯2=(3,−1)/2; their lengths confirm these values.

The eigenvalues of A itself are 5 and 3. They are not its singular values. For a symmetric matrix, singular values are the absolute values of the eigenvalues, sorted again by size. The matrix [1−4−4−5] has eigenvalues 3 and −7 but singular values 7 and 3. For a symmetric positive semidefinite matrix, the eigenvalues already are nonnegative, so the two lists agree.

Geometry and rank

The image of the unit circle in the example is an ellipse with semi-axis lengths 35 and 5. Its axis directions are the images A𝐯i. These images are perpendicular because, for distinct indices,

(A𝐯i)T(A𝐯j)=𝐯iTATA𝐯j=λj𝐯iT𝐯j=0.

A zero singular value means an input direction is sent to zero. For [2211], the matrix ATA has eigenvalues 10 and 0. The rank is 1, the number of positive singular values, and the circle collapses to a segment. In higher dimensions the same construction describes ellipsoids and their collapsed versions.

For a tall or wide matrix, either ATA or AAT can find the positive singular values. They have the same nonzero eigenvalues with multiplicity; the larger matrix has extra zeros. Choosing the smaller product saves arithmetic, but its eigenvalues still need square roots. For a square matrix the product of all singular values is ∣det⁡A∣; in the example it is 35⋅5=15.

Key Takeaways

  • Singular values are square roots of the eigenvalues of ATA.
  • The largest singular value is the largest stretch of a unit input.
  • The rank is the number of nonzero singular values.
  • For symmetric matrices, singular values are absolute eigenvalues, sorted by size.

3.2 Construct the singular value decomposition

The SVD pairs each special input direction with an output direction. It describes a matrix as a change of input coordinates, a nonnegative stretch, and a change of output coordinates.

Keep the dimensions visible

Every real m×n matrix has a factorization

A=UΣVT.

The matrices U and V are square orthogonal matrices of sizes m×m and n×n. Their columns are the left and right singular vectors. The middle matrix Σ has size m×n, just like A. Its first r diagonal positions contain σ1≥⋯≥σr>0, and every other entry is zero.

First find an orthonormal eigenbasis of ATA and put its vectors into V in decreasing eigenvalue order. Take square roots to build Σ. For each positive singular value, calculate

𝐮i=A𝐯iσi.

These vectors already are orthonormal. For example, 𝐮iT𝐮j=𝐯iTATA𝐯j/(σiσj). For different indices the numerator is zero, and for equal indices it is σi2. Dividing by the two singular values therefore gives the required dot products, zero and one. If fewer than m are present, complete them with an orthonormal basis of Nul⁡AT. Never divide by a zero singular value.

Match the two sets of vectors

For A=[3045], use

V=12[111−1],Σ=diag⁡(35,5).

The images of the columns are (3,9)/2 and (3,−1)/2. Dividing by their corresponding singular values gives

U=110[133−1].

Check UTU=I, VTV=I, and AV=UΣ. The last equality matches every input vector to the correct output vector. Computing eigenvectors of AAT separately can choose incompatible signs. Changing just one left vector reverses a rank-one term; changing both members of a pair together leaves the SVD unchanged.

A rectangular example needs completion

For C=[110110], the product CTC=[2112] has eigenvalues 3 and 1. Use the same right vectors (1,1)/2 and (1,−1)/2. The left vectors are 𝐮1=(2,1,1)/6 and 𝐮2=(0,−1,1)/2. Complete them with 𝐮3=(1,−1,−1)/3, which satisfies CT𝐮3=0. Here

Σ=[300100].

The extra zero row makes the dimensions work: (3×3)(3×2)(2×2) gives 3×2.

Why does the construction reproduce the whole matrix? For a zero eigenvalue of ATA, the identity ∥A𝐯i∥2=0 forces A𝐯i=0. Therefore all columns of AV are either matched images σi𝐮i or zero columns. Those are exactly the columns of UΣ. Multiplying AV=UΣ by VT gives A=UΣVT, including all collapsed directions.

For a repeated positive singular value, a new orthonormal basis may be chosen in its right eigenspace. Apply A/σ to each of those new vectors to get the matching left basis. Both sides change together. Merely choosing two unrelated bases in the left and right repeated spaces need not reconstruct A, even though both bases are orthonormal.

Interpret the factors

For A𝐱=UΣ(VT𝐱), apply the rightmost factor first. The transpose VT expresses the input in its singular-vector basis, Σ scales and adjusts the coordinate count, and U places the output in its final directions. Equivalently,

A𝐱=∑i=1rσi(𝐯iT𝐱)𝐮i.

Repeated singular values allow different matched orthonormal bases in their subspaces. For a symmetric positive semidefinite matrix, an orthogonal diagonalization already is an SVD with U=V=P and Σ=D.

Key Takeaways

  • The full SVD exists for every real matrix, including rectangular and singular ones.
  • Use 𝐮i=A𝐯i/σi only for positive singular values.
  • Complete U in Nul⁡AT when needed.
  • The matrix Σ has the same dimensions as A.
  • Check orthonormality and the matching equation AV=UΣ.
  • Apply the factors in the order VT, then Σ, then U.

3.3 Use the SVD for subspaces and least squares

The SVD separates directions that a matrix transmits from directions it collapses. This gives bases of the four fundamental subspaces and a way to solve least-squares problems even when an inverse does not exist.

Read the four subspaces

For a rank-r matrix A=UΣVT, the first r columns of U span Col⁡A; its remaining columns span Nul⁡AT. The first r columns of V span Row⁡A; its remaining columns span Nul⁡A. The left vectors live in the output space ℝm and the right vectors in the input space ℝn.

For A=[2211], the positive singular value is 10. The vectors 𝐮1=(2,1)/5 and 𝐯1=(1,1)/2 span the column and row spaces. The remaining vectors 𝐮2=(1,−2)/5 and 𝐯2=(1,−1)/2 span the left and right null spaces. Direct multiplication confirms A𝐯2=0 and AT𝐮2=0.

Reduce the factors

Keeping only the positive singular values gives the reduced SVD

A=UrDVrT=∑i=1rσi𝐮i𝐯iT.

The factors have sizes m×r, r×r, and n×r before the final transpose. This is an exact factorization, not an approximation. In the rank-one example it is 10(2,1)(1,1)T/(52), which returns both columns (2,1).

Invert only the surviving stretches

The pseudoinverse is A+=VrD−1UrT. It maps an output back by taking its components along the surviving left directions and dividing by their stretches. The vector 𝐱^=A+𝐛 minimizes the residual length and has the smallest length among all least-squares solutions. Also, AA+ projects onto Col⁡A. With independent columns, A+=(ATA)−1AT; for a square invertible matrix it is the ordinary inverse.

For C=[110110],

C+=13[1−1212−1].

At 𝐛=(1,2,3) this gives 𝐱^=(5/3,2/3) and fitted vector (7/3,2/3,5/3). The residual (−4/3,4/3,4/3) has dot product 0 with each column of C, which verifies least squares.

To see why the selected input has minimum length, note that 𝐱^=A+𝐛 belongs to Row⁡A: it is a combination of the first r right singular vectors. Any other equally good fit has the same fitted output, the projection of 𝐛, so it differs by a vector 𝐳∈Nul⁡A. These two input subspaces are perpendicular. Hence

∥𝐱^+𝐳∥2=∥𝐱^∥2+∥𝐳∥2.

A nonzero null-space addition changes no predicted output but increases the input length. For the rank-one example, exact inputs with x1+x2=2 all produce (4,2). The input (1,1) is perpendicular to (1,−1) and has length 2; (2,0) gives the same output but has length 2.

Small stretches cause sensitivity

For an invertible square matrix, κ2(A)=σ1/σn. A small output component along the last left singular vector is divided by the smallest singular value when solving. A large ratio therefore permits strong amplification of relative changes in the data. The matrix [3045] has condition number 3, while [1111.0001] has a condition number about 40,000. Singular matrices have infinite condition number. In floating-point work, values tiny relative to the largest singular value may be treated as zero to determine numerical rank.

Key Takeaways

  • Left singular vectors describe column and left null spaces; right vectors describe row and null spaces.
  • The reduced SVD keeps every positive singular value and remains exact.
  • The pseudoinverse inverts positive singular values and selects the minimum-length least-squares solution.
  • The fitted vector is the orthogonal projection of the data onto the column space.
  • A large condition number signals possible sensitivity when solving a system.
4

Approximate matrices and explain variance

A large matrix often has a useful description with far fewer numbers. The SVD orders its rank-one pieces by size, so keeping the first few gives a precise way to balance accuracy and storage. This chapter develops the error formulas and then applies the same construction to centered observations. In principal component analysis, the retained directions capture the greatest variance, and the singular values tell you exactly how much variance remains.

4.1 Keep the most useful rank-one terms

The SVD writes a matrix as ordered rank-one pieces. Truncating that expansion gives a low-rank approximation with an error that can be read directly from the discarded singular values.

Keep whole terms

For a rank-r matrix,

A=∑i=1rσi𝐮i𝐯iT,Ak=∑i=1kσi𝐮i𝐯iT.

For k<r, the approximation has rank exactly k. Each term is a full matrix, not a row or column. Deleting rows or rounding individual entries does not perform this truncation.

Two norms describe different kinds of error. The spectral norm ∥M∥2 is the largest length ∥M𝐱∥ over unit inputs and equals the largest singular value. The Frobenius norm ∥M∥F is the square root of the sum of all squared entries, also equal to the square root of the sum of squared singular values.

Read the best possible error

The Eckart–Young theorem states that Ak minimizes both errors among matrices of rank at most k:

∥A−Ak∥2=σk+1,∥A−Ak∥F=∑i=k+1rσi2.

A gap σk>σk+1 makes the Frobenius-norm minimizer unique. The spectral-norm minimizer need not be unique even with a gap. For A=diag⁡(3,1), both diag⁡(3,0) and diag⁡(2,0) have rank 1 and spectral error 1. Only the first has the smallest Frobenius error.

A complete rank-one example

For A=[3045], its leading term is

A1=35 (1,3)10(1,1)T2=[1.51.54.54.5].

The residual is [1.5−1.5−0.50.5]. Its squared entry sum is 5, so its Frobenius norm is 5. This equals the discarded singular value, and also the spectral error, because only one term was discarded. The original squared Frobenius norm is 9+16+25=50; the retained part contributes 45, or 90%.

Balance accuracy and storage

The retained share of squared Frobenius norm is ∑i=1kσi2/∑i=1rσi2. A relative spectral error test instead uses σk+1/σ1. These criteria need not select the same rank.

Storing the original matrix takes mn numbers. Storing the factors for rank k takes k(m+n+1): the left vectors, right vectors, and singular values. A 600×400 image needs 240,000 values; rank 20 needs 20,020, about 8.3% as many. Savings occur only if k(m+n+1)<mn. Rapidly decreasing singular values make a small rank attractive. Small values can often be associated with noise, but the singular values alone do not establish which measured features are noise.

Key Takeaways

  • Truncation keeps the largest singular values and their entire rank-one terms.
  • The optimal spectral error is σk+1.
  • The optimal Frobenius error includes the squares of all discarded singular values.
  • A singular-value gap gives uniqueness in Frobenius norm, not necessarily in spectral norm.
  • Factor storage requires k(m+n+1) numbers.
  • Retained squared Frobenius norm and relative spectral error measure different aspects of accuracy.

4.2 Find principal directions from centered data

Principal component analysis finds perpendicular directions of variation in data. Its linear algebra is an eigenvalue problem for covariance, and an SVD of the centered observations gives the same directions directly.

Center each variable

Store N observations as columns of a p×N matrix. Compute their mean vector M and subtract it from every column to obtain B. Every row of B sums to zero. For N>1, the sample covariance is

S=1N−1BBT.

This p×p matrix is symmetric positive semidefinite. Its diagonal entries are variable variances, its off-diagonal entries are covariances, and its trace is the total variance. Many statistics tools store observations as rows; with that convention use the transpose of this data layout, and right singular vectors give the variable directions.

Compute a small example

The observations (6,18),(12,18),(10,20),(12,24) have mean (10,20). Subtracting it gives

B=[−4202−2−204],S=13[24121224]=[8448].

The unit eigenvectors are 𝐮1=(1,1)/2 and 𝐮2=(1,−1)/2, with eigenvalues 12 and 4. These are the principal directions. The score of an observation 𝐱 on direction i is yi=𝐮iT(𝐱−M). Along the first direction, the scores are −32,0,0,32. Their sample variance is 36/3=12.

Why the first direction is best

The variance along any unit vector 𝐮 is 𝐮TS𝐮. Its maximum is the largest eigenvalue of S, so the first principal direction captures the greatest variance. Choose an orthonormal eigenbasis, including within repeated eigenspaces. Different score variables then have zero covariance; unit eigenvectors that are not perpendicular do not provide this guarantee.

If B=UΣVT, then

S=UΣΣTN−1UT,λi=σi2N−1.

Here the singular values are 6 and 23, giving variances 12 and 4. The first component explains 12/(12+4)=75%. Keeping the first k directions is the truncated SVD Bk; its retained variance share equals its retained squared Frobenius share. The same example gives 36/(36+12)=75%.

For the worked data, retaining the first direction also gives an explicit reconstruction. Multiply its unit vector by its row of scores:

B1=(1,1)2[−320032]=[−3003−3003].

The residual rows are (−1,2,0,−1) and (1,−2,0,1), with squared entry sum 12. Thus the Frobenius error is 12=23, exactly the discarded singular value. The discarded variance is 12/(4−1)=4. To reconstruct observations in their original coordinates, add the mean vector (10,20) back to every approximated column. The centered approximation describes deviations; adding the mean restores their location.

Check centering, scale, and meaning

Skipping centering can make the leading direction describe the mean's position rather than the spread around it. The raw example has a first direction about (0.450,0.893), while the centered direction is (0.707,0.707). A singular value itself is not a variance: square it and divide by N−1. Using N instead rescales all variances but leaves directions and percentages unchanged.

Units also change variance. Measuring the same length in millimeters instead of meters multiplies its variance by 106. For variables with positive standard deviations, dividing each centered variable by its standard deviation gives correlation-based PCA when their scales differ. Computing the SVD directly avoids forming a covariance product that squares the singular-value ratio and can lose numerical accuracy.

Key Takeaways

  • Subtract the mean vector before analyzing variation.
  • With observations as columns, S=BBT/(N−1).
  • Principal directions are an orthonormal covariance eigenbasis, ordered by variance.
  • They are left singular vectors of centered column data, with λi=σi2/(N−1).
  • The retained variance share uses squared singular values.
  • Changing units can change the principal directions; standardization changes the problem to correlation-based PCA.

Symmetric Matrices and Quadratic Forms examples

4 Walkthroughs

1

Build perpendicular eigenvector axes

17 steps
Diagonalize symmetric matrices, handle repeated eigenvalues, and interpret the result through projections.
  1. 1
    IntroductionFind axes that make the matrix simple

    Find perpendicular eigenvector axes for a symmetric matrix, then normalize them and check the factorization. We will handle a repeated eigenvalue and use projections to compute the matrix’s action, powers, and inverse.

  2. 2
    ExplanationSeparate symmetry from orthogonality

    Symmetric means AT=A. An orthogonal matrix is square with orthonormal columns: QTQ=I.

    The columns of [111−1] are perpendicular but have length 2. Divide them by 2 before using the transpose as the inverse.

  3. 3
    Key InsightSee why different eigenvalues separate directions

    Let A𝐯=λ𝐯 and A𝐰=μ𝐰 for symmetric A. Transposing the first product gives

    λ𝐯T𝐰=(A𝐯)T𝐰=𝐯TA𝐰=μ𝐯T𝐰.

    If λeμ, the dot product is zero. Symmetry is what lets us replace the transpose of A by A in the middle. Repeated eigenvalues do not force two chosen vectors to be perpendicular.

  4. 4
    ChallengeCheck a proposed orthogonal matrix

    A square matrix has columns (0,2) and (2,0). Is it orthogonal, and what common scaling makes it orthogonal?

    ---reveal---

    The columns have dot product 0 but lengths 2, so the matrix is not orthogonal. Divide the whole matrix by 2. Its columns then have unit length and remain perpendicular; the resulting matrix has column dot-product matrix I instead of 4I.

  5. 5
    ExplanationUse the whole spectral theorem

    The spectral theorem gives every real symmetric matrix real eigenvalues and a complete orthonormal eigenbasis, even for repeated roots.

    Putting unit eigenvectors in P and matching eigenvalues in D gives A=PDPT. Zero eigenvalues prevent inversion but still allow this factorization.

  6. 6
    ChallengeDecide before computing eigenvalues

    Can B=[2305] have a real orthogonal diagonalization? Explain without solving its characteristic equation.

    ---reveal---

    No. If B=PDPT with D real diagonal, then transposing would give BT=PDPT=B. The displayed entries 3 and 0 do not match across the diagonal. The matrix has distinct eigenvalues and an ordinary diagonalization, but an orthogonal one requires symmetry.

  7. 7
    ExampleFind the eigenvalues of the worked matrix

    Use the symmetric matrix A=[6223]. Its characteristic equation is

    det⁡(A−λI)=(6−λ)(3−λ)−4=λ2−9λ+14=0.

    Factoring gives (λ−7)(λ−2)=0, so list 7 before 2. Their sum 9 matches the trace, and their product 14 matches the determinant. These checks help catch an arithmetic error before building the vectors.

  8. 8
    ExampleSolve and normalize each direction

    For eigenvalue 7, −x1+2x2=0 gives (2,1). For eigenvalue 2, 4x1+2x2=0 gives (1,−2). Both vectors have length 5.

    P=15[211−2],D=diag⁡(7,2).

    The dot product of the unnormalized vectors is zero. After normalization, PTP=I. Checking AP=PD verifies the eigenvalue attached to each column.

  9. 9
    ExampleKeep a repeated eigenspace intact

    For C=[211121112], eigenvalue 4 has direction (1,1,1). The repeated eigenvalue 1 has eigenspace x1+x2+x3=0.

    A basis is 𝐚=(1,−1,0) and 𝐛=(1,0,−1). They belong to the same eigenspace, but their dot product is 1. The theorem guarantees an orthonormal choice; it does not make an arbitrary basis orthogonal.

  10. 10
    ExampleOrthogonalize within that plane

    Subtract the projection of 𝐛 onto 𝐚:

    𝐛−𝐚T𝐛𝐚T𝐚𝐚=(1,0,−1)−12(1,−1,0)=(1/2,1/2,−1).

    Scale this to (1,1,−2). Normalizing gives (1,−1,0)/2 and (1,1,−2)/6. Both remain in the eigenvalue-1 plane. Alongside (1,1,1)/3, they form an orthonormal eigenbasis.

  11. 11
    ChallengeDiagnose a missing normalization

    For the earlier 2×2 matrix, let M=[211−2] and D=diag⁡(7,2). What does MDMT equal, and how can it be repaired?

    ---reveal---

    It equals 5A. Each column has squared length 5, so M=5P and both outer factors contribute 5. Use P=M/5 on both sides of D. The eigenvector equations were correct; the coordinate matrix was not orthogonal.

  12. 12
    ExplanationTurn a unit vector into a projection

    For a unit column vector, E=𝐮𝐮T is a projection matrix:

    E𝐱=𝐮(𝐮T𝐱).

    The dot product extracts the component; multiplication places it on the line. For a nonunit spanning vector, divide the outer product by its squared length.

  13. 13
    ExampleExpand the two projection terms

    The unit eigenvectors of A give

    E1=15[4221],E2=15[1−2−24].

    Then A=7E1+2E2. The identity E1+E2=I says that these two perpendicular components reconstruct every vector. Their product is zero: a vector projected onto one axis has no component left on the perpendicular axis.

  14. 14
    Key InsightCompute powers without repeated matrix products

    Because Ei2=Ei and mixed projections multiply to zero,

    A3=343E1+8E2,A−1=E1/7+E2/2.

    Powers change the coefficients, keeping the same axes. Inverting requires nonzero eigenvalues: a collapsed component cannot be recovered.

  15. 15
    ChallengeApply a spectral decomposition

    A symmetric matrix has orthogonal spectral projections F1,F2 and B=4F1−F2. What is B2?

    ---reveal---

    B2=16F1+F2.

    The cross products vanish, while each projection squares to itself. The second eigenvalue is −1, whose square is positive 1. Keeping a negative second coefficient would confuse an even matrix power with the original sign of the eigenvalue.

  16. 16
    ChallengeCheck a different-looking answer

    A learner replaces the first column of an orthogonal eigenvector matrix P by its negative and leaves D unchanged. Is the factorization still correct? Explain using its rank-one terms.

    ---reveal---

    Yes. The changed term is λ(−𝐮)(−𝐮)T=λ𝐮𝐮T, so the reconstructed matrix is unchanged. Unit length, perpendicularity, and the eigenvalue equation are also preserved. A sign change differs from pairing a column with another eigenvalue.

  17. 17
    RecapKeep the checks and the interpretation together

    Check PTP=I and AP=PD: these verify unit perpendicular columns and matching eigenvalues. Gram–Schmidt stays inside a repeated eigenspace.

    The expansion A=∑iλi𝐮i𝐮iT splits the action into scaled projections and makes powers scalar calculations.

2

Turn quadratic forms into geometry and bounds

19 steps
Remove cross terms, classify definiteness, and solve quadratic optimization problems.

Save this lesson to follow every Walkthrough step by step.

  1. 1
    IntroductionRead a form through its eigenvectors
  2. 2
    ExplanationSplit the cross coefficient
  3. 3
    ChallengeWrite a new form as a matrix
  4. 4
    ExplanationChange both occurrences of the vector
  5. 5
    ExampleUse the worked axes
  6. 6
    Key InsightTreat zero levels separately
  7. 7
    ChallengeFind a degenerate level set
  8. 8
    ExplanationClassify all directions at once
  9. 9
    ExampleUse the short 2×2 test
  10. 10
    ExplanationTest a larger matrix
  11. 11
    ConnectionRecognize a squared-length form
  12. 12
    ChallengeChoose the exact definiteness class
  13. 13
    ConnectionConnect definiteness to a critical point
  14. 14
    ExplanationUse the unit constraint as weights
  15. 15
    ExampleSeparate the value from its location
  16. 16
    ExplanationAdd a radius or an excluded direction
  17. 17
    ChallengeOptimize with two constraints
  18. 18
    ChallengeConnect geometry, signs, and optimization
  19. 19
    RecapUse eigenvalues for three different questions
3

Compute stretches, subspaces, and least squares

19 steps
Build full and reduced SVDs, match singular-vector pairs, and use the pseudoinverse.

Save this lesson to follow every Walkthrough step by step.

  1. 1
    IntroductionMatch input axes to output axes
  2. 2
    ExplanationBuild a nonnegative eigenvalue problem
  3. 3
    ExampleCalculate the stretches in the worked example
  4. 4
    Key InsightRead geometry and rank from the stretches
  5. 5
    ChallengeCompute values and rank in a new case
  6. 6
    ExplanationBuild the factors with the right shapes
  7. 7
    ExampleMatch the left vectors in the worked example
  8. 8
    ExampleComplete a rectangular output basis
  9. 9
    ConnectionFollow the factors from right to left
  10. 10
    ChallengeFix a mismatched sign
  11. 11
    ChallengeAssemble a small full SVD
  12. 12
    ExplanationAssign input and output subspaces
  13. 13
    ExplanationReduce the factors without approximating
  14. 14
    ExplanationReverse the surviving stretches
  15. 15
    ExampleVerify a least-squares fit
  16. 16
    ChallengeFind the minimum-length exact solution
  17. 17
    Key InsightUnderstand the smallest singular value
  18. 18
    ChallengeCompare sensitivity after solving directions
  19. 19
    RecapKeep the sides, scales, and dimensions consistent
4

Approximate matrices and find principal directions

14 steps
Measure low-rank error, balance storage, and connect centered SVD factors to PCA.

Save this lesson to follow every Walkthrough step by step.

  1. 1
    IntroductionTrade rank for accuracy
  2. 2
    ExplanationKeep complete rank-one terms
  3. 3
    ExplanationDistinguish the two errors
  4. 4
    ExampleCalculate a rank-one approximation
  5. 5
    ChallengeCheck accuracy and storage together
  6. 6
    TipDo not overclaim uniqueness
  7. 7
    ExplanationSubtract the mean before looking for variation
  8. 8
    ExampleCenter the worked observations
  9. 9
    ExampleFind the direction with greatest variance
  10. 10
    ConnectionConvert singular values into variances
  11. 11
    ChallengeRecover a variance share from data stretches
  12. 12
    Key InsightCheck the effect of units
  13. 13
    ChallengeLink discarded variance to approximation error
  14. 14
    RecapRead approximation and PCA from the same spectrum

Symmetric Matrices and Quadratic Forms practice questions

40 Practice Questions in 4 sets

Set 1: Axes, definiteness, and SVD construction10 Practice Questions

Question 1 of 10

A quadratic form has eigenvalues 12 and 3. What are the semi-axis lengths of its level set Q=27, in that eigenvalue order?
  1. 3/2 and 3
  2. 3 and 3/2
  3. 9/4 and 9
  4. 18 and 9
Show answerHide answer
Answer: A
In principal coordinates the equation is 12y12+3y22=27. Setting the other coordinate to zero gives semi-axis lengths 27/12=3/2 and 27/3=3. The larger eigenvalue gives the shorter axis, so reversing the lengths would mismatch the eigenvector directions.

Question 2 of 10

What is the complete level set 4x12−12x1x2+9x22=0?
  1. The two lines 2x1±3x2=0
  2. The single point (0,0)
  3. The empty set
  4. The single line 2x1−3x2=0
Show answerHide answer
Answer: D
The form factors as (2x1−3x2)2, so its symmetric matrix has one positive eigenvalue and one zero eigenvalue. At level zero the square vanishes exactly on one line. Two intersecting lines would require an indefinite product of distinct linear factors, which this square does not have.

Question 3 of 10

For which real t is A=[t225] positive definite?
  1. t≥4/5
  2. t>4/5
  3. t>0
  4. t<4/5
Show answerHide answer
Answer: B
Positive definiteness requires the first leading minor t and the determinant 5t−4 to be positive. Together they reduce to t>4/5. At equality the determinant is zero, so a nonzero direction has quadratic value zero; that boundary is positive semidefinite, not positive definite.

Question 4 of 10

What are the elimination pivots, without row exchanges, of A=[330352024]?
  1. 3, 5, 4
  2. 3, 2, 4
  3. 3, 8, 6
  4. 3, 2, 2
Show answerHide answer
Answer: D
Eliminating the first entry of row 2 changes its diagonal entry from 5 to 5−3=2. The final pivot is then 4−22/2=2, giving 3, 2, 2. Reading the original diagonal entries as pivots would skip the updates; the positive pivots establish positive definiteness for this symmetric matrix.

Question 5 of 10

For an orthogonal eigenvector matrix P, what formula converts an original coordinate vector 𝐱 into the new coordinates used in 𝐱=P𝐲?
  1. 𝐲=P𝐱
  2. 𝐲=D𝐱
  3. 𝐲=PT𝐱
  4. 𝐲=PTP𝐱
Show answerHide answer
Answer: C
Multiply 𝐱=P𝐲 by PT and use PTP=I to obtain 𝐲=PT𝐱. Using P𝐱 would generally apply the coordinate change in the wrong direction.

Question 6 of 10

A symmetric matrix has eigenvalues 11, 4, and −3 with orthonormal eigenvectors 𝐮1,𝐮2,𝐮3. What is the maximum of 𝐱TA𝐱 subject to ∥𝐱∥=2 and 𝐱⊥𝐮1?
  1. 44
  2. 16
  3. 8
  4. 4
Show answerHide answer
Answer: B
The perpendicularity constraint removes the eigenvalue-11 direction. Among the remaining unit directions, the largest value is 4, achieved along 𝐮2. Scaling the input to length 2 multiplies the value by 4, giving 16; using 44 would ignore the constraint that removes the top eigenspace.

Question 7 of 10

For a symmetric matrix, two vectors 𝐚=(1,1,0) and 𝐛=(1,0,1) belong to the same eigenspace. What vector results from subtracting the projection of 𝐛 onto 𝐚?
  1. (0,−1,1)
  2. (3/2,1/2,1)
  3. (1/2,−1/2,1)
  4. (1/2,1/2,1)
Show answerHide answer
Answer: C
The projection coefficient is 𝐚T𝐛/(𝐚T𝐚)=1/2. Subtracting 12(1,1,0) from (1,0,1) gives (1/2,−1/2,1), which is perpendicular to 𝐚 and remains in the eigenspace. Subtracting the whole vector would omit the squared-length denominator.

Question 8 of 10

A symmetric matrix has eigenvalues 2, −9, and 0. What are its singular values and rank?
  1. 9, 2, 0; rank 2
  2. 2, −9, 0; rank 2
  3. 3, √2, 0; rank 2
  4. 9, 2, 0; rank 3
Show answerHide answer
Answer: A
Take absolute eigenvalues and reorder to obtain 9, 2, and 0; the two positive values give rank 2. Square roots are needed for eigenvalues of ATA, not of symmetric A itself.

Question 9 of 10

For A=[0340], what pair of leading right and left unit singular vectors can be used together?
  1. 𝐯1=(0,1),𝐮1=(1,0)
  2. 𝐯1=(1,0),𝐮1=(0,−1)
  3. 𝐯1=(0,1),𝐮1=(−1,0)
  4. 𝐯1=(1,0),𝐮1=(0,1)
Show answerHide answer
Answer: D
The product ATA=diag⁡(16,9) makes the leading singular value 4 and its right direction (1,0). Applying A gives (0,4), so the matching left unit vector is (0,1). The pair starting from (0,1) is valid for singular value 3, but it is not the leading pair.

Question 10 of 10

A real 5×4 matrix has rank 3. What is the dimension of Nul⁡AT?
  1. 2
  2. 1
  3. 3
  4. 4
Show answerHide answer
Answer: A
The left null space has dimension 5−3=2, the output dimension minus the rank. The calculation 4−3=1 instead gives the right null-space dimension in the input space.
Set 2: Eigenvectors, forms, and singular values10 Practice Questions

Save this lesson to see every answer and practice every set.

Question 1 of 10

For Q=[0−110], how are symmetry and orthogonality classified?
  1. Symmetric and orthogonal
  2. Orthogonal and not symmetric
  3. Symmetric and not orthogonal
  4. Neither symmetric nor orthogonal
Show answerHide answer

Save this lesson to see this answer.

Question 2 of 10

A real symmetric matrix has characteristic polynomial (λ−8)(λ+2)2. What is the dimension of its eigenvalue-−2 eigenspace?
  1. 1
  2. 0
  3. 3
  4. 2
Show answerHide answer

Save this lesson to see this answer.

Question 3 of 10

For A=[4114] and P=12[111−1], what diagonal matrix satisfies A=PDPT?
  1. diag⁡(5,3)
  2. diag⁡(3,5)
  3. diag⁡(10,6)
  4. diag⁡(4,4)
Show answerHide answer

Save this lesson to see this answer.

Question 4 of 10

What is the orthogonal projection of (4,1) onto the line spanned by (1,2)?
  1. (6,12)
  2. (3,6)
  3. (6/5,12/5)
  4. (4/5,2/5)
Show answerHide answer

Save this lesson to see this answer.

Question 5 of 10

What symmetric matrix represents Q=8x12−6x1x2+5x22?
  1. [8−6−65]
  2. [8−3−35]
  3. [8335]
  4. [5−3−38]
Show answerHide answer

Save this lesson to see this answer.

Question 6 of 10

How is Q=2x12+8x1x2+2x22 classified?
  1. Indefinite
  2. Positive definite
  3. Positive semidefinite but not definite
  4. Negative definite
Show answerHide answer

Save this lesson to see this answer.

Question 7 of 10

What are the minimum and maximum of 5x12−2x22 on x12+x22=9?
  1. Minimum −2; maximum 5
  2. Minimum −6; maximum 15
  3. Minimum 0; maximum 45
  4. Minimum −18; maximum 45
Show answerHide answer

Save this lesson to see this answer.

Question 8 of 10

The eigenvalues of ATA are 49, 16, and 0. What are the singular values of A in decreasing order?
  1. 49, 16, 0
  2. 4, 7, 0
  3. 7, 4, 0
  4. 2401, 256, 0
Show answerHide answer

Save this lesson to see this answer.

Question 9 of 10

In a full SVD of a real 4×2 matrix, what are the sizes of U,Σ,V, respectively?
  1. 4×4, 4×2, 2×2
  2. 4×2, 2×2, 2×2
  3. 4×4, 2×2, 2×2
  4. 2×2, 2×4, 4×4
Show answerHide answer

Save this lesson to see this answer.

Question 10 of 10

A matrix has singular values 10, 6, 3, and 1. What is the smallest retained rank that gives relative spectral error at most 0.35 and keeps at least 90% of its squared Frobenius norm?
  1. 1
  2. 2
  3. 3
  4. 4
Show answerHide answer

Save this lesson to see this answer.

Set 3: Least squares, approximation, and principal components10 Practice Questions

Save this lesson to see every answer and practice every set.

Question 1 of 10

A centered data matrix stores observations as columns. Which singular vectors give the principal directions in the variable space?
  1. The right singular vectors
  2. The left singular vectors
  3. The diagonal factor columns
  4. The unscaled data columns
Show answerHide answer

Save this lesson to see this answer.

Question 2 of 10

A centered 3×5 data matrix has positive singular values 8, 4, and 2. What fraction of total sample variance is captured by the first principal component?
  1. 4/7
  2. 64/21
  3. 16/5
  4. 16/21
Show answerHide answer

Save this lesson to see this answer.

Question 3 of 10

For A=[1122] and 𝐛=(3,6), what is the minimum-length solution of A𝐱=𝐛?
  1. (3,0)
  2. (0,3)
  3. (3,3)
  4. (3/2,3/2)
Show answerHide answer

Save this lesson to see this answer.

Question 4 of 10

For A=[1122] and 𝐛=(5,0), what is the fitted vector A𝐱^ from least squares?
  1. (5,10)
  2. (1,2)
  3. (1,1)
  4. (5,0)
Show answerHide answer

Save this lesson to see this answer.

Question 5 of 10

An invertible matrix has largest singular value 18 and smallest singular value 0.6. What is its spectral condition number?
  1. 30
  2. 10.8
  3. 0.0333
  4. 17.4
Show answerHide answer

Save this lesson to see this answer.

Question 6 of 10

A matrix has singular values 9, 4, and 2. What are the spectral and Frobenius errors of its rank-one truncated SVD?
  1. 20 and 4
  2. 2 and 20
  3. 4 and 20
  4. 4 and 6
Show answerHide answer

Save this lesson to see this answer.

Question 7 of 10

A 120×80 matrix is stored through rank-k SVD factors, counting one number per factor entry and singular value. What is the largest integer k that uses fewer numbers than the original matrix?
  1. 47
  2. 48
  3. 79
  4. 80
Show answerHide answer

Save this lesson to see this answer.

Question 8 of 10

Three observations are (2,4),(4,6),(6,8), stored as columns. What is their sample covariance matrix?
  1. [8888]
  2. [8/38/38/38/3]
  3. [4444]
  4. [4004]
Show answerHide answer

Save this lesson to see this answer.

Question 9 of 10

A centered data matrix with observations as columns has covariance S=[5445]. What are the variance and a unit direction of its first principal component?
  1. 1,(1,−1)/2
  2. 3,(1,1)/2
  3. 9,(1,1)/2
  4. 9,(1,0)
Show answerHide answer

Save this lesson to see this answer.

Question 10 of 10

A symmetric invertible matrix has orthogonal spectral projections E1,E2 and decomposition A=6E1−2E2. What is A−2?
  1. E1/36−E2/4
  2. E1/36+E2/4
  3. 36E1+4E2
  4. E1/12−E2/4
Show answerHide answer

Save this lesson to see this answer.

Set 4: Connect the methods and check the edge cases10 Practice Questions

Save this lesson to see every answer and practice every set.

Question 1 of 10

The columns of a square matrix M are perpendicular and each has length 3. What is MTM?
  1. 9I
  2. I
  3. 3I
  4. 0
Show answerHide answer

Save this lesson to see this answer.

Question 2 of 10

What is the unique symmetric matrix for the form 𝐱TM𝐱 when M=[4716]?
  1. [4886]
  2. [4336]
  3. [4446]
  4. [4776]
Show answerHide answer

Save this lesson to see this answer.

Question 3 of 10

For A=[310130002], what orthogonal diagonalization has eigenvalues in decreasing order?
  1. P=[(1,1,0)  (1,−1,0)  (0,0,1)], D=diag⁡(4,2,2)
  2. P=[(1,1,0)/2  (1,−1,0)/2  (0,0,1)], D=diag⁡(2,4,2)
  3. P=[(1,1,0)/2  (1,0,1)/2  (0,1,0)], D=diag⁡(4,2,2)
  4. P=[(1,1,0)/2  (1,−1,0)/2  (0,0,1)], D=diag⁡(4,2,2)
Show answerHide answer

Save this lesson to see this answer.

Question 4 of 10

For which real t is A=[1000t101t] positive semidefinite but not positive definite?
  1. t>1
  2. t=1
  3. t≥−1
  4. t=−1
Show answerHide answer

Save this lesson to see this answer.

Question 5 of 10

For A=[200003], what are the leading right singular vector and a right null-space basis vector?
  1. 𝐯1=(1,0,0),𝐯0=(0,1,0)
  2. 𝐯1=(0,0,1),𝐯0=(0,1,0)
  3. 𝐯1=(0,0,1),𝐯0=(1,0,0)
  4. 𝐯1=(0,1,0),𝐯0=(0,0,1)
Show answerHide answer

Save this lesson to see this answer.

Question 6 of 10

A matrix has reduced SVD A=10 𝐮𝐯T with 𝐮=(1,3)/10 and 𝐯=(1,1)/2. What is the minimum-length least-squares solution for 𝐛=(2,1)?
  1. (1,1)/2
  2. (1,3)/(210)
  3. (1,1)/(22)
  4. (5,5)/2
Show answerHide answer

Save this lesson to see this answer.

Question 7 of 10

For Q=4x12+4x1x2+x22, what are the minimum value on the unit circle and all unit vectors where it occurs?
  1. 0 at ±(1,−2)/5
  2. 0 at ±(2,1)/5
  3. 1 at (0,±1)
  4. 5 at ±(2,1)/5
Show answerHide answer

Save this lesson to see this answer.

Question 8 of 10

A rank-4 matrix has four positive singular values. What is the exact rank after retaining its first three SVD terms?
  1. 1
  2. 4
  3. 2
  4. 3
Show answerHide answer

Save this lesson to see this answer.

Question 9 of 10

For A=diag⁡(5,2), a learner proposes B=diag⁡(4,0) as a best rank-one approximation. How does it compare with the minimum error in each norm?
  1. Optimal in both spectral and Frobenius norms
  2. Not optimal in spectral norm; optimal in Frobenius norm
  3. Not optimal in either spectral or Frobenius norm
  4. Optimal in spectral norm; not optimal in Frobenius norm
Show answerHide answer

Save this lesson to see this answer.

Question 10 of 10

A centered 2×4 data matrix has covariance eigenvalues 8 and 2. What are the Frobenius error of its rank-one truncated SVD and the variance share it keeps?
  1. 6 and 80%
  2. 2 and 80%
  3. 6 and 80%
  4. 6 and 20%
Show answerHide answer

Save this lesson to see this answer.

Stuck on your own question? Homework Help

Key Terms

65 Key Terms, each with its definition

C

Centered data matrix
A centered data matrix records each observation minus the sample mean, giving every variable mean zero.
A centered data matrix changes observation (7,8) to (3,−1) when the mean vector is (4,9).
Cholesky factorization
A Cholesky factorization expresses a positive definite matrix as RTR, with R upper triangular and its diagonal entries positive.
The Cholesky factorization with R=diag⁡(2,3) gives A=diag⁡(4,9).
Condition number
The spectral condition number of an invertible square matrix is σ1/σn, describing possible relative sensitivity when solving.
Singular values 20 and 0.01 give condition number 2000, indicating strongly uneven inverse stretches.
Constrained maximum
A constrained maximum is the largest function value among inputs satisfying specified restrictions.
A constrained maximum can change when a top eigenvector direction is excluded by an orthogonality requirement.
Cross term
A cross term is a degree-two term multiplying two different coordinates, such as 6x1x2.
The cross term 12x1x3 contributes 6 to each of the matrix positions (1,3) and (3,1).

D

Degenerate level set
A degenerate level set has a special shape such as intersecting or parallel lines.
The degenerate level set y12−4y22=0 consists of two lines; nonzero levels of the form are hyperbolas.
Dot product
The dot product of real column vectors 𝐱,𝐲 is the scalar 𝐱T𝐲, the sum of coordinate products.
The dot product of (2,3) and (3,−2) is zero, so their directions are perpendicular.

E

Eckart–Young theorem
The Eckart–Young theorem makes the truncated SVD a best rank-at-most-k approximation in both spectral and Frobenius norms.
The Eckart–Young theorem rules out rank-one spectral error below 3 when singular values are 7, 3, and 2.
Eigenspace
An eigenspace for eigenvalue λ is Nul⁡(A−λI), consisting of its eigenvectors together with the zero vector.
For diag⁡(6,2,2), the eigenvalue-2 eigenspace is the plane with first coordinate zero.
Eigenvalue bounds
Eigenvalue bounds place 𝐱TA𝐱 between the smallest and largest eigenvalues of symmetric A times ∥𝐱∥2.
Eigenvalue bounds from 2 and 7 put a length-3 vector’s quadratic value between 18 and 63.
Eigenvalue multiplicity
An eigenvalue’s multiplicity is its number of repetitions as a characteristic-polynomial root, equal to its eigenspace dimension for symmetric matrices.
The eigenvalue multiplicity of 5 in 5I3 is 3, and its eigenspace is the entire three-dimensional space.
Eigenvector matrix
An eigenvector matrix places a chosen basis of eigenvectors in columns, ordered to match the diagonal entries of the eigenvalue matrix.
Swapping columns of an eigenvector matrix requires swapping the corresponding diagonal eigenvalues as well.
Explained variance ratio
An explained variance ratio is the share of positive total variance captured by selected principal components, computed from covariance eigenvalues.
Covariance eigenvalues 15 and 5 give a first-component explained variance ratio of 75%.

F

Frobenius norm
The Frobenius norm is the square root of the sum of squared matrix entries, also the square root of the sum of squared singular values.
An error with singular values 8 and 6 has Frobenius norm 10, incorporating both nonzero directions.
Full SVD
A full SVD uses square orthogonal factors giving complete bases for the input and output spaces.
A full SVD of a rank-one 3×2 matrix still needs three columns in U and two in V.

G

Gram–Schmidt process
The Gram–Schmidt process subtracts projections onto earlier orthogonal directions, then normalizes to construct an orthonormal basis.
Within a repeated eigenspace, the Gram–Schmidt process preserves the eigenvalue while making basis vectors orthogonal.

I

Image ellipsoid
The image ellipsoid describes the perpendicular output stretches of the unit ball under a linear map, with semi-axis lengths given by singular values.
Two positive singular values and one zero flatten a three-dimensional ball into a filled image ellipsoid in a plane.
Indefinite matrix
An indefinite matrix is real symmetric with a quadratic form taking both positive and negative values, so its eigenvalues include both signs.
The indefinite matrix of 6x12−x22 gives positive values on one axis and negative values on the other.

L

Leading principal minor
A leading principal minor is the determinant of an upper-left square submatrix; all such minors are positive exactly for positive definite symmetric matrices.
Leading principal minors 3, 7, and 10 establish positive definiteness of a symmetric 3×3 matrix.
Left null space
The left null space is Nul⁡AT, the output-space vectors perpendicular to every column of A and to every fitted output.
For a rank-three 7×4 matrix, four left singular vectors form a basis for the four-dimensional left null space.
Left singular vector
A left singular vector is a unit output-space vector in a full SVD; for σi>0 it is the matched image A𝐯i/σi.
A left singular vector of a 6×2 matrix has six coordinates, even though the input has only two.
Level set
A level set consists of every input where a scalar function takes one specified value.
The level set x12+x22=16 is a circle, while the zero level set contains just the origin.

M

Matrix rank
The rank is the column-space dimension, equal to the number of positive singular values.
Singular values 5, 5, and 0 give matrix rank 2; equal positive values still count as independent directions.
Maximum stretch
The maximum stretch is the greatest output length over unit inputs, equal to the largest singular value.
A maximum stretch of 12 means some unit input maps to length 12 and none maps to a greater length.
Minimum-length least-squares solution
The minimum-length least-squares solution is the vector with smallest Euclidean length among all vectors minimizing ∥A𝐱−𝐛∥.
For exact fits with x1+x2=8, the minimum-length least-squares solution is (4,4).

N

Negative definite matrix
A negative definite matrix is a real symmetric matrix whose quadratic value is negative at every nonzero vector, with all eigenvalues negative.
The negative definite matrix of −3x12−7x22 makes the origin a strict quadratic maximum.
Negative semidefinite matrix
A negative semidefinite matrix is symmetric with nonpositive quadratic values everywhere, allowing zero values at nonzero vectors.
The negative semidefinite matrix of −(x1−x2)2 vanishes on the line x1=x2.
Normalization
Normalization divides a nonzero vector by its length to give a unit vector in the same direction.
Normalization turns (8,15) into (8/17,15/17) by dividing by its length 17, not its squared length.
Numerical rank
The numerical rank counts singular values treated as nonzero at a chosen scale or tolerance, accounting for finite precision and small perturbations.
A tiny computed singular value may be excluded from numerical rank when it reflects nearly dependent columns.

O

Orthogonal change of coordinates
An orthogonal change of coordinates uses 𝐱=P𝐲 with P orthogonal, preserving vector lengths and angles.
In an orthogonal change of coordinates, yi is the dot product with the corresponding unit basis vector.
Orthogonal diagonalization
An orthogonal diagonalization expresses a real matrix as A=PDPT with an orthogonal eigenvector matrix and a diagonal eigenvalue matrix.
A diagonal symmetric matrix already has an orthogonal diagonalization with the eigenvector matrix P=I.
Orthogonal matrix
An orthogonal matrix is a square matrix with orthonormal columns, so QTQ=I and its inverse equals its transpose.
The orthogonal matrix diag⁡(1,−1) reflects the plane while preserving every vector’s length.
Orthonormal set
An orthonormal set consists of unit vectors with dot product zero between different vectors.
The vectors (1,0,0) and (0,1,0) form an orthonormal set but do not span all of three-dimensional space.
Outer product
The outer product 𝐮𝐯T is a matrix whose entries multiply coordinates of the two vectors.
The outer product of (1,2) and (3,0) is [3060], a 2×2 matrix.

P

Positive definite matrix
A positive definite matrix is a real symmetric matrix with 𝐱TA𝐱>0 for every nonzero vector, equivalently all eigenvalues positive.
The positive definite matrix diag⁡(2,9) takes value zero only at the zero vector.
Positive semidefinite matrix
A positive semidefinite matrix is symmetric with nonnegative quadratic values at all vectors, equivalently all eigenvalues nonnegative.
The positive semidefinite matrix diag⁡(4,0) vanishes along the second coordinate axis.
Principal axes
The principal axes of a real quadratic form are orthonormal eigenvector directions of its symmetric matrix, along which cross terms vanish.
A tilted ellipse becomes axis-aligned when its coordinates are measured along the principal axes.
Principal direction
A principal direction is a unit covariance eigenvector, chosen as part of an orthonormal basis and ordered by the variance it captures.
The first principal direction captures the greatest sample variance among all unit directions in the variable space.
Principal-component score
A principal-component score is the coordinate 𝐮iT(𝐱−M) of a centered observation along a principal direction.
Every principal-component score of an observation at the sample mean is zero, regardless of the variable units.
Projection matrix
A projection matrix onto a unit-vector line is E=𝐮𝐮T; it keeps the component on that line and satisfies E2=E.
The projection matrix diag⁡(0,1) sends every planar vector to its vertical-axis component.
Pseudoinverse
The pseudoinverse is A+=VrD−1UrT from a reduced SVD and gives minimum-length least-squares solutions for any real matrix.
A singular matrix has a pseudoinverse even though no ordinary two-sided inverse exists for it.

Q

Quadratic form
A quadratic form is a scalar function Q(𝐱)=𝐱TA𝐱 with A symmetric, containing only terms of total degree two.
The expression 3x12−2x1x2 is a quadratic form, but adding a nonzero constant changes that classification.
Quadratic scaling
Quadratic scaling is the rule Q(t𝐱)=t2Q(𝐱) for a quadratic form.
Quadratic scaling turns an input’s value −3 into −12 when the entire input vector is doubled.

R

Rank-one matrix
A rank-one matrix is a matrix whose column space has dimension one.
The rank-one matrix [26515] has all columns parallel to (2,5).
Rayleigh quotient
The Rayleigh quotient R(𝐱)=𝐱TA𝐱/(𝐱T𝐱) measures a symmetric form per squared input length.
The Rayleigh quotient of any nonzero eigenvector for eigenvalue −4 equals −4 regardless of its length.
Reduced SVD
A reduced SVD keeps only positive singular values and their matched vector columns, giving the exact factorization A=UrDVrT.
A rank-two 8×5 matrix has a reduced SVD with an 8×2 left factor and a 5×2 right factor.
Retained squared share
The retained squared share is the sum of retained squared singular values divided by their total, measuring retained squared Frobenius norm.
Singular values 4 and 3 give rank-one retained squared share 16/25, not the unsquared ratio 4/7.
Right singular vector
A right singular vector is a unit eigenvector of ATA, belonging to an orthonormal basis of the input space in a full SVD.
A right singular vector with zero singular value lies in the null space and maps to the zero output.

S

Sample covariance matrix
A sample covariance matrix records variable variances and pairwise covariances; for centered column data it is BBT/(N−1).
A zero off-diagonal entry in a sample covariance matrix means zero covariance, even with positive variances.
Semi-axis
A semi-axis of an ellipse extends from its center to the curve along a principal direction, with length c/λi for positive levels.
The ellipse 2y12+8y22=8 has semi-axis lengths 2 and 1 along its two coordinate directions.
Singular value
A singular value of a real matrix is a nonnegative square root of an eigenvalue of ATA, measuring a stretch along a right singular direction.
An eigenvalue 81 of ATA produces a singular value 9 of A, since it describes a squared stretch.
Singular value decomposition
A singular value decomposition is A=UΣVT, with square orthogonal outer factors and nonnegative singular values in the middle factor.
A singular value decomposition exists for a rectangular 2×5 matrix, where square-matrix diagonalization does not apply.
Singular-value gap
A singular-value gap at a truncation cutoff means σk>σk+1 and ensures a unique best rank-k Frobenius approximation.
A singular-value gap ensures Frobenius uniqueness but can still allow multiple spectral-norm minimizers.
Singular-vector pair
A singular-vector pair consists of matched unit vectors satisfying A𝐯i=σi𝐮i for a positive singular value.
Flipping both signs in a singular-vector pair preserves its term; flipping just one reverses the term’s sign.
Spectral decomposition
A spectral decomposition writes a symmetric matrix as the sum ∑iλi𝐮i𝐮iT using an orthonormal eigenbasis.
A spectral decomposition with eigenvalues 8 and −1 scales its two projected components by 8 and −1.
Spectral norm
The spectral norm is the largest unit-input stretch, equal to the largest singular value.
An error matrix with singular values 4, 3, and 0 has spectral norm 4, set by its strongest stretch.
Spectral theorem
The spectral theorem for real symmetric matrices guarantees real eigenvalues and a complete orthonormal basis of eigenvectors.
The spectral theorem still provides four orthonormal eigenvectors for a symmetric 4×4 matrix with repeated roots.
Spectrum
The spectrum of a matrix is its set of eigenvalues.
A spectrum of {7,0,−2} reveals stretching, collapse, and reversal along eigenvector directions.
Standardization
Standardization divides centered variables with positive standard deviations by those deviations, making PCA use a correlation matrix.
Standardization prevents a variable from dominating solely because of a large numerical measurement scale.
Symmetric matrix
A symmetric matrix is a real square matrix equal to its transpose: AT=A.
The symmetric matrix [9−2−21] has equal off-diagonal entries.
Symmetric part
The symmetric part of a square matrix M is (M+MT)/2, which gives the same quadratic values as M for every vector.
The symmetric part averages off-diagonal entries 9 and −1 to 4 while preserving their combined cross coefficient 8.

T

Trace
The trace is the sum of a square matrix’s diagonal entries, equal to the sum of its eigenvalues counted with multiplicity.
Diagonal entries 4, 5, and 6 give trace 15, so the three eigenvalues must also sum to 15.
Truncated SVD
A truncated SVD retains the largest singular values and their rank-one terms to approximate a matrix with a chosen smaller rank.
Keeping two terms in a rank-five matrix’s truncated SVD gives rank 2 without changing its row and column counts.

U

Uncorrelated components
Uncorrelated components have zero pairwise covariance; PCA obtains them by using an orthonormal eigenbasis of the covariance matrix.
PCA gives uncorrelated components by choosing orthogonal directions even inside a repeated covariance eigenspace.
Unit sphere
The unit sphere consists of all vectors of length 1, written 𝐱T𝐱=1.
In two dimensions, the unit sphere is the circle x12+x22=1, excluding its interior.

About this lesson

By StudeliReport a mistake

Make your own Study Materials

Turn your notes, slides and documents into Study Guides, Practice Questions, Flashcards and 6 more tools.

Get Started