PYQs / GATE CS / 2022 / Set 1 / Q45 GATE CS 2022 Set 1 — Question 45 Go beyond PYQs with Success Tracker AI-powered personalised practice and doubt support. Unlimited practice on eligible plans; AI usage limits apply. MCQ +2 / -0.67 Medium LU Decomposition Linear Algebra Engineering Mathematics
Engineering Mathematics → Linear Algebra → LU Decomposition
Last updated 5 September 2026
Question Consider solving the following system of simultaneous equations using LU decomposition.
x 1 + x 2 − 2 x 3 = 4 x_1 + x_2 - 2x_3 = 4 x 1 + x 2 − 2 x 3 = 4 x 1 + 3 x 2 − x 3 = 7 x_1 + 3x_2 - x_3 = 7 x 1 + 3 x 2 − x 3 = 7 2 x 1 + x 2 − 5 x 3 = 7 2x_1 + x_2 - 5x_3 = 7 2 x 1 + x 2 − 5 x 3 = 7 where
L L L and
U U U are denoted as
L = ( L 11 0 0 L 21 L 22 0 L 31 L 32 L 33 ) , U = ( U 11 U 12 U 13 0 U 22 U 23 0 0 U 33 ) L = \begin{pmatrix} L_{11} & 0 & 0 \\ L_{21} & L_{22} & 0 \\ L_{31} & L_{32} & L_{33} \end{pmatrix}, \quad U = \begin{pmatrix} U_{11} & U_{12} & U_{13} \\ 0 & U_{22} & U_{23} \\ 0 & 0 & U_{33} \end{pmatrix} L = L 11 L 21 L 31 0 L 22 L 32 0 0 L 33 , U = U 11 0 0 U 12 U 22 0 U 13 U 23 U 33 Which one of the following is the correct combination of values for
L 32 L_{32} L 32 ,
U 33 U_{33} U 33 , and
x 1 x_1 x 1 ?
Correct answer (D) L₃₂ = -(1)/(2), U₃₃ = -(1)/(2), x₁ = 0
Solution We perform LU decomposition (
A = L U A = LU A = LU ) using the Doolittle algorithm (where
L i i = 1 L_{ii} = 1 L ii = 1 ).
Matrix
A = ( 1 1 − 2 1 3 − 1 2 1 − 5 ) A = \begin{pmatrix} 1 & 1 & -2 \\ 1 & 3 & -1 \\ 2 & 1 & -5 \end{pmatrix} A = 1 1 2 1 3 1 − 2 − 1 − 5 .
1. First row of U (same as A):
U 11 = 1 , U 12 = 1 , U 13 = − 2 U_{11}=1, U_{12}=1, U_{13}=-2 U 11 = 1 , U 12 = 1 , U 13 = − 2 .
2. First column of L :
L 11 = 1 L_{11}=1 L 11 = 1 .
L 21 = A 21 / U 11 = 1 / 1 = 1 L_{21} = A_{21}/U_{11} = 1/1 = 1 L 21 = A 21 / U 11 = 1/1 = 1 .
L 31 = A 31 / U 11 = 2 / 1 = 2 L_{31} = A_{31}/U_{11} = 2/1 = 2 L 31 = A 31 / U 11 = 2/1 = 2 .
3. Second row of U :
U 22 = A 22 − L 21 U 12 = 3 − 1 ( 1 ) = 2 U_{22} = A_{22} - L_{21}U_{12} = 3 - 1(1) = 2 U 22 = A 22 − L 21 U 12 = 3 − 1 ( 1 ) = 2 .
U 23 = A 23 − L 21 U 13 = − 1 − 1 ( − 2 ) = 1 U_{23} = A_{23} - L_{21}U_{13} = -1 - 1(-2) = 1 U 23 = A 23 − L 21 U 13 = − 1 − 1 ( − 2 ) = 1 .
4. Second column of L :
L 22 = 1 L_{22}=1 L 22 = 1 .
L 32 = ( A 32 − L 31 U 12 ) / U 22 = ( 1 − 2 ( 1 ) ) / 2 = − 1 / 2 L_{32} = (A_{32} - L_{31}U_{12}) / U_{22} = (1 - 2(1)) / 2 = -1/2 L 32 = ( A 32 − L 31 U 12 ) / U 22 = ( 1 − 2 ( 1 )) /2 = − 1/2 .
5. Third row of U :
U 33 = A 33 − L 31 U 13 − L 32 U 23 = − 5 − 2 ( − 2 ) − ( − 0.5 ) ( 1 ) = − 5 + 4 + 0.5 = − 0.5 U_{33} = A_{33} - L_{31}U_{13} - L_{32}U_{23} = -5 - 2(-2) - (-0.5)(1) = -5 + 4 + 0.5 = -0.5 U 33 = A 33 − L 31 U 13 − L 32 U 23 = − 5 − 2 ( − 2 ) − ( − 0.5 ) ( 1 ) = − 5 + 4 + 0.5 = − 0.5 .
So,
L 32 = − 1 / 2 L_{32} = -1/2 L 32 = − 1/2 and
U 33 = − 1 / 2 U_{33} = -1/2 U 33 = − 1/2 .
Now solve for
x x x using
L y = b Ly = b L y = b and
U x = y Ux = y U x = y , where
b = ( 4 7 7 ) b = \begin{pmatrix} 4 \\ 7 \\ 7 \end{pmatrix} b = 4 7 7 .
Forward substitution (L y = b Ly=b L y = b ): y 1 = 4 y_1 = 4 y 1 = 4 .
y 2 = 7 − y 1 = 3 y_2 = 7 - y_1 = 3 y 2 = 7 − y 1 = 3 .
y 3 = 7 − 2 y 1 − ( − 0.5 ) y 2 = 7 − 8 + 1.5 = 0.5 y_3 = 7 - 2y_1 - (-0.5)y_2 = 7 - 8 + 1.5 = 0.5 y 3 = 7 − 2 y 1 − ( − 0.5 ) y 2 = 7 − 8 + 1.5 = 0.5 .
Backward substitution (U x = y Ux=y U x = y ): − 0.5 x 3 = 0.5 ⟹ x 3 = − 1 -0.5x_3 = 0.5 \implies x_3 = -1 − 0.5 x 3 = 0.5 ⟹ x 3 = − 1 .
2 x 2 + x 3 = 3 ⟹ 2 x 2 − 1 = 3 ⟹ x 2 = 2 2x_2 + x_3 = 3 \implies 2x_2 - 1 = 3 \implies x_2 = 2 2 x 2 + x 3 = 3 ⟹ 2 x 2 − 1 = 3 ⟹ x 2 = 2 .
x 1 + x 2 − 2 x 3 = 4 ⟹ x 1 + 2 − 2 ( − 1 ) = 4 ⟹ x 1 + 4 = 4 ⟹ x 1 = 0 x_1 + x_2 - 2x_3 = 4 \implies x_1 + 2 - 2(-1) = 4 \implies x_1 + 4 = 4 \implies x_1 = 0 x 1 + x 2 − 2 x 3 = 4 ⟹ x 1 + 2 − 2 ( − 1 ) = 4 ⟹ x 1 + 4 = 4 ⟹ x 1 = 0 .
Thus,
L 32 = − 1 / 2 L_{32} = -1/2 L 32 = − 1/2 ,
U 33 = − 1 / 2 U_{33} = -1/2 U 33 = − 1/2 , and
x 1 = 0 x_1 = 0 x 1 = 0 .
Turn this into a strength. Explore AI-powered practice and doubt support with Success Tracker. Review answer and solution without JavaScript Interactive answer checking needs JavaScript. The published solution is available below.
Correct answer (D) L₃₂ = -(1)/(2), U₃₃ = -(1)/(2), x₁ = 0
Solution We perform LU decomposition (
A = L U A = LU A = LU ) using the Doolittle algorithm (where
L i i = 1 L_{ii} = 1 L ii = 1 ).
Matrix
A = ( 1 1 − 2 1 3 − 1 2 1 − 5 ) A = \begin{pmatrix} 1 & 1 & -2 \\ 1 & 3 & -1 \\ 2 & 1 & -5 \end{pmatrix} A = 1 1 2 1 3 1 − 2 − 1 − 5 .
1. First row of U (same as A):
U 11 = 1 , U 12 = 1 , U 13 = − 2 U_{11}=1, U_{12}=1, U_{13}=-2 U 11 = 1 , U 12 = 1 , U 13 = − 2 .
2. First column of L :
L 11 = 1 L_{11}=1 L 11 = 1 .
L 21 = A 21 / U 11 = 1 / 1 = 1 L_{21} = A_{21}/U_{11} = 1/1 = 1 L 21 = A 21 / U 11 = 1/1 = 1 .
L 31 = A 31 / U 11 = 2 / 1 = 2 L_{31} = A_{31}/U_{11} = 2/1 = 2 L 31 = A 31 / U 11 = 2/1 = 2 .
3. Second row of U :
U 22 = A 22 − L 21 U 12 = 3 − 1 ( 1 ) = 2 U_{22} = A_{22} - L_{21}U_{12} = 3 - 1(1) = 2 U 22 = A 22 − L 21 U 12 = 3 − 1 ( 1 ) = 2 .
U 23 = A 23 − L 21 U 13 = − 1 − 1 ( − 2 ) = 1 U_{23} = A_{23} - L_{21}U_{13} = -1 - 1(-2) = 1 U 23 = A 23 − L 21 U 13 = − 1 − 1 ( − 2 ) = 1 .
4. Second column of L :
L 22 = 1 L_{22}=1 L 22 = 1 .
L 32 = ( A 32 − L 31 U 12 ) / U 22 = ( 1 − 2 ( 1 ) ) / 2 = − 1 / 2 L_{32} = (A_{32} - L_{31}U_{12}) / U_{22} = (1 - 2(1)) / 2 = -1/2 L 32 = ( A 32 − L 31 U 12 ) / U 22 = ( 1 − 2 ( 1 )) /2 = − 1/2 .
5. Third row of U :
U 33 = A 33 − L 31 U 13 − L 32 U 23 = − 5 − 2 ( − 2 ) − ( − 0.5 ) ( 1 ) = − 5 + 4 + 0.5 = − 0.5 U_{33} = A_{33} - L_{31}U_{13} - L_{32}U_{23} = -5 - 2(-2) - (-0.5)(1) = -5 + 4 + 0.5 = -0.5 U 33 = A 33 − L 31 U 13 − L 32 U 23 = − 5 − 2 ( − 2 ) − ( − 0.5 ) ( 1 ) = − 5 + 4 + 0.5 = − 0.5 .
So,
L 32 = − 1 / 2 L_{32} = -1/2 L 32 = − 1/2 and
U 33 = − 1 / 2 U_{33} = -1/2 U 33 = − 1/2 .
Now solve for
x x x using
L y = b Ly = b L y = b and
U x = y Ux = y U x = y , where
b = ( 4 7 7 ) b = \begin{pmatrix} 4 \\ 7 \\ 7 \end{pmatrix} b = 4 7 7 .
Forward substitution (L y = b Ly=b L y = b ): y 1 = 4 y_1 = 4 y 1 = 4 .
y 2 = 7 − y 1 = 3 y_2 = 7 - y_1 = 3 y 2 = 7 − y 1 = 3 .
y 3 = 7 − 2 y 1 − ( − 0.5 ) y 2 = 7 − 8 + 1.5 = 0.5 y_3 = 7 - 2y_1 - (-0.5)y_2 = 7 - 8 + 1.5 = 0.5 y 3 = 7 − 2 y 1 − ( − 0.5 ) y 2 = 7 − 8 + 1.5 = 0.5 .
Backward substitution (U x = y Ux=y U x = y ): − 0.5 x 3 = 0.5 ⟹ x 3 = − 1 -0.5x_3 = 0.5 \implies x_3 = -1 − 0.5 x 3 = 0.5 ⟹ x 3 = − 1 .
2 x 2 + x 3 = 3 ⟹ 2 x 2 − 1 = 3 ⟹ x 2 = 2 2x_2 + x_3 = 3 \implies 2x_2 - 1 = 3 \implies x_2 = 2 2 x 2 + x 3 = 3 ⟹ 2 x 2 − 1 = 3 ⟹ x 2 = 2 .
x 1 + x 2 − 2 x 3 = 4 ⟹ x 1 + 2 − 2 ( − 1 ) = 4 ⟹ x 1 + 4 = 4 ⟹ x 1 = 0 x_1 + x_2 - 2x_3 = 4 \implies x_1 + 2 - 2(-1) = 4 \implies x_1 + 4 = 4 \implies x_1 = 0 x 1 + x 2 − 2 x 3 = 4 ⟹ x 1 + 2 − 2 ( − 1 ) = 4 ⟹ x 1 + 4 = 4 ⟹ x 1 = 0 .
Thus,
L 32 = − 1 / 2 L_{32} = -1/2 L 32 = − 1/2 ,
U 33 = − 1 / 2 U_{33} = -1/2 U 33 = − 1/2 , and
x 1 = 0 x_1 = 0 x 1 = 0 .
Understand the concept, then try another question Revisit Engineering Mathematics with concept notes, common mistakes and an original worked example before your next attempt.
More questions on Linear Algebra 2026 Set 2 Q3 A day can only be cloudy or sunny. The probability of a day being cloudy is 0.5 0.5 0.5 , independent of… 2026 Set 2 Q5 ‘When it is raining, peacocks dance.’ Based only on this sentence, which one of the following… 2026 Set 2 Q8 Figures (i) and (ii) represent intercity highway systems. The black dots represent cities and the… 2026 Set 1 Q10 An unbiased six-faced dice whose faces are marked with numbers 1, 2, 3, 4, 5, and 6 is rolled twice… 2026 Set 2 Q10 An unbiased six-faced dice whose faces are marked with numbers 1, 2, 3, 4, 5, and 6 is rolled twice… ← Q44 Full paper Q46 →