Search Ctrl K
Home / Tools
THE FEUTEX TOOLKIT

Complex Magnitude, Phase and Principal Root

Find magnitude, phase and the principal square root of a complex number.

Math workspace● Runs in your browser
01 Your input
02 Your result
View or copy raw result data
FormulaMagnitude = hypot(a,b); Phase = atan2(b,a); Root Real = sqrt((hypot(a,b)+a)/2); Root Imag = (b<0?-1:1)*sqrt((hypot(a,b)-a)/2)
Sources and model references

Worked example

Inputs

Real component
3 number
Imaginary component
4 number

Expected results

Magnitude
5 number
Phase
0.927295218 rad
Root Real
2 number
Root Imag
1 number

Load the example in the workspace to reproduce these results. Display rounding does not change the underlying calculation.

How to use this tool

  1. Enter the labeled inputs using consistent units.
  2. Check the stated assumptions and calculate.
  3. Review each output and compare another input scenario.

Try this example

{
  "a": 3,
  "b": 4
}

Accuracy and scope

Principal square root; branch cut lies on the negative real axis. Finite floating-point arithmetic; results can lose precision near singular or extreme inputs.

Is my data uploaded?

This tool runs locally in your browser. Input and output are not sent to a processing server. Copy or download your result before leaving the page.