# What is the theoretic difference in the ways to compute the spectrogram?

I have noticed that the spectrogram for a audio signal is often calculated in different ways when the result from the DFT is transformed into real numbers; some tend to compute $|k|$ or $|k|^2$ while others use the formula $Re(k)^2 + Im(k)^2\ \$ for each DFT bin $k$. What is the theoretic difference between these and what should be considered as the standard (if any)?

Firstly $$abs(z)^{2}=Re \left \{ z \right \}^{2}+Im \left \{z \right \}^{2}=z*z^{^{'}}$$