Step 1: Initialize U as A and L as the identity matrix
Start by initializing U=A and L=I:
U=13111−21−3−5,L=100010001
Step 2: Eliminate elements below the diagonal in the first column
We want to eliminate the elements in the second and third rows, first column, of U by performing elementary row operations and storing the corresponding multipliers in L.
Eliminate U21:
To eliminate the element 3 (in position U21), we perform the operation:
R2=R2−3R1
This results in the new U matrix:
U=1011−2−21−6−5
The multiplier used is l21=3, so update the L matrix:
L=130010001
Eliminate U31:
To eliminate the element 1 (in position U31), we perform the operation:
R3=R3−1R1
This results in the new U matrix:
U=1001−2−31−6−6
The multiplier used is l31=1, so update the L matrix:
L=131010001
Step 3: Eliminate elements below the diagonal in the second column
Next, we move to the second column of U. We want to eliminate the element in the third row, second column, by performing an elementary row operation and storing the corresponding multiplier in L.
Eliminate U32:
To eliminate the element −3 (in position U32), we perform the operation:
R3=R3−23R2
This results in the new U matrix:
U=1001−201−63
The multiplier used is l32=23, so update the L matrix:
L=1310123001
Step 4: Final L and U matrices
Thus, the LU decomposition of matrix A gives:
L=1310123001andU=1001−201−63
Step 5: Solve for y in Ly=b
Now, to solve the system Ax=b, we first solve Ly=b using forward substitution.