A hilbert space H is defined such that every convergent limit is also in H.
Let $u, v$ be two complex numbers
By properties of the hilbert space, $u \cdot v \in H$
Let $u = a + bi$
Let $v = c + di$
If b, d equal 0, then we will use the euclidean distance.
We want to preserve euclidean distance for real numbers while still being able to provide a valid distance function for complex numbers
Ideally we would want the below equations to be true
$(u, v) = |u| |v| cos(\theta)$
$|u| = |i u| = \sqrt{(u, u)}$
$(u, av + w) = a(u, v) + (u, w)$
if $(u, u) = 1$
$(iu, iu) = 1$
$i(iu, u) = 1$
Therefore$ (iu, u) = -(u, iu)$
Using $(u, v) = (v, u)^*$ fixes this
$i^* = -i$
$i(iu, u) = i (u, iu)^* = -i^2 (u, u)^* = 1$
This condition also makes it so that $(u, u)$ is a real number since $(u, u) = (u, u)^*$
Let $u$ be in the span of the basis
$u = \sum_i c_i E_i$
$(E_j, u) = (E_j, \sum_i c_i E_i)$
Since inner product is linear in second term
$(E_j, u) = \sum_i (E_j, c_i E_i)$
$(E_j, u) = \sum_i c_i (E_j, E_i)$
Using Kronecker delta,
$\delta_{ij} = 1$ when $i = j$; 0 otherwise
$(E_j, u) = \sum_i c_i \delta_{ij}$
$(E_j, u) = c_j \delta_{jj} = c_j$
$(u, v) = (\sum_i c_i E_i, \sum_j d_j E_j)$
$= \sum_j d_j (\sum_i c_i E_i, E_j)$
$= \sum_j d_j (E_j, \sum_i c_i E_i)^*$
$= \sum_j \sum_i d_j c_i^* (E_j, E_i)^*$
$= \sum_j \sum_i d_j c_i^* (E_i, E_j)$
Using kronecker delta
$= \sum_j \sum_i d_j c_i^* \delta_{ij}$
$= \sum_i c_i^* d_i$
if c_i are real
$= \sum_i c_i d_i$