Householder bidiagonalization (source code)

= Householder bidiagonalization
{c}
{title2=$B=PAQ,\quad P,Q\text{ orthogonal}$}

Alternating right and left <Householder transformations> reduce a real square matrix to a <bidiagonal matrix>. For a lower-bidiagonal result, first clear row $j$ beyond column $j$ using a right transformation on trailing columns. Then clear column $j$ below row $j+1$ using a left transformation on trailing rows. Previously completed rows and columns are preserved. Since $B^TB=Q^TA^TAQ$ is a symmetric <tridiagonal matrix>, its <eigenvalues> are the squares of the <singular values> of $A$. This explains the reduction structurally; explicitly forming $A^TA$ is unnecessary and can worsen numerical conditioning.