Prove that if $\langle x,z\rangle = 0$ for all $z,$ then $x=0.$ I just wanted to check if my reasoning in this proof was correct.
The question is as follows.

Let $\beta$ be a basis for a finite dimensional inner product space $V.$
a) Prove that if $\langle x,z \rangle = 0$ for all $z \in \beta,$ then $x=0.$

OK, I reasoned it this way: from the definition of inner products, we have that $\langle x,0 \rangle = \langle 0,x \rangle = 0.$ Further, since $z$ is a basis element and linearly independent, then $x_1z_1+x_2z_2+\dots+x_nz_n = 0$ only if either all the $z_i$s are zero or all the $x_i$s are zero. Therefore, $x=0$ since in the initial construction, we defined $z$ as a basis for $V,$ and it doesn't have to be zero.

b) Prove that if $\langle x, z \rangle = \langle y,z \rangle$ for all $z \in \beta,$ then $x=y.$

Again, we can go to the fact that $z$ is a basis and linearly independent. We have that $x_1z_1+x_2z_2+\dots+x_nz_n = y_1z_1+y_2z_2+\dots+y_nz_n,$ so if $z$ is linearly independent, then it can only be zero if all the $z$s are zero or all the $x$s and $y$s are zero. In which case, $x$ would be equal to $y$ if $z$ isn't zero.
For other cases, we just divide the left side of the equation by the $z$s on the right, and we get $x_1+x_2+\dots+x_n = y_1+y_2+\dots+y_n$
Is this correct? Did I miss something important? I know this is a simple exercise, but I want to be sure.
 A: If $\langle x, z \rangle = 0$ for all $z \in V$, then it is also true for $z := x$, so $\langle x, x \rangle = 0$. By the first defining property of the inner product from here ($\langle x, x \rangle \ge 0$, with $\langle x, x \rangle = 0$ if and only if $x = 0$), we conclude that $x = 0$.
What you're trying to prove is called a nondegeneracy property of a scalar (inner) product. For the more general scalar product spaces, we don't assume the above first property (for example, it may happen for such scalar product $[\cdot,\cdot]$ to have $[x,x] < 0$ for some $x$), so the nondegeneracy is explicitly assumed if needed. For details, see Gohberg, Lancaster, Rodman, "Indefinite Linear Algebra and Applications", 2005, page 8.
A: There are several problems with your proof. As indicated by vadim123's answer, you have assumed a dot product. But even if that were given, you've made some unclear assertions. For example, you say that if $x_1 z_1 + \ldots + x_n z_n = 0$ implies that either all the $z$'s or all the $x$'s are zero. However, the $z_i$ are components of a single basis vector $z$, rather than the elements of a basis.
It does not make sense to say $z$ is "linearly independent" because linearly independence is a property of a set of vectors.
A: Your proof assumes that the vector space is actually $\mathbb{R}^n$, and that the inner product is actually the dot product.  This is an invalid assumption.
For example, suppose that $V$ is the set of polynomials of degree at most $2$.  A basis is $\beta=\{1,t,t^2\}$.  We may define an inner product via:
$$\langle f,g\rangle=\int_0^1f(t)g(t)dt$$
Now, your dependent/independent calculation falls flat.  To solve this problem, you really need to work with inner products.  Because $\beta$ is a basis, we may express $x=\sum_{\beta_i\in \beta} a_i \beta_i$.  Then take $\langle x,x\rangle=\langle x,\sum_{\beta_i\in \beta} a_i\beta_i\rangle=\sum_{\beta_i\in \beta} \bar{a}_i\langle x,\beta_i\rangle,$ wherein complex conjugation follows from antilinearity of the second argument. This leads to the conclusion $x=0$. A similar calculation works for the second problem.
A: For the second problem, observe the equivalence with $0 = \langle x,z \rangle - \langle y,z \rangle.$ Now, we want the first argument of each inner product to be $z,$ so we can combine the inner products. Namely,
$$ \langle x,z \rangle - \langle y,z \rangle = \overline{\langle z,x \rangle} - \overline{\langle z,y \rangle} = \overline{\langle z,x \rangle - \langle z,y \rangle} = \overline{\langle z,x-y \rangle} = \langle x-y,z \rangle.$$
Since $\langle x-y,z \rangle = 0$ for every basis element $z \in \beta,$ it follows from vadim123's answer that $x-y$ is the zero vector. Hence, we conclude that $x=y.$
