Finding orthonormal bases with respect to an inner product. 
Hi i was wondering if anyone could help me with my linear algebra question as I am a bit stuck as we've only just touched on the idea of orthonormal bases.
So far my knowledge is that an orthonormal base includes vectors which have a size of 1.
So from this my thinking is that the only answer that is incorrect is a) as when you calculate the size of each factor of a you get $1, \sqrt{2}, \sqrt{3}$
and the size of each component of b), c) and d) all give 1.
as for example d. $((1/\sqrt{2}),(1/2),0)^T$
$=\sqrt{(1/\sqrt{2})^2+(1/2)^2*2+0}$ $=1$
So hence I was wondering if I was on the right track or whether I've missed something. Thanks in advance
 A: First of all you can check this simply by checking all the necessary inner products. A basis $\{\mathbf{u}_1, \mathbf{u}_2, \mathbf{u} \}$ for $\mathbb{R}^3$ is orthonormal with respect to the inner product $< \cdot, \cdot >$ if and only if
$$< \mathbf{u}_i, \mathbf{u}_j > = \begin{cases} 
1, & i=j \\
0, & i \neq j
\end{cases}.$$
However, there is a more compact way of formulating this for weighted dot products like this using matrices. We consider $\mathbb{R}^n$ equipped with the weighted dot product
$$< \mathbf{x}, \mathbf{y} > = w_1 x_1y_1 + \cdots + w_nx_n y_n,$$
for weights $w_1,..., w_n \neq 0$. Observe that the inner product can be written as
$$< \mathbf{x}, \mathbf{y} > = \mathbf{x}^T W \mathbf{y},$$
where $W = \text{diag}(w_1, ..., w_n).$
We can now reformulate our criterion for orthonormality: A basis $\{ \mathbf{u}_i \}_{i=1}^{n}$ is an orthonormal basis for $\mathbb{R}^n$ if and only if
$$\mathbf{u}_i^T W \mathbf{u}_j = \begin{cases} 
1, & i=j \\
0, & i \neq j
\end{cases}$$
Observe that if we define $U = [\mathbf{u}_1 \cdots \mathbf{u}_n]$, this can be written as
$$U^T W U = I_n,$$
which gives you a nice and compactly formulated criterion.
