Times when you want $(\cdot)^2$ and not $|\cdot|^2$ when porting from $\mathbb{R}$ to $\mathbb{C}$

222 Views Asked by At

Over $\mathbb{R}$, the square, $(\cdot)^2$, and usual square-norm, $|\cdot|^2$, functions agree for all inputs and are occasionally used interchangeably. For instance, when computing the variance of some data $\{x_1,\cdots,x_n\}$, $n>1$, with mean $\mu$, I have only ever seen the formula given as $$ \sigma^2 = \frac{1}{n-1}\sum_{i=1}^{n}(x_i-\mu)^2; $$it should be $|x_i-\mu|^2$ so that even if the data are complex, the variance is real and non-negative.

However, I am interested in instances when $(\cdot)^2$ and not $|\cdot|^2$ is the correct generalization. A clear parallel in linear algebra is the adjugate matrix: given a square matrix $A$, its adjugate is the transpose of the cofactor matrix $C$, but not the conjugate-transpose, even when the entries of the matrix are complex. That is, we have $\text{adj}(A)=C^T$, not $\text{adj}(A)=C^*$. Off the top of my head, I can't think of any scenarios where this distinction is important, but I am curious if the community can name any.

1

There are 1 best solutions below

0
On

Posting an answer (CW) so the question has one; feel free to add more.

  • Anything not concerning an inner product, including polynomial and power-series. That is, they look like $z\mapsto \sum_k c_k z^k$, not $z\mapsto \sum_k c_k |z|^k$.
  • In particular, this affects convergence of series, as $z\to z^2$ will double the singularities at the boundary of the radius of convergence, but $z\to|z|^2$ will make the entire boundary divergent.
  • $\sin^2(x)+\cos^2(x)=1$ holds identically over $\mathbb{C}$ but $|\sin(x)|^2+|\cos(x)|^2=1$ doesn't.
  • Exponentiation by squaring works by, wanting to compute $x^n$ for integer $n$, using the base-$2$ representation of $n$ and using successive squaring and multiplication to compute integer powers. However, if $x$ is complex, clearly $x^2$ might have an imaginary part on squaring, whereas $|x|^2$ does not; thus, $(\cdot)^2$ and not $|\cdot|^2$ is the correct computation at each step.