# The bases of two subspaces form the basis of their direct sum - is my proof correct?

This problem is from Linear Algebra Done Right 3rd Edition, exercises 2.B.7:

Suppose $$U$$ and $$W$$ are subspaces of $$V$$ such that $$V=U \oplus W$$. Suppose also that $$u_1,\ldots,u_m$$ is a basis of $$U$$ and $$w_1,\ldots,w_n$$ is a basis of $$W$$. Prove that $$u_1,\ldots,u_m,w_1,\ldots,w_n$$ is a basis of $$V$$.

Now I have seen the proof here, but I wonder if my own proof is correct:

Since $$V=U \oplus W$$, $$V=U+W$$ and $$U \cap W=\{0\}$$. The former implies that $$u_1,\ldots,u_m,w_1,\ldots,w_n$$ spans $$V$$.

For the latter, $$0 = a_1u_1 + \cdots + a_mu_m\\ 0 = b_1w_1 + \cdots + b_nw_n$$ Subtract both sides, $$0 = a_1u_1 + \cdots + a_mu_m - b_1w_1 - \cdots - b_nw_n$$ Since $$u_1,\ldots,u_m$$ and $$w_1,\ldots,w_n$$ are bases, $$a_1=\cdots=a_m=b_1=\cdots=b_n=0$$. Therefore, $$u_1,\ldots,u_m,w_1,\ldots,w_n$$ is linearly independent.

Above all, $$u_1,\ldots,u_m,w_1,\ldots,w_n$$ is a basis of $$V$$.

It looks good. However, suppose $$U \cap W$$ contains elements other than $$0$$, by substituting the left sides of the first set of equations with an arbitrary $$v \in U \cap W$$, I can still subtract both sides and derive the same results. I think there is something wrong with my proof, but what is it?

You tried to prove that $$0 = a_1u_1 + \cdots + a_mu_m$$ and $$0 = b_1w_1 + \cdots + b_nw_n$$ imply $$a_1 = \ldots = a_m = b_1 =\ldots= b_n = 0$$ but this is not sufficient. In fact, this claim is a direct consequence of $$\{u_1, \ldots, u_m\}$$ and $$\{w_1, \ldots, w_n\}$$ being linearly independent so you don't have to subtract anything.
What you should do (it is done in the proof you linked) is show that $$0 = a_1u_1 + \cdots + a_mu_m + b_1w_1 + \cdots + b_nw_n$$ implies $$a_1 = \ldots = a_m = b_1 =\ldots= b_n = 0$$.
In the case of $$U \cap V = \{0\}$$ we have that $$0 = a_1u_1 + \cdots + a_mu_m + b_1w_1 + \cdots + b_nw_n$$ indeed implies $$0 = a_1u_1 + \cdots + a_mu_m$$ and $$0 = b_1w_1 + \cdots + b_nw_n$$, which then implies $$a_1 = \ldots = a_m = b_1 =\ldots= b_n = 0$$. However, if $$U \cap V \ne \{0\}$$, we can have $$u = a_1u_1 + \cdots + a_mu_m$$ and $$-u = b_1w_1 + \cdots + b_nw_n$$ for some $$u \in U \cap V$$ which doesn't help you at all.