Skip to content

Complex Number Commands

J. Schneider edited this page Apr 8, 2025 · 7 revisions

Number Theory and Algebra

Source: Jeff O. (122519)
Source: HP 49g+ Advanced User's Reference Manual HP part number F2228-90010


Complex Number Commands

Complex to Real Rectangular Form conversion

Decomposition of a complex number into its real and imaginary components, with those values placed in the stack X and stack Y registers, respectively (C→R).

Example:

2 + 3𝒾 = 3.00, 2.00

LINE DATA OPERATIONS DISPLAY REMARKS
1 a+𝒾b +> ABS Mag
2 +> LASTx <+ ARG Ang
3 COS +> LASTx SIN
4 R↓ R↓ x<>y R↓ Bring z to X
5 × b Imaginary part
6 x<>y +> LASTx × a Real part

Source: HP 35s Working with complex numbers – part 2

; XEQ 2 ENTER
LBL Y
  ABS
  CLx
  eqn 'ABS(LASTx)*SIN(ARG(LASTx))'
  eqn 'ABS(LASTx)*COS(ARG(LASTx))'
RTN

Complex to Real Polar Form conversion

Decomposition of a complex number into the magnitude and angle of its polar form, with those values placed in the stack X and stack Y registers, respectively (C→P).

Example:

1 + 1𝒾 = 45.00, 1.41

LINE DATA OPERATIONS DISPLAY REMARKS
1 x +> ARG Ang Angle
2 +> LASTx <+ ABS Mag Magnitude
; XEQ 3 ENTER
LBL Z
  ARG
  LASTx
  ABS
RTN

Real Rectangular Form to Complex conversion

Formation of a complex number in stack x from real and imaginary components initially in the stack X and stack Y registers, respectively (R→C).

Example:

-2, -7 = -7.00 - 2.00𝒾

LINE DATA OPERATIONS DISPLAY REMARKS
1 b ENTER \im ×
2 a + u+𝒾v

Source: Barry More

; XEQ 4 ENTER
LBL U
  ABS		
  Rv
  Rv
  eqn 'LASTx+i*REGT'
  eqn 'REGZ'
  Rv
RTN

Real Polar Form to Complex conversion

Formation of a complex number in stack x from a magnitude and angle initially in the stack X and stack Y registers, respectively (P→C).

Example:

30, 2 = 1.73 + 1.00𝒾

Note: Enter θ in degrees

LINE DATA OPERATIONS DISPLAY REMARKS
1 MODE 1'DEG Degree mode
2 Ang <+ →RAD \im × +>
3
4 Mag × u+𝒾v

Source: Barry More

; XEQ 5 ENTER
LBL V
  ABS
  Rv
  Rv
  eqn 'LASTx*COS(REGT)+i*LASTx*SIN(REGT)'
  eqn 'REGZ'
  Rv
RTN

Real Rectangular to Real Polar conversion

Conversion of a rectangular representation of complex number in stack X (Real) and stack Y (imaginary) to a polar representation in stack X (magnitude) and stack Y (angle) (R→P).

Example:

3, 2 = 2.00 + 3.00𝒾 = 3.61 e56.31 = 56.31, 3.61

LINE DATA OPERATIONS DISPLAY REMARKS
1 b ENTER \im ×
2 a +
3 +> ARG Ang Angle
4 +> LASTx <+ ABS Mag Magnitude
; XEQ 6 ENTER
LBL W
  ABS
  CLx
  LASTx
  Rv
  Rv
  eqn 'REGZ+i*REGT'
  ENTER
  Rv
  Rv
  eqn 'ARG(REGT)'
  eqn 'ABS(REGT)'
RTN

Real Polar to Real Rectangular conversion

Conversion of a polar representation of complex number in stack X (magnitude) and stack Y (angle) to a rectangular representation in stack X (real) and stack Y (imaginary) (P→R).

Example:

30, 2 = 2.00 e30.00 = 1.73 + 1.00𝒾 = 1.00, 1.73

LINE DATA OPERATIONS DISPLAY REMARKS
1 Ang ENTER
2 Mag x<>y COS +> LASTx SIN
3 R↓ R↓ x<>y R↓ Bring z to X
4 × b Imaginary part
5 x<>y +> LASTx × a Real part
; XEQ 7 ENTER
LBL R
  ABS
  Rv
  Rv
  eqn 'LASTx*COS(REGT)+i*LASTx*SIN(REGT)'
  ENTER
  Rv
  Rv
  eqn 'ABS(REGZ)*SIN(ARG(REGZ))'
  eqn 'ABS(REGT)*COS(ARG(REGT))'
RTN

Complex conjugate of a complex number

Conversion of a complex number in stack X to its complex conjugate in stack X (CONJ).

Example:

2 + 3𝒾 = 2.00 - 3.00𝒾

LINE DATA OPERATIONS DISPLAY REMARKS
1 a+𝒾b ENTER +> ABS +>
2 x<>y ÷ u+𝒾v
; XEQ 8 ENTER
LBL S
  ABS
  CLx
  eqn 'SQ(ABS(LASTx))/LASTx'
RTN

Complex real component

Return the real part of a complex argument (RE).

Example:

4 - 3𝒾 = 4.00

LINE DATA OPERATIONS DISPLAY REMARKS
1 a+𝒾b ENTER <+ ARG COS x<>y
2 +> ABS × a Real part

Source: Antonio Maschio (140944)

Complex imaginary component

Return the imaginary part of a complex argument (IM).

Example:

4 - 3𝒾 = -3.00

LINE DATA OPERATIONS DISPLAY REMARKS
1 a+𝒾b ENTER <+ ARG SIN x<>y
2 +> ABS × b Imaginary part

Source: Antonio Maschio (140944)

Complex Magnitude value

Formula:

|a + 𝒾b| = √(a2 + b2)

Example:

|3 + 4𝒾| = 5.00

LINE DATA OPERATIONS DISPLAY REMARKS
1 a+𝒾b +> ABS Mag Magnitude

Complex angle argument

Returns the (real) polar angle of a complex number a + 𝒾b (ARG).

Example:

1 + 1𝒾 = 45°

LINE DATA OPERATIONS DISPLAY REMARKS
1 a+𝒾b <+ ARG Ang Angle

Change sign of a complex number

Changes the sign or of a complex number (NEG).

Example:

2 - 1𝒾 = -2.00 + 1.00𝒾

LINE DATA OPERATIONS DISPLAY REMARKS
1 a+𝒾b +/- u+𝒾v

Sign Function for a complex number

Return the unit vector in the direction of a complex number argument (SIGN).

Formular:

SIGN(a + 𝒾b) = a√(a2 + b2) + 𝒾b√(a2 + b2)

Example:

3 + 4𝒾 = 0.60 + 0.80𝒾

LINE DATA OPERATIONS DISPLAY REMARKS
1 a+𝒾b ENTER +> ABS ÷ u+𝒾v
Clone this wiki locally