A complex structure on $V := \mathbb{R}^2$ is a linear transformation $J : V\rightarrow V$ satisfying $J^2 = -1$.
If $B(\cdot,\cdot)$ is an inner product on $V$, let $SO(V,B)$ be the subgroup of $GL(V)$ given by automorphisms $T$ satisfying $B(Tv,Tv) = B(v,v)$ for all $v\in V$.
If $V := \mathbb{R}^2$ is given the standard inner product given by the dot product "$\cdot$", then $SO(V,\cdot)$ is just the circle group, and there seems to be exactly two complex structures $J$ which preserve the dot product, corresponding to rotating by $\pm\pi/2$.
For an arbitrary inner product $V$ on $V$, how can we write down the complex structures on $V$ preserving $B$?
If we think of $B$ as a symmetric positive definite $2\times 2$ matrix, then this seems to amount to solving the equations $J^2 = -1, J^tBJ = B$. It's unclear what we can read off from this equation. For example, is it clear (or even true) that there are always exactly two solutions $J$?
Conversely, suppose we are given a complex structure $J$ on $V$. Can we classify the inner products $B$ which are preserved by $J$?
Again, we want to solve $J^tBJ = B$, this time for $B$. Certainly if $B$ is preserved by $J$, then so is $cB$ for any $c\in\mathbb{R}$. Is it clear that the solution set of $B$ satisfying $J^tBJ = B$ is always 1-dimensional?