# Equalities on a hermitian space

Let $\phi$ be a hermitian form on the hermitian space $V$ with orthonormal basis $B= \{e_1, \dots, e_n\}$. Let $T$ be an endomorphism such that for all $v \in V$, $$Tv = \sum_{i=1}^n\phi(v,e_i)e_i.$$ I want to show that $\phi(v,w) = \langle Tv \vert w \rangle$, where $\langle \cdot \vert \cdot \rangle$ is the hermitian product on $V$.

\begin{align*} \langle Tv \vert w \rangle &= \left\langle \sum_{i=1}^n \phi(v,e_i)e_i \middle\vert \sum_{j=1}^n w_j e_j \right\rangle \\ &= \sum_{i=1}^n \sum_{j=1}^n \overline{w_j} \phi(v,e_i) \langle e_i \vert e_j\rangle \\ &= \sum_{j=1}^n \overline{w_j} \phi (v,e_j) \\ &= \phi\left(v , \sum_{j=1}^n w_j e_j \right) \\ &= \phi(v,w) \end{align*}

I don't understand how: $\sum_{i=1}^n \sum_{j=1}^n \overline{w_j} \phi(v,e_i)\langle e_i\vert e_j \rangle = \sum_{j=1}^n \overline{w_j} \phi (v,e_j)$.

$\langle e_i \vert e_j \rangle = \begin{cases} 1 & \text{if } i=j \\ 0 &\text{if } i \neq j \end{cases}.$ Hence only the terms in the double sum $\sum_i \sum_j$ with identical indices $i=j$ are nonzero. We can index those terms by a single index (pick $j$) to get the RHS of the equation; note that, since $i=j$, we've replaced $\langle e_i \vert e_j \rangle$ with $1$.