randRangeExclude( -8, 8, [ -1, 0, 1, 2 ] ) randRangeExclude( -8, 8, [ -1, 0, 1, 2 ] ) REAL * REAL + IMAG * IMAG complexNumber( REAL, IMAG )

Determine the absolute value of the following complex number:

REPRESENTATION

ABS_SQUARE

The absolute value of any number is its distance from zero. As complex numbers can be visualized as points on the complex plane, absolute values of complex numbers can be determined using the distance formula.

graphInit({ range: [[-10, 10], [-10, 10]], scale: 20, tickStep: 1, labelStep: 1, }); label( [10, 0.5], "Re", "left" ); label( [0.5, 9], "Im", "right" ); circle( [REAL, IMAG], 3 / 20, { fill: KhanUtil.BLUE, stroke: "none" }); label( [REAL, IMAG], REPRESENTATION, "left", { color: KhanUtil.BLUE, labelDistance: 10 } );

REPRESENTATION is plotted as a blue circle above.

path([ [0,0], [REAL, IMAG]], { stroke: KhanUtil.ORANGE });

The absolute value we need is the length of the orange line segment.

path([ [0,0], [REAL, 0], [REAL, IMAG]], { stroke: KhanUtil.BLUE });

The orange line segment is the hypotenuse of a right triangle. Its two legs (shown in blue) have lengths abs( REAL ) and abs( IMAG ), which corresponds to the absolute values of the real and imaginary parts of the complex number REPRESENTATION.

Substituting into the Pythagorean theorem:
\qquad |REPRESENTATION|^2 = abs( REAL )^2 + abs( IMAG )^2, so
\qquad |REPRESENTATION| = \sqrt{abs( REAL )^2 + abs( IMAG )^2}.

\qquad \sqrt{abs(REAL)^2 + abs(IMAG)^2} = \sqrt{REAL * REAL + IMAG * IMAG} = \sqrt{ABS_SQUARE}

Simplifying the radical gives formattedSquareRootOf( ABS_SQUARE ). That is the absolute value of REPRESENTATION.

The radical cannot be simplified. The absolute value of REPRESENTATION is \sqrt{ABS_SQUARE}.