TITLE: Condition number of a product of two matrices
QUESTION [6 upvotes]: Given two square matrices $A$ and $B$, is the following inequality
$$\operatorname{cond}(AB) \leq \operatorname{cond}(A)\operatorname{cond}(B),$$ where $\operatorname {cond}$ is the condition number, true?
Is this still true for rectangular matrices?
I know this is true:

$$||AB|| \leq ||A|| \cdot ||B||$$

The definition of condition number of matrix is as follows:

$$\operatorname{cond}(A)=||A|| \cdot ||A^{-1}||$$

REPLY [7 votes]: I'd like to clarify this slightly: the reasoning in user103402's answer isn't quite clear in the case where the matrices are not square, and it can make you think that something false is true as shown in loup blanc's answer.$
\newcommand{\sig}{\operatorname{\sigma}}
\newcommand{\R}{\mathbb R}
\newcommand{\norm}[1]{\lVert #1 \rVert}
$
Let $A \in \R^{m \times n}, B \in \R^{n \times p}$.
Then the question becomes
$$
\operatorname{cond}(AB) = \frac{\sig_1(A B)}{\sig_{\min(m,p)}(A B)}
\stackrel{?}{\le} \frac{\sig_1(A)}{\sig_{\min(m,n)}(A)} \frac{\sig_1(B)}{\sig_{\min(n,p)}(B)} = \operatorname{cond}(A) \operatorname{cond}(B)
.$$
$\sig_1(AB) \le \sig_1(A) \sig_1(B)$ always holds; the question is whether
$$
\sig_{\min(m,p)}(AB) \stackrel{?}{\ge} \sig_{\min(m,n)}(A) \sig_{\min(n,p)}(B)
.$$
If we assume that $m \ge n \ge p$, it holds. We can see this because:

If $B$ has a nontrivial null space, $\sigma_p(B) = 0$ and the inequality holds trivially. So assume it doesn't.
In general note that, if $C \in \mathbb R^{q \times r}$ with $q \ge r$, then
$$
\sig_r(C)
= \sqrt{\lambda_{\min}(C^T C)}
= \sqrt{\inf_{x \in \R^r_*} \frac{x^T C^T C x}{x^T x}}
= \inf_{x \in \R^r_*} \frac{\norm{C x}}{\norm x}
$$
where $\R^r_* = \R^r \setminus \{0\}$.
Then we can do, because $B x \ne 0$ for $x \ne 0$,
\begin{align*}
         \sig_p(A B)
    &  = \inf_{x \in \R^p_*} \frac{\norm{A B x}}{\norm x}
  \\&  = \inf_{x \in \R^p_*} \frac{\norm{A B x} \norm{B x}}{\norm{B x} \norm{x}}
  \\&\ge \left( \inf_{x \in \R^p_*} \frac{\norm{A B x}}{\norm{B x}} \right)
         \left( \inf_{x \in \R^p_*} \frac{\norm{B x}}{\norm{x}} \right)
  \\&\ge \left( \inf_{y \in \R^n_*} \frac{\norm{A y}}{\norm{y}} \right)
         \left( \inf_{x \in \R^p_*} \frac{\norm{B x}}{\norm{x}} \right)
  \\&  = \sig_n(A) \sig_p(B)
  .\end{align*}

It holds for $m \le n \le p$ as well by just transposing everything.
But
$$
A = \begin{bmatrix}1 & 0\end{bmatrix}
\qquad
B = \begin{bmatrix}0 \\ 1\end{bmatrix}
\qquad
A B = \begin{bmatrix}0\end{bmatrix}
\qquad
A^T B^T = \begin{bmatrix}0 & 1 \\ 0 & 0\end{bmatrix}
$$
gives us a counterexample for both $m \le n \ge p$ and $m \ge n \le p$.