Let $\mathcal{B}$ be a basis for a finite-dimensional inner product space $V$
(a) Prove that if $\langle x,z\rangle = 0$ for all $z\in\mathcal{B}$, then $x = 0$.
(b) Prove that if $\langle x,z\rangle = \langle y,z\rangle$ for all $z\in\mathcal{B}$, then $x = y$.
My solution
(a) Let $\mathcal{B} = \{z_{1},z_{2},\ldots,z_{n}\}$ be a basis for $V$ where $n = \dim V$.
According to the given assumptions, if we set that $x = x_{1}z_{1} + x_{2}z_{2} + \ldots x_{n}z_{n}$, one concludes that
\begin{align*} \langle x,z_{j}\rangle = 0 \Longrightarrow \overline{\langle z_{j},x\rangle} = 0 & \Longrightarrow \overline{x_{j}\langle z_{j},x\rangle} = \overline{\langle x_{j}z_{j},x\rangle} = \langle x,x_{j}z_{j}\rangle = 0\\\\\ & \Longrightarrow \langle x,x_{1}z_{1} + x_{2}z_{2} + \ldots + x_{n}z_{n}\rangle = \langle x,x\rangle = 0 \end{align*}
That is to say, $x = 0$.
(b) It suffices to apply the linearity from the first input
\begin{align*} \langle x,z\rangle - \langle y,z\rangle = \langle x - y,z\rangle = 0\Longleftrightarrow x = y \end{align*}
Am I reasoning correctly? Is there another way to approach it?
The book hasn't presented the concept of the direct sum $V = U\oplus U^{\perp}$ at this point.