Showing that the complete bipartite graph $K_{a,b}$ is a tree if and only if $a=1$ or $b=1$. Let $K_{a,b}$ be the complete bipartite graph. Show that
$K_{a,b}$ is a tree if and only if $a = 1$ or $b = 1$.
The way my professor showed us for a complete graph is as below. I just don't know how to start for a complete bipartite graph. 

$K_a$ is a tree if and only if $a=2$ or $a=1$.

Proof: For all $u\in V(K_a)$, $\deg(u) = a-1$ implies that $$2|E(K_a)| = \sum \deg(u) = (a-1)|V(K_a)|=a(a-1),$$ so $|E(K_a)|=\frac{a(a-1)}{2}.$
Since $K_a$ is connected, it is a tree if and only if \begin{eqnarray*} 0 &=&|E(K_a)| -|V(K_a)| +1 \\
&=& a(a-1)/2 -a +1 \\ 
&=& \frac{1}{2}(a(a-1)-2a+2)\\
&=& 1/2[a(a-1)-2(a-2)] \\
&=& 1/2[(a-1)(a-2)] =0 \end{eqnarray*}
Thus $K_a$ is a tree if and only if $a-1=0$ or $a-2=0,$ i.e., $a=1$ or $a=2$.

$K_{a,b}$ is a tree if and only if $a=1$ or $b=1$.

Proof: For all $u,v \in V(K_{a,b})$, $\deg(u) = a$ and $\deg(v) = b $ implies that $$2|E(K_{a,b})| = \sum \deg(u) + \sum \deg(v)= ab+ab=2ab,$$ so $|E(K_{a,b})|=ab.$
Since $K_{a,b}$ is connected, it is a tree if and only if \begin{eqnarray*} 0 &=&|E(K_{a,b})| -|V(K_{a,b})| +1 \\
&=& ab-a-b +1 \\ 
&=& (a-1)(b-1)=0\end{eqnarray*}
Thus $K_{a,b}$ is a tree if and only if $a-1=0$ or $b-1=0,$ i.e., $a=1$ or $b=1$.

Number of edges in a complete bipartite graph $K_{m,n}$ is $mn$.
Number of edges in a tree with $v$ vertices is $v-1$.
Hence, if we want $K_{a,b}$ to be a tree, we need
$$ab = a+b-1 \implies ab-a-b+1 = 0\implies (a-1)(b-1) = 0 \implies a = 1 \text{ or }b=1$$
