Consider the complex vector space of complex polynomials of degree at most $2$, with standard inner product $$\langle p,q \rangle = \int_{0}^1 p(x)\overline{q(x)} dx.$$
How would you find a basis for the orthogonal complement of $J$ where $J=Span(ix^2)$?
EDIT: Using Gram-Schmidt
The polynomials $x \mapsto 1$, $x \mapsto x$, $x \mapsto ix^2$ form a basis for the space. Now apply Gram Schmidt, but start with the $x \mapsto ix^2$ vector.
Then the other two will be orthogonal to this and hence span the orthogonal complement. $f_0(x) = ix^2$
$g_0(x) = \sqrt{5}ix^2$ (after normalising).
$f_1(x) = 1 - \langle g_0, x \mapsto 1\rangle g_0(x) = 1-{5 \over3} x^2$,
$g_1(x)= {3 \over 2} - {5 \over 2} x^2$.
$f_2(x) = x - \langle g_0, x \mapsto x \rangle g_0(x) - \langle g_1, x \mapsto x \rangle g_1(x) = {1 \over 16} (-3+16x-15x^2)$,
$g_2(x) = {\sqrt{3} \over 2 } (-3+16x-15x^2)$.
It is easy (but tedious) to check that $g_0,g_1,g_2$ are orthonormal, hence $J^\bot = \operatorname{sp} \{ g_1,g_2 \}$.