How do you find L of LU for this LU factorization? $$
        \begin{bmatrix}
        3 & -7 & -2 \\
        -3 & 5 & 1 \\
        6 & -4 & 0 \\
        \end{bmatrix}
$$
The method my book gave me of doing this is:
divide col1 by first pivot position, then I am completely lost, as my $U$ doesn't help for whatever reason I have:
$$
        \begin{bmatrix}
        3 & -7 & -2 \\
        0 & -2 & 1 \\
        0 & 3 & 2 \\
        \end{bmatrix}
$$
How do I turn $-2$ & $3$ into 
$$
        \begin{bmatrix}
        1 & 0 & 0 \\
        -1 & 1 & 0 \\
        2 & -5 & 1 \\
        \end{bmatrix}
$$

We can use Doolittle's Method:
$$\begin{bmatrix} 1 & 0 & 0 \\ l_{21} & 1 & 0  \\ l_{31} & l_{32} & 1    \end{bmatrix} \cdot \begin{bmatrix} u_{11} & u_{12} & u_{13} \\ 0 & u_{22} & u_{23} \\ 0 & 0 & u_{33}   \end{bmatrix} = \begin{bmatrix}
        3 & -7 & -2 \\
        -3 & 5 & 1 \\
        6 & -4 & 0 \\
        \end{bmatrix}$$
Solving for each of the variables, in the correct order yields:


*

*$u_{11} = 3, u_{12} = 7, u_{13} = -2$

*$l_{21} = -1, u_{22} = -2, ...$

*$l_{31} = 2, l_{32} =-5, ...$

*$\ldots $


So, we arrive at:
$$A = \begin{bmatrix}3 & -7 & -2 \\-3 & 5 & 1 \\6 & -4 & 0 \\\end{bmatrix}  = LU = \begin{bmatrix} 1 & 0 & 0 \\ -1 & 1 & 0  \\ 2& -5 & 1  \end{bmatrix} \cdot \begin{bmatrix} 3 & 7 & -2  \\ 0 & -2 & 1 \\ 0 & 0 & -1  \end{bmatrix}$$
We could have also used Crout's or Choleski's Method for the $LU$ approach. See: what are pivot numbers in LU decomposition? please explain me in an example
Please note that sometimes an LU decomposition is not possible, and sometimes, when it is, we have to resort to using permutation matrices and other approaches.
