<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Linear systems – direct methods | Nicholas Hu</title>
    <link>https://www.math.ucla.edu/~njhu/notes/nla/lin-direct/</link>
      <atom:link href="https://www.math.ucla.edu/~njhu/notes/nla/lin-direct/index.xml" rel="self" type="application/rss+xml" />
    <description>Linear systems – direct methods</description>
    <generator>Hugo Blox Builder (https://hugoblox.com)</generator><language>en-ca</language><lastBuildDate>Mon, 16 Jun 2025 00:00:00 +0000</lastBuildDate>
    <image>
      <url>https://www.math.ucla.edu/~njhu/media/icon_hu_d46824b1c45312fd.png</url>
      <title>Linear systems – direct methods</title>
      <link>https://www.math.ucla.edu/~njhu/notes/nla/lin-direct/</link>
    </image>
    
    <item>
      <title>The LU and PLU factorizations</title>
      <link>https://www.math.ucla.edu/~njhu/notes/nla/lin-direct/lu/</link>
      <pubDate>Wed, 20 Dec 2023 00:00:00 +0000</pubDate>
      <guid>https://www.math.ucla.edu/~njhu/notes/nla/lin-direct/lu/</guid>
      <description>&lt;div class=&#34;btn-links mb-3&#34;&gt;
&lt;a class=&#34;btn btn-outline-primary btn-page-header btn-sm&#34; href=&#34;../lu.pdf&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;
  PDF
&lt;/a&gt;
&lt;/div&gt;
&lt;!--
No newlines allowed between $$&#39;s below!
--&gt;
&lt;div style=&#34;display: none;&#34;&gt;
$$
\newcommand{\set}[1]{\{ #1 \}}
\newcommand{\Set}[1]{\left \{ #1 \right\}}
\renewcommand{\emptyset}{\varnothing}
\newcommand{\N}{\mathbb{N}}
\newcommand{\Z}{\mathbb{Z}}
\newcommand{\R}{\mathbb{R}}
\newcommand{\Rn}{\mathbb{R}^n}
\newcommand{\Rm}{\mathbb{R}^m}
\newcommand{\C}{\mathbb{C}}
\newcommand{\F}{\mathbb{F}}
\newcommand{\abs}[1]{\lvert #1 \rvert}
\newcommand{\Abs}[1]{\left\lvert #1 \right\rvert}
\newcommand{\inner}[2]{\langle #1, #2 \rangle}
\newcommand{\Inner}[2]{\left\langle #1, #2 \right\rangle}
\newcommand{\norm}[1]{\lVert #1 \rVert}
\newcommand{\Norm}[1]{\left\lVert #1 \right\rVert}
\newcommand{\trans}{{\top}}
\newcommand{\span}{\mathop{\mathrm{span}}}
\definecolor{cblue}{RGB}{31, 119, 180}
\definecolor{corange}{RGB}{255, 127, 14}
\definecolor{cgreen}{RGB}{44, 160, 44}
\definecolor{cred}{RGB}{214, 39, 40}
\definecolor{cpurple}{RGB}{148, 103, 189}
\definecolor{cbrown}{RGB}{140, 86, 75}
\definecolor{cpink}{RGB}{227, 119, 194}
\definecolor{cgrey}{RGB}{127, 127, 127}
\definecolor{cyellow}{RGB}{188, 189, 34}
\definecolor{cteal}{RGB}{23, 190, 207}
$$
&lt;/div&gt;
&lt;h2 id=&#34;the-lu-factorization&#34;&gt;The LU factorization&lt;/h2&gt;
&lt;p&gt;Let 

$\F$ be a field and 

$A \in \F^{n \times n}$. Given a 

$b \in \F^n$, recall that the linear system 

$Ax = b$ can be solved by performing &lt;strong&gt;Gaussian elimination&lt;/strong&gt; (also known as &lt;strong&gt;row reduction&lt;/strong&gt;) on the augmented matrix 

$\begin{bmatrix} A &amp; b \end{bmatrix}$ to transform it into an augmented matrix of the form 

$\begin{bmatrix} U &amp; y \end{bmatrix}$, where 

$U \in \F^{n \times n}$ is upper triangular and 

$y \in \F^n$, which represents an equivalent linear system 

$Ux = y$. Such a system can then be solved readily by backward substitution. In fact, this process (under certain conditions) amounts to computing an &lt;strong&gt;LU factorization&lt;/strong&gt; of 

$A$ as 

$LU$, where 

$L \in \F^{n \times n}$ is &lt;em&gt;unit&lt;/em&gt; lower triangular and 

$U \in \F^{n \times n}$ is upper triangular.&lt;/p&gt;
&lt;p&gt;To illustrate this, suppose that 

$\F = \R$ and


$$
\underbrace{\begin{bmatrix} 
1 &amp; 5 &amp; 1 &amp; 2 \\ 
2 &amp; 6 &amp; 3 &amp; 4 \\ 
3 &amp; 7 &amp; 2 &amp; 4 \\ 
4 &amp; 8 &amp; 1 &amp; 3 
\end{bmatrix}}_{A} 
\underbrace{\begin{bmatrix} 
x_1 \\ 
x_2 \\ 
x_3 \\ 
x_4 
\end{bmatrix}}_{x\vphantom{A}} 
= 
\underbrace{\begin{bmatrix} 
7 \\ 
8 \\ 
7 \\ 
8 
\end{bmatrix}}_{b\vphantom{A}}.
$$
Then the variable 

$x_1$ can be eliminated from the second equation 

$2 x_1 + 6 x_2 + 3 x_3 + 4 x_4 = 8$ by multiplying the first equation 

$1 x_1 + 5 x_2 + 1 x_3 + 2 x_4 = 7$ by 

$\frac{2}{1}$ and subtracting the resulting equation from the second. The quotient 

$\frac{2}{1} = 2$ is called a &lt;strong&gt;multiplier&lt;/strong&gt; and the divisor 

$1$ is called a &lt;strong&gt;pivot&lt;/strong&gt;. In other words (ignoring the vector 

$b$​ for now),


$$
\begin{bmatrix} 2 &amp; 6 &amp; 3 &amp; 4 \end{bmatrix} - 2 \, {\color{cblue} \begin{bmatrix} 1 &amp; 5 &amp; 1 &amp; 2 \end{bmatrix}} = {\color{corange} \begin{bmatrix} 0 &amp; -4 &amp; 1 &amp; 0 \end{bmatrix}}\,.
$$&lt;/p&gt;
&lt;p&gt;Similarly, 

$x_1$ can be eliminated from the third and fourth equations, yielding the factorization&lt;/p&gt;


$$
\begin{align*}
\begin{bmatrix} 
1 &amp; 5 &amp; 1 &amp; 2 \\ 
2 &amp; 6 &amp; 3 &amp; 4 \\ 
3 &amp; 7 &amp; 2 &amp; 4 \\ 
4 &amp; 8 &amp; 1 &amp; 3 
\end{bmatrix}
&amp;=
\begin{bmatrix} 
1 \, {\color{cblue} \begin{bmatrix} 1 &amp; 5 &amp; 1 &amp; 2 \end{bmatrix} \hphantom{{} + 1 \begin{bmatrix} 0 &amp; -8\hphantom{2} &amp; -1 &amp; -2 \end{bmatrix}}} \\ 
2 \, {\color{cblue} \begin{bmatrix} 1 &amp; 5 &amp; 1 &amp; 2 \end{bmatrix}} + 1 \, {\color{corange} \begin{bmatrix} 0 &amp; -4\hphantom{2} &amp; \hphantom{-}1 &amp; \hphantom{-}0 \end{bmatrix}} \\ 
3 \, {\color{cblue} \begin{bmatrix} 1 &amp; 5 &amp; 1 &amp; 2 \end{bmatrix}} + 1 \begin{bmatrix} 0 &amp; -8\hphantom{2} &amp; -1 &amp; -2 \end{bmatrix} \\ 
4 \, {\color{cblue} \begin{bmatrix} 1 &amp; 5 &amp; 1 &amp; 2 \end{bmatrix}} + 1 \begin{bmatrix} 0 &amp; -12 &amp; -3 &amp; -5 \end{bmatrix}
\end{bmatrix} \\
&amp;=
\begin{bmatrix}
1 &amp; \\
2 &amp; 1 &amp; \\
3 &amp; &amp; 1 &amp; \\
4 &amp; &amp; &amp; 1
\end{bmatrix}
\begin{bmatrix}
\color{cblue} 1 &amp; \color{cblue} 5 &amp; \color{cblue} 1 &amp; \color{cblue} 2 \\
&amp; \color{corange} -4 &amp; \color{corange} 1 &amp; \color{corange} 0 \\
&amp; -8 &amp; -1 &amp; -2 \\
&amp; -12 &amp; -3 &amp; -5
\end{bmatrix}
\end{align*}
$$
&lt;p&gt;(where blanks denote zeroes).&lt;/p&gt;
&lt;p&gt;The variable 

$x_2$ can then be eliminated analogously from the new third and fourth equations. For instance,&lt;/p&gt;


$$
\begin{bmatrix} 0 &amp; -8 &amp; -1 &amp; -2 \end{bmatrix} - 2 \, {\color{corange} \begin{bmatrix} 0 &amp; -4 &amp; 1 &amp; 0 \end{bmatrix}} = {\color{cgreen} \begin{bmatrix} 0 &amp; 0 &amp; -3 &amp; -2 \end{bmatrix}}\,.
$$
&lt;p&gt;In view of the previous step, this means that&lt;/p&gt;


$$
\begin{bmatrix} 3 &amp; 7 &amp; 2 &amp; 4 \end{bmatrix} - 3 \, {\color{cblue} \begin{bmatrix} 1 &amp; 5 &amp; 1 &amp; 2 \end{bmatrix}} - 2 \, {\color{corange} \begin{bmatrix} 0 &amp; -4 &amp; 1 &amp; 0 \end{bmatrix}} = {\color{cgreen} \begin{bmatrix} 0 &amp; 0 &amp; -3 &amp; -2 \end{bmatrix}}\,.
$$
&lt;p&gt;Thus, after the second step of the factorization, we have&lt;/p&gt;


$$
\begin{bmatrix} 
1 &amp; 5 &amp; 1 &amp; 2 \\ 
2 &amp; 6 &amp; 3 &amp; 4 \\ 
3 &amp; 7 &amp; 2 &amp; 4 \\ 
4 &amp; 8 &amp; 1 &amp; 3 
\end{bmatrix}
=
\begin{bmatrix}
1 &amp; \\
2 &amp; 1 &amp; \\
3 &amp; 2 &amp; 1 &amp; \\
4 &amp; 3 &amp; &amp; 1
\end{bmatrix}
\begin{bmatrix}
\color{cblue} 1 &amp; \color{cblue} 5 &amp; \color{cblue} 1 &amp; \color{cblue} 2 \\
&amp; \color{corange} -4 &amp; \color{corange} 1 &amp; \color{corange} 0 \\
&amp; &amp; \color{cgreen} -3 &amp; \color{cgreen} -2 \\
&amp; &amp; -6 &amp; -5
\end{bmatrix}.
$$
&lt;p&gt;Finally, an entirely analogous third step completes the LU factorization:&lt;/p&gt;


$$
\underbrace{\begin{bmatrix} 
1 &amp; 5 &amp; 1 &amp; 2 \\ 
2 &amp; 6 &amp; 3 &amp; 4 \\ 
3 &amp; 7 &amp; 2 &amp; 4 \\ 
4 &amp; 8 &amp; 1 &amp; 3 
\end{bmatrix}}_{A}
=
\underbrace{\begin{bmatrix}
1 &amp; \\
2 &amp; 1 &amp; \\
3 &amp; 2 &amp; 1 &amp; \\
4 &amp; 3 &amp; 2 &amp; 1
\end{bmatrix}}_{L}
\underbrace{\begin{bmatrix}
\color{cblue} 1 &amp; \color{cblue} 5 &amp; \color{cblue} 1 &amp; \color{cblue} 2 \\
&amp; \color{corange} -4 &amp; \color{corange} 1 &amp; \color{corange} 0 \\
&amp; &amp; \color{cgreen} -3 &amp; \color{cgreen} -2 \\
&amp; &amp; &amp; \color{cred} -1
\end{bmatrix}}_{U}.
$$
&lt;p&gt;In general, we can regard LU factorization as partitioning a matrix 

$A \in \F^{n \times n}$ as


$$
A = \begin{bmatrix} \alpha &amp; b^\trans \\ c &amp; D \end{bmatrix},
$$
where 

$\alpha \in \F$, 

$b \in \F^{n-1}$, 

$c \in \F^{n-1}$, and 

$D \in \F^{(n-1) \times (n-1)}$. Provided that the pivot 

$\alpha$ is nonzero, we can eliminate 

$c$ by using the multipliers 

$\frac{c}{\alpha}$ to write 

$\begin{bmatrix} c &amp; D \end{bmatrix} - \frac{c}{\alpha} \begin{bmatrix} \alpha &amp; b^\trans \end{bmatrix} = \begin{bmatrix} 0 &amp; A&#39; \end{bmatrix}$ for some 

$A’ \in \F^{(n-1) \times (n-1)}$; the matrix 

$A&#39;  = D - \frac{c}{\alpha}b^\trans$ is known as the &lt;strong&gt;Schur complement&lt;/strong&gt; of 

$\begin{bmatrix} \alpha \end{bmatrix}$ in 

$A$. This yields the factorization


$$
A = \begin{bmatrix} 1 &amp; \\ \frac{c}{\alpha} &amp; I \end{bmatrix} \begin{bmatrix} \alpha &amp; b^\trans \\  &amp; A&#39; \end{bmatrix},
$$
which can be recursively continued by computing an LU factorization 

$L&#39; U&#39;$ of 

$A’$. If one exists, then 

$\begin{bmatrix} c &amp; D \end{bmatrix} - \frac{c}{\alpha} \begin{bmatrix} \alpha &amp; b^\trans \end{bmatrix} - L&#39; \begin{bmatrix} 0 &amp; U&#39; \end{bmatrix} = \begin{bmatrix} 0 &amp; 0 \end{bmatrix}$, so


$$
A = \underbrace{\begin{bmatrix} 1 &amp; \\ \frac{c}{\alpha} &amp; L&#39; \end{bmatrix}}_{L} \underbrace{\begin{bmatrix} \alpha &amp; b^\trans \\  &amp; U&#39; \end{bmatrix}}_{U}
$$
is an LU factorization of 

$A$.&lt;/p&gt;
&lt;h3 id=&#34;existence-and-uniqueness&#34;&gt;Existence and uniqueness&lt;/h3&gt;
&lt;p&gt;Let 

$a_{ij}^{(k)}$ denote the (

$i$, 

$j$)-entry of 

$A$ after the 

$k$&lt;sup&gt;th&lt;/sup&gt; step in the LU factorization. From the example above, it is clear that 

$A$ will have an LU factorization provided that the pivots 

$a_{11}^{(0)}, a_{22}^{(1)}, \dots, a_{n-1,n-1}^{(n-2)}$ are nonzero. Moreover, we see after 

$k-1$ steps that the 

$k$&lt;sup&gt;th&lt;/sup&gt; leading principal minor of 

$A$ is equal to 

$a_{11}^{(0)} a_{22}^{(1)} \cdots a_{kk}^{(k-1)}$, so 

$A$ will have an LU factorization if its first 

$n-1$ leading principal minors are nonzero.&lt;/p&gt;
&lt;p&gt;If 

$A$ is &lt;em&gt;nonsingular&lt;/em&gt;, this condition is also &lt;em&gt;necessary&lt;/em&gt; because the 

$k$&lt;sup&gt;th&lt;/sup&gt; leading principal minor of 

$A$ must be equal to 

$u_{11} u_{22} \cdots u_{kk}$. Furthermore, the LU factorization is &lt;em&gt;unique&lt;/em&gt; in this case, for if 

$L_1 U_1$ and 

$L_2 U_2$ are both LU factorizations of 

$A$, then 

$L_2^{-1} L_1 = U_2 U_1^{-1}$ must be simultaneously unit lower triangular and upper triangular, and hence equal to the identity.&lt;/p&gt;
&lt;h3 id=&#34;solving-linear-systems&#34;&gt;Solving linear systems&lt;/h3&gt;
&lt;p&gt;If the same row operations that were applied to 

$A$ are applied to 

$b$ as well, evidently the resulting vector 

$y$ will satisfy 

$b = Ly$ (since 

$\begin{bmatrix} A &amp; b \end{bmatrix}$ = 

$L \begin{bmatrix} U &amp; y \end{bmatrix}$). Therefore the solutions of 

$Ax = b$ will indeed be those of 

$Ux = y$. Notably, once an LU factorization of 

$A$ has been computed, it is possible to solve 

$Ax = b$ for any given 

$b \in \F^n$ by solving 

$Ly = b$ for 

$y$ and then 

$Ux = y$ for 

$x$, reusing the computed factors 

$L$ and 

$U$! (The former system can be solved readily by forward substitution and the latter by backward substitution.)&lt;/p&gt;
&lt;h2 id=&#34;the-plu-factorization&#34;&gt;The PLU factorization&lt;/h2&gt;
&lt;p&gt;It is possible to produce an LU-like factorization for &lt;em&gt;any&lt;/em&gt; 

$A \in \F^{n \times n}$ by allowing for &lt;em&gt;row interchanges&lt;/em&gt; in addition to the elementary row operation above. The resulting &lt;strong&gt;PLU factorization&lt;/strong&gt; consists of a permutation matrix 

$P \in \F^{n \times n}$ along with matrices 

$L$ and 

$U$ as above such that 

$PA = LU$ (or equivalently, 

$A = P^\trans LU$​).&lt;/p&gt;
&lt;p&gt;As an illustration, consider the matrix


$$
\underbrace{\begin{bmatrix} 
4 &amp; 4 &amp; 4 &amp; 4 \\ 
1 &amp; 1 &amp; 2 &amp; 2 \\ 
4 &amp; 5 &amp; 5 &amp; 6 \\ 
2 &amp; 4 &amp; 4 &amp; 4 
\end{bmatrix}}_{A}.
$$
Following one elimination step as before, we arrive at


$$
A =
\begin{bmatrix} 
4 &amp; 4 &amp; 4 &amp; 4 \\ 
\vphantom{\frac{1}{1}} 1 &amp; 1 &amp; 2 &amp; 2 \\ 
4 &amp; 5 &amp; 5 &amp; 6 \\ 
\vphantom{\frac{1}{1}} 2 &amp; 4 &amp; 4 &amp; 4 
\end{bmatrix}
=
\begin{bmatrix}
1 &amp; \\
\frac{1}{4} &amp; 1 &amp; \\
1 &amp; &amp; 1 &amp; \\
\frac{1}{2} &amp; &amp; &amp; 1
\end{bmatrix}
\begin{bmatrix}
\color{cblue} 4 &amp; \color{cblue} 4 &amp; \color{cblue} 4 &amp; \color{cblue} 4 \\
\vphantom{\frac{1}{1}} &amp; \color{corange} 0 &amp; \color{corange} 1 &amp; \color{corange} 1 \\
&amp; 1 &amp; 1 &amp; 2 \\
\vphantom{\frac{1}{1}} &amp; \color{cpurple} 2 &amp; \color{cpurple} 2 &amp; \color{cpurple} 2
\end{bmatrix}.
$$&lt;/p&gt;
&lt;p&gt;Since the (2, 2)-entry of the factor on the right is zero, it is impossible to introduce zeroes in the second column using this entry as a pivot. However, by interchanging the second row with a row below it whose entry in the second column is &lt;em&gt;nonzero&lt;/em&gt;, we can obtain a nonzero pivot to perform the elimination.&lt;sup id=&#34;fnref:1&#34;&gt;&lt;a href=&#34;#fn:1&#34; class=&#34;footnote-ref&#34; role=&#34;doc-noteref&#34;&gt;1&lt;/a&gt;&lt;/sup&gt; Also, note that had such a row not existed, it could only have been because all subdiagonal entries in the second column were zero, in which case we could have immediately continued to the next elimination step!&lt;/p&gt;
&lt;p&gt;For example, suppose we wish to use the (4, 2)-entry, 

$2$, as a pivot. We have&lt;/p&gt;


$$
\begin{cases}
\begin{bmatrix} 1 &amp; 1 &amp; 2 &amp; 2 \end{bmatrix} = \frac{1}{4} \, {\color{cblue} \begin{bmatrix} 4 &amp; 4 &amp; 4 &amp; 4 \end{bmatrix}} + {\color{corange} \begin{bmatrix} 0 &amp; 0 &amp; 1 &amp; 1 \end{bmatrix}} \\
\begin{bmatrix} 2 &amp; 4 &amp; 4 &amp; 4 \end{bmatrix} = \frac{1}{2} \, {\color{cblue} \begin{bmatrix} 4 &amp; 4 &amp; 4 &amp; 4 \end{bmatrix}} + {\color{cpurple} \begin{bmatrix} 0 &amp; 2 &amp; 2 &amp; 2 \end{bmatrix}}
\end{cases}\,,
$$
&lt;p&gt;so if 

$P_2$ is the permutation matrix that interchanges the second and fourth rows, then&lt;/p&gt;


$$
P_2 A
=
\begin{bmatrix} 
4 &amp; 4 &amp; 4 &amp; 4 \\ 
\vphantom{\frac{1}{1}} 2 &amp; 4 &amp; 4 &amp; 4 \\
4 &amp; 5 &amp; 5 &amp; 6 \\
\vphantom{\frac{1}{1}} 1 &amp; 1 &amp; 2 &amp; 2 \\ 
\end{bmatrix}
=
\begin{bmatrix}
1 &amp; \\
\frac{1}{2} &amp; 1 &amp; \\
1 &amp; &amp; 1 &amp; \\
\frac{1}{4} &amp; &amp; &amp; 1
\end{bmatrix}
\begin{bmatrix}
\color{cblue} 4 &amp; \color{cblue} 4 &amp; \color{cblue} 4 &amp; \color{cblue} 4 \\
\vphantom{\frac{1}{1}} &amp; \color{cpurple} 2 &amp; \color{cpurple} 2 &amp; \color{cpurple} 2 \\
&amp; 1 &amp; 1 &amp; 2 \\
\vphantom{\frac{1}{1}} &amp; \color{corange} 0 &amp; \color{corange} 1 &amp; \color{corange} 1 \\
\end{bmatrix},
$$
&lt;p&gt;from which elimination can proceed as in the LU factorization. Namely,&lt;/p&gt;


$$
P_2 A
=
\begin{bmatrix} 
4 &amp; 4 &amp; 4 &amp; 4 \\ 
\vphantom{\frac{1}{1}} 2 &amp; 4 &amp; 4 &amp; 4 \\
\vphantom{\frac{1}{1}} 4 &amp; 5 &amp; 5 &amp; 6 \\
\vphantom{\frac{1}{1}} 1 &amp; 1 &amp; 2 &amp; 2 \\ 
\end{bmatrix}
=
\begin{bmatrix}
1 &amp; \\
\frac{1}{2} &amp; 1 &amp; \\
1 &amp; \frac{1}{2} &amp; 1 &amp; \\
\frac{1}{4} &amp; 0 &amp; &amp; 1
\end{bmatrix}
\begin{bmatrix}
\color{cblue} 4 &amp; \color{cblue} 4 &amp; \color{cblue} 4 &amp; \color{cblue} 4 \\
\vphantom{\frac{1}{1}} &amp; \color{cpurple} 2 &amp; \color{cpurple} 2 &amp; \color{cpurple} 2 \\
\vphantom{\frac{1}{1}} &amp; &amp; \color{cgreen} 0 &amp; \color{cgreen} 1 \\
\vphantom{\frac{1}{1}} &amp; &amp; \color{cbrown} 1 &amp; \color{cbrown} 1 \\
\end{bmatrix}.
$$
&lt;p&gt;Once again, we see that a row interchange is required. We have&lt;/p&gt;


$$
\begin{cases}
\begin{bmatrix} 4 &amp; 5 &amp; 5 &amp; 6 \end{bmatrix} = 1 \, {\color{cblue} \begin{bmatrix} 4 &amp; 4 &amp; 4 &amp; 4 \end{bmatrix}} + \frac{1}{2} \, {\color{cpurple} \begin{bmatrix} 0 &amp; 2 &amp; 2 &amp; 2 \end{bmatrix}} + {\color{cgreen} \begin{bmatrix} 0 &amp; 0 &amp; 0 &amp; 1 \end{bmatrix}} \\
\begin{bmatrix} 1 &amp; 1 &amp; 2 &amp; 2 \end{bmatrix} = \frac{1}{4} \, {\color{cblue} \begin{bmatrix} 4 &amp; 4 &amp; 4 &amp; 4 \end{bmatrix}} + 0 \, {\color{cpurple} \begin{bmatrix} 0 &amp; 2 &amp; 2 &amp; 2 \end{bmatrix}} + {\color{cbrown} \begin{bmatrix} 0 &amp; 0 &amp; 1 &amp; 1 \end{bmatrix}} \\
\end{cases}\,,
$$
&lt;p&gt;so if 

$P_3$ is the permutation matrix that interchanges the third and fourth rows, then&lt;/p&gt;


$$
P_3 P_2 A
=
\begin{bmatrix} 
4 &amp; 4 &amp; 4 &amp; 4 \\ 
\vphantom{\frac{1}{1}} 2 &amp; 4 &amp; 4 &amp; 4 \\
\vphantom{\frac{1}{1}} 1 &amp; 1 &amp; 2 &amp; 2 \\ 
\vphantom{\frac{1}{1}} 4 &amp; 5 &amp; 5 &amp; 6 \\
\end{bmatrix}
=
\begin{bmatrix}
1 &amp; \\
\frac{1}{2} &amp; 1 &amp; \\
\frac{1}{4} &amp; 0 &amp; 1 &amp; \\
1 &amp; \frac{1}{2} &amp; &amp; 1
\end{bmatrix}
\begin{bmatrix}
\color{cblue} 4 &amp; \color{cblue} 4 &amp; \color{cblue} 4 &amp; \color{cblue} 4 \\
\vphantom{\frac{1}{1}} &amp; \color{cpurple} 2 &amp; \color{cpurple} 2 &amp; \color{cpurple} 2 \\
\vphantom{\frac{1}{1}} &amp; &amp; \color{cbrown} 1 &amp; \color{cbrown} 1 \\
\vphantom{\frac{1}{1}} &amp; &amp; \color{cgreen} 0 &amp; \color{cgreen} 1 \\
\end{bmatrix}.
$$
&lt;p&gt;The product of all the permutation matrices used for row interchanges becomes the permutation matrix 

$P$; if no interchange is performed in the 

$k$&lt;sup&gt;th&lt;/sup&gt; step, we can regard this as multiplication by 

$P_k = I$ at that step. For instance, after the final elimination step in our example (which is trivial since the (4, 3)-entry is already zero),


$$
\underbrace{P_3 P_2 P_1}_{P} A
=
\underbrace{\begin{bmatrix} 
4 &amp; 4 &amp; 4 &amp; 4 \\ 
\vphantom{\frac{1}{1}} 2 &amp; 4 &amp; 4 &amp; 4 \\
\vphantom{\frac{1}{1}} 1 &amp; 1 &amp; 2 &amp; 2 \\ 
\vphantom{\frac{1}{1}} 4 &amp; 5 &amp; 5 &amp; 6 \\
\end{bmatrix}}_{PA}
=
\underbrace{\begin{bmatrix}
1 &amp; \\
\frac{1}{2} &amp; 1 &amp; \\
\frac{1}{4} &amp; 0 &amp; 1 &amp; \\
1 &amp; \frac{1}{2} &amp; 0 &amp; 1
\end{bmatrix}}_{L}
\underbrace{\begin{bmatrix}
\color{cblue} 4 &amp; \color{cblue} 4 &amp; \color{cblue} 4 &amp; \color{cblue} 4 \\
\vphantom{\frac{1}{1}} &amp; \color{cpurple} 2 &amp; \color{cpurple} 2 &amp; \color{cpurple} 2 \\
\vphantom{\frac{1}{1}} &amp; &amp; \color{cbrown} 1 &amp; \color{cbrown} 1 \\
\vphantom{\frac{1}{1}} &amp; &amp; &amp; \color{cpink} 1 \\
\end{bmatrix}}_{U}.
$$&lt;/p&gt;
&lt;p&gt;In general, given a matrix 

$A \in \F^{n \times n}$, either there exists a permutation matrix 

$P_1 \in \F^{n \times n}$ such that 

$P_1 A$ is of the form


$$
P_1 A = \begin{bmatrix} \alpha &amp; b^\trans \\ c &amp; D \end{bmatrix}
$$
for some &lt;em&gt;nonzero&lt;/em&gt; 

$\alpha \in \F$, or the first column of 

$A$ is zero, in which case 

$P_1 A$ is of the form


$$
P_1 A = \begin{bmatrix} \alpha &amp; b^\trans \\ 0 &amp; D \end{bmatrix}
$$
for any permutation matrix 

$P_1 \in \F^{n \times n}$​. Let 

$\hat{c} = \frac{c}{\alpha}$ in the former case and 

$\hat{c} = 0$ in the latter. Then


$$
P_1 A = \begin{bmatrix} 1 &amp; \\ \hat{c} &amp; I \end{bmatrix} \begin{bmatrix} \alpha &amp; b^\trans \\  &amp; A&#39; \end{bmatrix},
$$
where 

$A’ = D - \hat{c} b^\trans$, and if 

$P&#39; A&#39; = L’ U’$ is a PLU factorization of 

$A’$, then


$$
\underbrace{\begin{bmatrix} 1 &amp; \\ &amp; P&#39; \end{bmatrix} P_1}_{P} A = \underbrace{\begin{bmatrix} 1 &amp; \\ P&#39; \hat{c} &amp; L&#39; \end{bmatrix}}_{L} \underbrace{\begin{bmatrix} \alpha &amp; b^\trans \\  &amp; U&#39; \end{bmatrix}}_{U}
$$
is a PLU factorization of 

$A$​.&lt;/p&gt;
&lt;h3 id=&#34;solving-linear-systems-1&#34;&gt;Solving linear systems&lt;/h3&gt;
&lt;p&gt;By the same reasoning as above, row-reducing 

$b$ in the manner that 

$A$ was reduced results in a vector 

$y$ satisfying 

$Pb = Ly$. Therefore the solutions of 

$Ax = b$ will be those of 

$Ux = y$. Once a PLU factorization of 

$A$ has been computed, it is possible to solve 

$Ax = b$ for any given 

$b \in \F^n$ by solving 

$Ly = Pb$ for 

$y$ and then 

$Ux = y$ for 

$x$, reusing the computed factors 

$L$ and 

$U$ and the permutation represented by 

$P$.&lt;/p&gt;
&lt;div class=&#34;footnotes&#34; role=&#34;doc-endnotes&#34;&gt;
&lt;hr&gt;
&lt;ol&gt;
&lt;li id=&#34;fn:1&#34;&gt;
&lt;p&gt;In practice, implementations of PLU factorization typically perform a row interchange that maximizes the absolute value of the pivot, regardless of whether it is needed to prevent division by zero. With this convention, all multipliers are at most 

$1$ in absolute value.&amp;#160;&lt;a href=&#34;#fnref:1&#34; class=&#34;footnote-backref&#34; role=&#34;doc-backlink&#34;&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
</description>
    </item>
    
    <item>
      <title>Symmetric factorizations</title>
      <link>https://www.math.ucla.edu/~njhu/notes/nla/lin-direct/symfact/</link>
      <pubDate>Tue, 17 Jun 2025 00:00:00 +0000</pubDate>
      <guid>https://www.math.ucla.edu/~njhu/notes/nla/lin-direct/symfact/</guid>
      <description>&lt;div class=&#34;btn-links mb-3&#34;&gt;
&lt;a class=&#34;btn btn-outline-primary btn-page-header btn-sm&#34; href=&#34;../symfact.pdf&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;
  PDF
&lt;/a&gt;
&lt;/div&gt;
&lt;!--
No newlines allowed between $$&#39;s below!
--&gt;
&lt;div style=&#34;display: none;&#34;&gt;
$$
%% Sets and functions %%
\newcommand{\set}[1]{\{ #1 \}}
\newcommand{\Set}[1]{\left \{ #1 \right\}}
\renewcommand{\emptyset}{\varnothing}
\newcommand{\N}{\mathbb{N}}
\newcommand{\Z}{\mathbb{Z}}
\newcommand{\R}{\mathbb{R}}
\newcommand{\Rn}{\mathbb{R}^n}
\newcommand{\Rm}{\mathbb{R}^m}
\newcommand{\C}{\mathbb{C}}
\newcommand{\F}{\mathbb{F}}
%% Linear algebra %%
\newcommand{\abs}[1]{\lvert #1 \rvert}
\newcommand{\Abs}[1]{\left\lvert #1 \right\rvert}
\newcommand{\inner}[2]{\langle #1, #2 \rangle}
\newcommand{\Inner}[2]{\left\langle #1, #2 \right\rangle}
\newcommand{\norm}[1]{\lVert #1 \rVert}
\newcommand{\Norm}[1]{\left\lVert #1 \right\rVert}
\newcommand{\tp}{{\top}}
\newcommand{\trans}{{\top}}
\newcommand{\span}{\operatorname{span}}
\newcommand{\im}{\operatorname{im}}
\newcommand{\ker}{\operatorname{ker}}
\newcommand{\rank}{\operatorname{rank}}
\newcommand{\proj}{\operatorname{proj}}
\newcommand{\proj}[1]{\mathop{\mathrm{proj}_{#1}}}
\newcommand{\refl}{\operatorname{refl}}
\newcommand{\refl}[1]{\mathop{\mathrm{refl}_{#1}}}
\newcommand{\K}{\mathcal{K}}
\newcommand{\L}{\mathcal{L}}
\renewcommand{\epsilon}{\varepsilon}
\newcommand{\conj}{\overline}
\newcommand{\sign}{\operatorname{sign}}
%% Colours %%
\definecolor{cblue}{RGB}{31, 119, 180}
\definecolor{corange}{RGB}{255, 127, 14}
\definecolor{cgreen}{RGB}{44, 160, 44}
\definecolor{cred}{RGB}{214, 39, 40}
\definecolor{cpurple}{RGB}{148, 103, 189}
\definecolor{cbrown}{RGB}{140, 86, 75}
\definecolor{cpink}{RGB}{227, 119, 194}
\definecolor{cgrey}{RGB}{127, 127, 127}
\definecolor{cyellow}{RGB}{188, 189, 34}
\definecolor{cteal}{RGB}{23, 190, 207}
$$
&lt;/div&gt;
&lt;!-- BODY --&gt;
&lt;h2 id=&#34;the-ldl-factorization&#34;&gt;The LDL* factorization&lt;/h2&gt;
&lt;p&gt;Let 

$A \in \C^{n \times n}$ and suppose that its first 

$n-1$ leading principal minors are nonzero. Then 

$A$ has a &lt;em&gt;unique&lt;/em&gt; LU factorization 

$A = LU$, and moreover 

$u_{11}, \dots, u_{n-1,\,n-1}$ are nonzero (being the pivots in the LU factorization). As a result, 

$A$ has a &lt;em&gt;unique&lt;/em&gt; &lt;strong&gt;LDU factorization&lt;/strong&gt; 

$A = LD\hat{U}$, where 

$L \in \C^{n \times n}$ is &lt;em&gt;unit&lt;/em&gt; lower triangular, 

$D \in \C^{n \times n}$ is diagonal, and 

$\hat{U} \in \C^{n \times n}$ is &lt;em&gt;unit&lt;/em&gt; upper triangular; given by the unique factorization of 

$U$ as 

$U = D \hat{U}$. When 

$A$ is also &lt;em&gt;self-adjoint&lt;/em&gt;, we must have 

$\hat{U} = L^*$, in which case this factorization is called the &lt;strong&gt;LDL* factorization&lt;/strong&gt; (or &lt;strong&gt;LDL&lt;sup&gt;T&lt;/sup&gt; factorization&lt;/strong&gt; if 

$A$ is real).&lt;/p&gt;
&lt;p&gt;Given a self-adjoint 

$A \in \C^{n \times n}$, we can also derive the LDL* factorization directly: if


$$
A =
\begin{bmatrix}
\alpha &amp; c^* \\
c &amp; B
\end{bmatrix}
$$
for some 

$\alpha \in \C$ (in fact, 

$\alpha \in \R$ since 

$A$ is self-adjoint), 

$c \in \C^{n-1}$, and 

$B \in \C^{(n-1) \times (n-1)}$, then


$$
A =
\begin{bmatrix}
1 &amp; \vphantom{\frac{c^*}{\alpha}} \\
\frac{c}{\alpha} &amp; I
\end{bmatrix}
\begin{bmatrix}
\alpha &amp; \vphantom{\frac{c^*}{\alpha}} \\
\vphantom{\frac{c}{\alpha}} &amp; B - \frac{cc^*}{\alpha}
\end{bmatrix}
\begin{bmatrix}
1 &amp; \frac{c^*}{\alpha} \\
\vphantom{\frac{c}{\alpha}} &amp; I
\end{bmatrix},
$$
and if 

$L’ D’ (L’)^*$ is the LDL* factorization of the Schur complement 

$A’ = B - \frac{cc^*}{\alpha}$, then


$$
A =
\underbrace{\begin{bmatrix}
1 &amp; \vphantom{\frac{c^*}{\alpha}} \\
\frac{c}{\alpha} &amp; L&#39;
\end{bmatrix}}_L
\underbrace{\begin{bmatrix}
\alpha &amp; \vphantom{\frac{c^*}{\alpha}} \\
\vphantom{\frac{c}{\alpha}} &amp; D&#39;
\end{bmatrix}}_D
\underbrace{\begin{bmatrix}
1 &amp; \frac{c^*}{\alpha}  \\
\vphantom{\frac{c}{\alpha}} &amp; (L&#39;)^*
\end{bmatrix}}_{L^*}
$$
is the LDL* factorization of 

$A$.&lt;/p&gt;
&lt;h3 id=&#34;diagonal-pivoting-methods&#34;&gt;Diagonal pivoting methods&lt;/h3&gt;
&lt;p&gt;Let 

$A \in \C^{n \times n}$ be self-adjoint. Just as an LU factorization may fail to exist because of a zero pivot, an LDL* factorization may fail to exist as well. To obtain a nonzero pivot while preserving the symmetry of 

$A$, we can interchange two rows of 

$A$ along with the corresponding columns (illustrated below), which amounts to replacing 

$A$ with 

$P_1 A P_1^*$ for some permutation matrix 

$P_1$.


$$
\begin{bmatrix}
  &amp; 1 &amp;  \\
1 &amp;   &amp;  \\
  &amp;   &amp; 1
\end{bmatrix}
\begin{bmatrix}
0 &amp; a_{12} &amp; a_{13} \\
a_{21} &amp; {\color{cblue} a_{22}} &amp; a_{23} \\
a_{31} &amp; a_{32} &amp; a_{33}
\end{bmatrix}
\begin{bmatrix}
  &amp; 1 &amp;  \\
1 &amp;   &amp;  \\
  &amp;   &amp; 1
\end{bmatrix}
=
\begin{bmatrix}
{\color{cblue} a_{22}} &amp; a_{21} &amp; a_{23} \\
a_{12} &amp; 0 &amp; a_{13} \\
a_{32} &amp; a_{31} &amp; a_{33}
\end{bmatrix}
$$
However, using a symmetric interchange as such, pivots can only be selected from the diagonal entries of 

$A$, which could all be zero despite the matrix itself being nonzero. To remedy this, we can use a permutation to move a nonzero off-diagonal entry at position 

$(i, j)$ to position 

$(2, 1)$ (illustrated below), which allows us to then perform a 

$2 \times 2$ block elimination step.


$$
\begin{bmatrix}
  &amp; 1 &amp;   \\
  &amp;   &amp; 1 \\
1 &amp;   &amp; 
\end{bmatrix}
\begin{bmatrix}
0 &amp; a_{12} &amp; a_{13} \\
a_{21} &amp; 0 &amp; a_{23} \\
a_{31} &amp; {\color{cblue} a_{32}} &amp; 0
\end{bmatrix}
\begin{bmatrix}
  &amp;   &amp; 1 \\
1 &amp;   &amp;   \\
  &amp; 1 &amp; 
\end{bmatrix}
=
\begin{bmatrix}
0 &amp; a_{23} &amp; a_{21} \\
{\color{cblue} a_{32}} &amp; 0 &amp; a_{31} \\
a_{12} &amp; a_{13} &amp; 0
\end{bmatrix}
$$
In general, if 

$A$ is nonzero, there exists a permutation matrix 

$P_1$ such that


$$
P_1 A P_1^* =
\begin{bmatrix}
E &amp; C^* \\
C &amp; B
\end{bmatrix},
$$
where the pivot 

$E \in \C^{s \times s}$ is invertible and 

$s \in \set{1, 2}$, 

$C \in \C^{(n-s) \times s}$, and 

$B \in \C^{(n-s) \times (n-s)}$. We then have


$$
P_1 A P_1^* =
\begin{bmatrix}
I &amp; \\
CE^{-1} &amp; I
\end{bmatrix}
\begin{bmatrix}
E &amp;  \\
 &amp; B - CE^{-1}C^*
\end{bmatrix}
\begin{bmatrix}
I &amp; E^{-1} C^* \\
  &amp; I
\end{bmatrix}.
$$
Continuing symmetric elimination with the Schur complement 

$A’ = B - CE^{-1}C^*$, we ultimately produce a factorization of the form 

$PAP^* = LDL^*$, where 

$P$ is a permutation matrix, 

$L$ is unit lower triangular, and 

$D$ is self-adjoint quasi-diagonal (block diagonal with 

$1 \times 1$ or 

$2 \times 2$ blocks).&lt;/p&gt;
&lt;h4 id=&#34;the-bunchparlett-factorization&#34;&gt;The Bunch–Parlett factorization&lt;/h4&gt;
&lt;p&gt;Let 

$\mu_0 := \max_{i,j} \, \abs{a_{ij}} = \norm{A}_{1,\infty}$ and 

$\mu_1 := \max_{i} \, \abs{a_{ii}}$. The &lt;strong&gt;Bunch–Parlett factorization&lt;/strong&gt; is a diagonal pivoting method that uses a 

$1 \times 1$ pivot with 

$\abs{e_{11}} = \mu_1$ whenever 

$\mu_1 \geq \alpha \mu_0$ and a 

$2 \times 2$ pivot with 

$\abs{e_{21}} = \mu_0$ otherwise, where 

$\alpha \in (0, 1)$ is a constant chosen to minimize an upper bound for 

$\mu_0&#39; := \max_{i,j} \, \abs{a_{ij}&#39;} = \norm{A&#39;}_{1, \infty}$.&lt;/p&gt;
&lt;p&gt;Namely, for a 

$1 \times 1$ pivot, we have


$$
\begin{align*}
\mu_0&#39; 
&amp;\leq \norm{B}_{1,\infty} + \norm{C}_{1,\infty} \norm{E^{-1}}_{\infty,1} \norm{C^*}_{1,\infty} \\
&amp;\leq \mu_0 + \mu_0 \cdot \frac{1}{\mu_1} \cdot \mu_0 \\
&amp;\leq \left(1 + \frac{1}{\alpha}\right) \mu_0,
\end{align*}
$$
and for a 

$2 \times 2$ pivot, we have


$$
\begin{align*}
\mu_0&#39; 
&amp;\leq \norm{B}_{1,\infty} + \norm{C}_{1,\infty} \norm{E^{-1}}_{\infty,1} \norm{C^*}_{1,\infty} \\
&amp;\leq \mu_0 + \mu_0 \cdot \frac{2(\mu_0 + \mu_1)}{\abs{\det(E)}} \cdot \mu_0 \\
&amp;\leq \mu_0 + \mu_0 \cdot \frac{2(\mu_0 + \mu_1)}{\mu_0^2 - \mu_1^2} \cdot \mu_0 \\
&amp;&lt; \left(1 + \frac{2}{1-\alpha} \right) \mu_0.
\end{align*}
$$
To choose 

$\alpha$, we equate the growth factor 

$(1 + \frac{1}{\alpha})^2$ for two 

$1 \times 1$ pivots to the growth factor 

$1 + \frac{2}{1-\alpha}$ for one 

$2 \times 2$ pivot, which yields 

$\alpha = \frac{1 + \sqrt{17}}{8} \approx 0.640$.&lt;/p&gt;
&lt;h2 id=&#34;the-cholesky-factorization&#34;&gt;The Cholesky factorization&lt;/h2&gt;
&lt;p&gt;Let 

$A \in \C^{n \times n}$ be (self-adjoint) &lt;em&gt;positive definite&lt;/em&gt;. Then 

$A$ has a &lt;em&gt;unique&lt;/em&gt; LDL* factorization 

$A = LDL^*$ since its principal submatrices are also positive definite, and moreover 

$D = (L^{-1}) A (L^{-1})^*$ is positive definite. As a result, 

$A$ has a &lt;em&gt;unique&lt;/em&gt; &lt;strong&gt;Cholesky factorization&lt;/strong&gt; 

$A = \tilde{L} \tilde{L}^*$, where 

$\tilde{L} \in \C^{n \times n}$ is lower triangular with &lt;em&gt;positive&lt;/em&gt; diagonal entries, given by 

$\tilde{L} = L \sqrt{D}$.&lt;/p&gt;
&lt;p&gt;Given a positive definite 

$A \in \C^{n \times n}$, we can also derive the Cholesky factorization directly: if


$$
A =
\begin{bmatrix}
\alpha &amp; c^* \\
c &amp; B
\end{bmatrix}
$$
for some 

$\alpha \in \C$ (in fact, 

$\alpha \in \R_{&gt; 0}$ since 

$A$ is positive definite), 

$c \in \C^{n-1}$, and 

$B \in \C^{(n-1) \times (n-1)}$, then


$$
A =
\begin{bmatrix}
\sqrt{\alpha} &amp; \vphantom{\frac{c^*}{\sqrt{\alpha}}} \\
\frac{c}{\sqrt{\alpha}} &amp; I
\end{bmatrix}
\begin{bmatrix}
1 &amp; \vphantom{\frac{c^*}{\sqrt{\alpha}}} \\
\vphantom{\frac{c}{\sqrt{\alpha}}} &amp; B - \frac{cc^*}{\alpha}
\end{bmatrix}
\begin{bmatrix}
\sqrt{\alpha} &amp; \frac{c^*}{\sqrt{\alpha}}  \\
\vphantom{\frac{c}{\sqrt{\alpha}}} &amp; I
\end{bmatrix},
$$
and if 

$\tilde{L}&#39; (\tilde{L}&#39;)^*$ is the Cholesky factorization of the Schur complement 

$A’ = B - \frac{cc^*}{\alpha}$, then


$$
A =
\underbrace{\begin{bmatrix}
\sqrt{\alpha} &amp; \vphantom{\frac{c^*}{\sqrt{\alpha}}} \\
\frac{c}{\sqrt{\alpha}} &amp; \tilde{L}&#39;
\end{bmatrix}}_{\tilde{L}}
\underbrace{\begin{bmatrix}
\sqrt{\alpha} &amp; \frac{c^*}{\sqrt{\alpha}}  \\
\vphantom{\frac{c}{\sqrt{\alpha}}} &amp; (\tilde{L}&#39;)^*
\end{bmatrix}}_{\tilde{L}^*}
$$
is the Cholesky factorization of 

$A$.&lt;/p&gt;
</description>
    </item>
    
  </channel>
</rss>
