Back to Gaussian elimination revisited

Activity 5.1.4

Avg difficulty 2.5

Sage will create LULU factorizations; once we have a matrix A, we write P, L, U = A.LU() to obtain the matrices PP, LL, and UU such that PA=LUPA = LU.

  1. In this example, we found the LULU factorization A=[2−31−4502−22]=[100−2101−11][2−310−12003]=LU.A = \begin{bmatrix} 2 & -3 & 1 \\ -4 & 5 & 0 \\ 2 & -2 & 2 \end{bmatrix} = \begin{bmatrix} 1 & 0 & 0 \\ -2 & 1 & 0 \\ 1 & -1 & 1 \end{bmatrix} \begin{bmatrix} 2 & -3 & 1 \\ 0 & -1 & 2 \\ 0 & 0 & 3 \end{bmatrix}=LU. Using Sage, define the matrix AA, and then ask Sage for the LULU factorization. What are the matrices PP, LL, and UU?

    Notice that Sage finds a different LULU factorization than we found in the previous example because Sage uses partial pivoting, as described in the previous section, when it performs Gaussian elimination.

  2. Define the vector b=[8−138]\bvec = \threevec8{-13}{8} in Sage and compute PbP\bvec.

  3. Use the matrices L and U to solve Lc=PbL\cvec = P\bvec and Ux=cU\xvec = \cvec. You should find the same solution x\xvec that we found in the previous example.

  4. Use the factorization to solve the equation Ax=[9−1610]A\xvec = \threevec9{-16}{10}.

  5. How does the factorization show us that AA is invertible and that, therefore, every equation Ax=bA\xvec=\bvec has a unique solution?

  6. Suppose that we have the matrix B=[3−122−11213]B = \left[\begin{array}{rrr} 3 & -1 & 2 \\ 2 & -1 & 1 \\ 2 & 1 & 3 \\ \end{array}\right]. Use Sage to find the LULU factorization. Explain how the factorization shows that BB is not invertible.

  7. Consider the matrix C=[−212−11−10232−10]C = \left[\begin{array}{rrrr} -2 & 1 & 2 & -1 \\ 1 & -1 & 0 & 2 \\ 3 & 2 & -1 & 0 \\ \end{array}\right] and find its LULU factorization. Explain why CC and UU have the same null space and use this observation to find a basis for Nul(A)\nul(A).

Austin, Understanding Linear Algebra, §5.1 Gaussian elimination revisited, Activity 5.1.4

AI Tutor

Adapted from Understanding Linear Algebra © 2023 David Austin. Licensed under CC BY 4.0. Source: Understanding Linear Algebra. Imported at revision 3e6dced.