IAE Academy

GATE DA

LU decomposition and SVD

Projections, LU decomposition and singular value decomposition

Projections, LU decomposition and the SVD each break a matrix problem into easy pieces. A projection gives the closest point in a subspace, which is where least squares comes from. LU turns Ax = b into two triangular solves. The SVD shows rank, 2-norm and the best low-rank approximation. Typical calculations here are a projection or least-squares solution, a pivot or determinant from an LU factorisation, or a rank, norm or approximation error from singular values. Each is short once the formulas are known.

1 previous-year question · 1 solved · 5 practice questions

Convention and orthogonal projection

Convention. All matrices and vectors are real. Vectors are column vectors, written in bold; is the transpose, is the Euclidean norm, and . Eigenvalues are written and singular values .

The orthogonal projection of onto a subspace is the unique vector such that the error is orthogonal to every vector in . It is also the point of closest to in the Euclidean norm, so the distance from to is .

PROJECTION ONTO A LINE

Line through the origin along ; and are in , is of rank , and .

PROJECTION ONTO A COLUMN SPACE

is with linearly independent columns (so is invertible); is and projects onto the column space of .

PROJECTION WITH AN ORTHONORMAL BASIS

The columns of the matrix are orthonormal (); is and no inverse is needed.

Property of an orthogonal projection matrix () onto

Statement

Idempotent

(projecting twice changes nothing)

Symmetric

Eigenvalues

each eigenvalue is (eigenvectors: non-zero vectors in ) or (eigenvectors: non-zero vectors orthogonal to )

Rank and trace

Complement

is the orthogonal projection onto the orthogonal complement of

Reflection

is symmetric and orthogonal, , eigenvalues ; with , , it reflects across the hyperplane orthogonal to

EXAM TIP

Check any projection by testing that the error is orthogonal to , that is , or to every column of , that is . A non-zero result means an arithmetic slip.

Least squares and Gram-Schmidt

When has no solution ( is not in the column space of the matrix ), a least-squares solution minimises . Then is exactly the projection of onto the column space, which gives the normal equations.

NORMAL EQUATIONS

The normal equations always have a solution; it is unique (and given by the inverse form) only when the columns of are linearly independent.

RESIDUAL IS ORTHOGONAL TO THE COLUMNS

Pythagoras applies because the projection and the residual are perpendicular.

WORKED EXAMPLE

Find the least-squares line through the points , and the minimum sum of squared errors.

Solution
  1. Write (), , unknown .

  2. and .

  3. Solve , . Subtracting gives , so . From the first equation .

  4. Fitted values , residual .

  5. The residual is orthogonal to both columns ( and ). Squared error .

Answer: , minimum squared error .

Gram-Schmidt turns linearly independent vectors into orthogonal ones by subtracting, from each new vector, its projections onto the earlier ones. Dividing by lengths gives an orthonormal set.

GRAM-SCHMIDT STEP

For an matrix with linearly independent columns this gives : is with orthonormal columns and is upper triangular with entries () and positive diagonal. The span of the first vectors is preserved at every step.

EXAM TIP

Use the projection onto the already orthogonalised , not onto the original ; mixing them is a frequent slip. If some , the vectors were linearly dependent.

LU decomposition

For a square matrix , LU decomposition records Gaussian elimination as a product . is the upper triangular matrix reached at the end of forward elimination. is unit lower triangular (ones on the diagonal), and its entry () is the multiplier used to clear position : , with row row row .

LU FACTORISATION

Shown for . Elimination without row exchanges succeeds exactly when the first pivots are non-zero, equivalently when the leading principal minors are non-zero; the factorisation with unit lower is then unique. ( may be , which happens exactly when is singular.)

PIVOTS FROM LEADING PRINCIPAL MINORS

is the determinant of the top-left block of ; valid when no row exchanges are needed ().

PIVOTED FORM

When a zero pivot appears, rows are exchanged; is an permutation matrix. A factorisation exists for every square , and , where is the number of row exchanges.

DETERMINANT FROM LU

Valid when no row exchanges were used; because is unit triangular.

SYMMETRIC MATRICES: LDLᵀ AND CHOLESKY

is symmetric with ; then . is positive definite exactly when every pivot (equivalently every ), and then the Cholesky factor is lower triangular with positive diagonal.

  1. Factorise once: by elimination, saving each multiplier in .

  2. Forward substitution: solve from the top row down.

  3. Back substitution: solve from the bottom row up.

  4. Then . The same serve every new right-hand side.

WORKED EXAMPLE

Factorise as , find , and solve .

Solution
  1. Pivot . Multipliers , . Row 2 becomes and row 3 becomes .

  2. Pivot . Multiplier . Row 3 becomes .

  3. So , , and . (Check: , , give pivots .)

  4. Forward: ; ; .

  5. Back: ; ; . Check row 3: .

Answer: and .

EXAM TIP

Multipliers go into with their sign as computed (row minus times row ). Putting in is a frequent error; a quick check is to multiply by and recover .

Singular value decomposition

Every real matrix (square or not, invertible or not) has an SVD. Acting on , applies (a rotation or reflection), then (a stretch along the coordinate axes, possibly changing the dimension), then (another rotation or reflection).

