Prove that if $\dim V= n$ and $S$ is a subspace (of dimension $n-1$), then if $v$ doesn't belong to $S$: $\langle v \rangle + S$ is a direct sum I was doing direct sum exercises and I found this problem:

Assume you have a $k$-vector space $V$ of dimension $n$ and $S$ subspace (of $V$) of dimension $n-1$.
I) Prove that if $v$ doesn't belong to $S$ then $V =  S \oplus \langle v \rangle .\quad$ (Direct Sum)
II) If there is another subspace $W$ of $V$ not included in $S$, then $V = S + W$.


First, I was thinking that I can use:
$$
\dim S + \dim \langle v \rangle = n-1+1 = n = \dim V, 
$$
so I can just prove that intersection between $S$ and $\langle v \rangle$ is equal to $0$.
The first option to prove that is to say that if there existed an element that belonged to the intersection, this element should be $v$, then $v$ would belong to the subspace $S$ (I can explain this formally), which is a contradiction. But I'm not sure if it's the right way to prove it.
On the other hand, to prove the second statement I though I could work with the fact that if there is an element $V$ that belongs to $V$ it can be written as a linear combination of elements of $S$ and $W$, (But I'm not sure if I'm in the right way and how should I continue it, I'd appreciate a hint)
 A: Let $\{v_1,…,v_{n-1}\}$ be basis of $S$. We claim $B=\{v_1,…,v_{n-1}, v\}$ is basis of $V$. It is suffice to $B$ is linearly independent, since $|B|=n$. Suppose $c_1v_1+…+c_{n-1}v_{n-1}+c_nv=0$. If $c_n\neq 0$, then $c_nv\notin S$. Which implies $c_1v_1+…+c_{n-1}v_{n-1}=-c_nv\notin S$. Thus we reach contradiction. So $c_n=0$. By linear independence of $\{v_1,…,v_{n-1}\}$, we have $c_i=0$, $\forall 1\leq i\leq n-1$. Hence $B$ is independent and basis of $V$. There are several equivalent definition of direct sum. Use the one you are comfortable with.
I don’t understand your solution, specifically “if there existed an element that belonged to the intersection”. After showing $S\cap \langle v \rangle=\{0\}$, you need to $S+ \langle v \rangle=V$. which is essentially above result (extending basis).
A: I am assuming $\langle v\rangle :=\text{span}(v)$.
It is easy to prove the theorem that the sum of two subspaces $U$ and $W$ is a direct sum if and only if $U\cap W=\{0\}$. To use this theorem, you just have to show that $S\cap \langle v\rangle=\{0\}$. And your reasoning in showing the intersection is $\{0\}$ is correct. What you haven’t shown(and I missed it too) in the first part is that $V=S \oplus \langle v\rangle$. We have already shown that $S\cap \langle v\rangle=\{0\}$. Using the formula $$\dim(U+W)=\dim(U)+\dim(W)-\dim(U\cap W)$$ conclude that $\dim(S + \langle v \rangle)=n$ and thus $V=S \oplus \langle v\rangle$. I am leaving it to you to prove that $\dim \langle v \rangle = 1$.

For the second part, the hypothesis that $W$ is not contained in $S$ implies that there exists a non-zero vector $v$ such that $v\notin S$ and $v\in W$. Then show that $v_1,\dots, v_{n-1},v$ is a basis of $S+ W$. Where $v_1\dots, v_{n-1}$ is a basis of $S$. Since we have $n$ linearly independent vectors, we have that $V= S + W$
Hope this helps!
