On the equality of the rank-sum inequality $\def \R{\mathbb{R}}$$\def \N{\mathbb{N}}$
$\def \rank{\mbox{rank}}$ $\def \range{\mbox{range}}$
Let $m, n \in \N$. Define $M_{m, n}(\R)$ as a set of all $m \times n$ matrices. For $A, B \in M_{m, n}(\R)$ we have the following rank-sum inequality;
$$ \rank(A + B) \leq \rank(A) + \rank(B). $$
This follows from the observation that $\range(A+B) \subset \range(A) + \range(B)$. Here $\range(M) := \{ Mv : v \in \R^n \}$ and $\rank(M) := \dim(\range(M))$ for $M \in M_{m, n}(\R)$. 
The quesition is about when the equality holds in the above rank-sum inequality. According to Matrix Analysis by Roger A. Horn and Charles R.Johnson, the equality holds if and only if $\range(A) \cap \range(B) = \{0\}$ and $\range(A^{T}) \cap \range(B^{T}) = \{0\}$. Here $A^T$ denotes the transpose of $A$. I understand the "only if" part. Indeed suppse that the equlaity holds. Let $Av_1, \ldots , A v_k$ be a basis of $\range(A)$ and $Bw_1, \ldots, Bw_l$ be a basis of $\range(B)$. Then $k = \rank{A}$, $l = \rank{B}$ and the set $\{Av_1, \ldots, Av_k, Bw_1, \ldots, Bw_l\}$ spans $\range(A+B)$. Since we are assuming that $\rank(A+B) = \rank(A) + \rank(B) = k + l$, the set$\{Av_1, \ldots, Av_k, Bw_1, \ldots, Bw_l\}$ is independent. Therefore $\range(A) \cap \range(B) = \{0 \}$. Noting that $\rank(A) = \rank(A^T)$ and etc, we have $\rank(A^T + B^T) = \rank(A^T) + \rank(B^T)$ and thus $\range(A^T) \cap \range(B^T) = \{0\}$. 
However I don't know how to prove the "if" part. I tried to reduce to the case where $A$ is of the form $I_k \bigoplus \large0$ but that was not successful for me. Thank you for your help.
 A: Take a basis for the row space of $A$ and a basis for the row space of $B$. Putting them together produces a linearly independent set, because the row spaces intersect in $\{0\}$ only. Extend to a basis for $\mathbb R^m$. Multiplying an appropriate basis change matrix onto $A$ and $B$ from the right, you can achieve that $A$ and $B$ have their nonzero entries in different columns.
Now, given any $v$ in the column space of $A$ and $w$ in the column space of $B$, it is easy to find inputs $x,y$ such that $(A+B)x=Ax=v$ and $(A+B)y=By=w$. So the column space of $A+B$ is the direct sum of the two column spaces.
A: For the if part, we consider the singular value decomposition of $A, B$ as $A = U_1 \Lambda_1 V_1^\top, B = U_2 \Lambda_2 V_2^\top$ where $U_1$ is orthogonal $m \times r_1$, $\Lambda_1$ is diagonal $r_1 \times r_1$, $V_1$ is orthogonal $n \times r_1$, $U_2$ is orthogonal $m \times r_2$, $\Lambda_2$ is diagonal $r_2 \times r_2$, $V_2$ is orthogonal $n \times r_2$, for $r_1 = rank(A), r_2 = rank(B)$.
We notice that
$$
range(A) = range(U_1)
,\quad
range(A^\top) = range(V_1)
,
$$
$$
range(B) = range(U_2)
,\quad
range(B^\top) = range(V_2)
.
$$
The conditions $range(A) \cap range(B) = \{0\}$ and $range(A^\top) \cap range(B^\top) = \{0\}$ implies that $U_1, U_2$ are orthogonal and $V_1, V_2$ are orthogonal, so by extending them to $m \times m$ orthogonal matrix $U = (U_1, U_2, U_3)$ and $n \times n$ orthogonal matrix $V = (V_1, V_2, V_3)$, we can write
$$
A
=
(U_1, U_2, U_3) diag(\Lambda_1, 0, 0) (V_1, V_2, V_3)^\top
,\quad
B
=
(U_1, U_2, U_3) diag(0, \Lambda_2, 0) (V_1, V_2, V_3)^\top
.
$$
It's easy to see from here that $rank(A + B) = rank(A) + rank(B)$.