SINGULAR VALUE DECOMPOSITION

is orthogonal (left singular vectors ), is orthogonal (right singular vectors ), is with the singular values on its diagonal and zeros elsewhere; . Equivalently .

SINGULAR VALUES FROM EIGENVALUES

() and () are symmetric positive semidefinite and have the same non-zero eigenvalues; all their other eigenvalues are . The columns of are orthonormal eigenvectors of and the columns of are orthonormal eigenvectors of .

LEFT VECTORS FROM RIGHT VECTORS

Fixes so that its sign agrees with ; choosing independently from can give a wrong sign.

RANK-ONE MATRIX

and are non-zero, so is of rank ; this follows from .

  1. Form (an symmetric matrix) and find its eigenvalues . If it is quicker to use the matrix , which has the same non-zero eigenvalues.

  2. Set in decreasing order; the number of non-zero ones is .

  3. Find orthonormal eigenvectors of to form .

  4. Compute for each non-zero ; complete to an orthonormal basis of if .

WORKED EXAMPLE

For find the singular values, , and check them against .

Solution
  1. , with eigenvalues , that is and .

  2. Singular values: and .

  3. The 2-norm is the largest singular value, .

  4. Checks: and .

Answer: ; .

Matrix

Singular values

orthogonal ()

all equal to

symmetric

, the absolute values of its eigenvalues

symmetric positive semidefinite

(the SVD is the eigendecomposition)

the same non-zero singular values as

EXAM TIP

Singular values are square roots of eigenvalues of , not eigenvalues of . For a square they equal the exactly when is normal (), symmetric matrices being the usual case. For a general square the product of the equals , but their sum need not equal .

Rank, norms and low-rank approximation

RANK AND NORMS FROM SINGULAR VALUES

is the spectral norm; is the Frobenius norm (square root of the sum of squared entries).

SQUARE MATRICES

is ; is invertible exactly when , and is the 2-norm condition number.

RANK-$K$ TRUNCATION

Keeps the largest singular values, ; has rank .

BEST LOW-RANK APPROXIMATION (ECKART-YOUNG)

ranges over matrices; the minimum is attained by in both norms; take if .

LEAST SQUARES THROUGH THE SVD

() is the pseudo-inverse, where () has in place of each non-zero ; this gives the least-squares solution of smallest norm, and it equals when the columns of are independent.

Decomposition

Form

Exists for

Main use

LU

(or )

square with ; with row exchanges, every square

solving , determinant

QR (Gram-Schmidt)

with independent columns

projections, least squares

SVD

every real matrix

rank, 2-norm, low-rank approximation

EXAM TIP

In the Eckart-Young error, the 2-norm error is a single singular value , while the Frobenius error is the square root of the sum of squares of all the discarded ones. Read the question to see which norm is asked.

PREVIOUS-YEAR QUESTIONS

1 question from the DA papers

Try each question first, then open the answer. We placed each question under a topic ourselves; the exam paper does not label topics.

See these papers in full: GATE DA 2024

PRACTICE

5 questions to test yourself

PRACTICE 11 mark · NAT

In (column vectors, Euclidean norm), let and . What is the length of the orthogonal projection of onto the line spanned by ?

Answer and solution

Answer: (accepted range )

  1. and .

  2. Projection .

  3. Length (equivalently ).

PRACTICE 22 marks · NAT

Let . Gaussian elimination without row exchanges gives with unit lower triangular and upper triangular (). What is the product of the pivots ?

Answer and solution

Answer: (accepted range )

  1. Pivot . Multipliers , .

  2. Row 2 . Row 3 .

  3. Pivot , multiplier . Row 3 , so .

  4. Product . Cross-check by cofactors along row 1: .

PRACTICE 31 mark · MSQ

A real matrix has singular values , and . Which of the following statements are true?

  1. (A)

  2. (B)

  3. (C)

    The eigenvalues of are , and

  4. (D)

    is singular

Answer and solution

Answer: (A), (B), (D)

  1. Rank equals the number of non-zero singular values, which is 2, so (A) is true.

  2. The 2-norm is the largest singular value, , so (B) is true.

  3. The eigenvalues of are the squares of the singular values: , , . So (C) is false.

  4. , so is singular and (D) is true.

PRACTICE 42 marks · NAT

A real matrix has singular values , and . Over all real matrices of rank at most , what is the minimum possible value of (Frobenius norm)? Give your answer correct to two decimal places.

Answer and solution

Answer: (accepted range )

  1. By the Eckart-Young result, the best rank-1 approximation keeps and discards the rest.

  2. Minimum error .

  3. , so the answer is .

PRACTICE 51 mark · MCQ

Let (a matrix) and . What is the minimum value of over real scalars ?

  1. (A)

    1

  2. (B)

    3

  3. (C)

    5

  4. (D)

    10

Answer and solution

Answer: (C)

  1. Normal equation: , i.e. , so .

  2. and the residual is .

  3. Minimum . The residual is orthogonal to : . (Check: .)

OFFICIAL GATE 2027 SYLLABUS WORDING

Copied from the GATE 2027 syllabus; see all 2027 syllabi.

GATE DA

projections, LU decomposition, singular value decomposition

Preparing in Kolkata? IAE Academy's course for GATE DA.