Question: Given two matrices $A\_{m\times n}$ and $B\_{n\times p}$, what is the sufficient and necessary condition for $AB$ to have full rank?

I know $r(AB)=r(B)-\dim N(A) \cap R(B)$, so is it true the above iff $\dim N(A)\cap R(B)=0$? But seems incorrect if $m\lt p$. Please help.

Answer: 
Sometimes you need to know all antiderivatives of a function, rather than just one antiderivative. For example, suppose you're solving the differential equation
$$
y'=-4y
$$
and there's an initial condition $y(0)=5$. You get
$$
\frac{dy}{dx}=-4y
$$
$$
\frac{dy}{y} = -4\;dx
$$
$$
\int\frac{dy}{y} = \int -4\;dx
$$
$$
\log\_e y = -4x + C.
$$
Here you've added a constant. Then
$$
y = e^{-4x+C} =e^{-4x}e^C
$$
$$
5=y(0)= e^{-4\cdot0}e^C = e^C
$$
So
$$
y=5e^{-4x}.
$$

(And sometimes you need only one antiderivative, not all of them. For example, in integration by parts, you may have $dv=\cos x\;dx$, and conclude that $v=\sin x$.)
There are many great answers here, but I just wanted to chime in with my favorite example of how things can go awry if one forgets about the constant of integration.

Consider 
$$\int \sin(2x) dx.$$
We will find antiderivatives in two ways. First, a substitution $u=2x$ yields:
$$\int \frac{\sin(u)}{2}du = -\frac{\cos(u)}{2} = -\frac{\cos(2x)}{2}.$$
Second, we use the identity $\sin(2x)=2\sin(x)\cos(x)$ and a substitution $v=\sin(x)$:
$$\int \sin(2x)dx = \int 2\sin(x)\cos(x)dx = \int 2vdv =v^2 = \sin^2(x).$$
Thus, we have found two antiderivatives of $\sin(2x)$ that are completely different! Namely
$$F(x)=\sin^2(x) \quad \text{and} \quad G(x)=-\frac{\cos(2x)}{2}.$$
Notice that $F(x)=\sin^2(x)\neq -\cos(2x)/2=G(x)$. For instance, $F(0)=\sin^2(0) = 0$ but $G(0)=-\cos(2\cdot 0)/2=-1/2$. So, what happened?

We forgot about the constant of integration, that's what happened. The theory of integration tells us that all antiderivatives differ by a constant. So, if $F(x)$ is an antiderivative, then any other antiderivative $G(x)$ can be expressed as $G(x)=F(x)+C$ for some constant $C$. In particular, our antiderivatives above must differ by a constant. Indeed, the constant $C$ in this case is exactly $C=-\frac{1}{2}$:
$$F(x)+C = F(x) - \frac{1}{2} = \sin^2(x)-\frac{1}{2} = \frac{(1-\cos(2x))}{2}-\frac{1}{2} = -\frac{\cos(2x)}{2} = G(x),$$
where we have used the trigonometric identity $\sin^2(x) = (1-\cos(2x))/2.$