Fe exam prep: complex math

• complex math
• electromagnetics

posted on 01 Jan 2017

# Ulaby Problem 1.18

## Problem Statement

Complex numbers $$z_1$$ and $$z_2$$ are given by and $$z_1 = -3 + j2$$ $$z_2 = 1 - j2$$. Determine:

• (a) $$z_1 z_2$$

• (b) $$z_1/z_2^{*}$$

• (c) $$z_1^2$$

• (d) $$z_1z_1^{*}$$

## Analysis

Let’s first convert from rectangular form to polar form. We’ll compute the magnitudes first.

\begin{aligned} |z| &= \sqrt{x^2 + y^2} \\ |z_1| &= \sqrt{-3^2 + 2^2} = \sqrt{9+4} = \sqrt{13} \\ |z_2| &= \sqrt{1^2 + -2^2} = \sqrt{1+4} = \sqrt{5}\end{aligned}

Now determine the phase angles: The angle $$\theta$$ is the argument of $$z$$. It is defined for all $$z \neq 0$$:

$\arg(z) = \theta = \begin{cases} \arctan{\left( \frac{y}{x} \right)} & \text{if } x \ge 0 \\ \arctan{\left( \frac{y}{x} \right)} + \pi & \text{if } x < 0 \text{ and } y \ge 0 \pm 2n\pi \\ \arctan{\left( \frac{y}{x} \right)} - \pi & \text{if } x < 0 \text{ and } y < 0 \\ \end{cases}$

Evaluating $$\theta_1$$ we can see that $$x = -3 < 0$$, and $$y = 2 \ge 0 \pm 2n \pi$$, so use the second case.

\begin{aligned} \theta &= \tan^{-1}{\left(\frac{y}{x}\right)} \\ \theta_1 &= \tan^{-1}{\left(\frac{2}{-3}\right)} + \pi \\ \theta_1 &= -0.588 + \pi = 2.5536 \text{ rad} = 146.39^{\circ} \\\end{aligned}

Evaluating $$\theta_2$$ we can see that $$x = 1 > 0$$, so use the first case.

\begin{aligned} \theta &= \tan^{-1}{\left(\frac{y}{x}\right)} \\ \theta_2 &= \tan^{-1}{\left(\frac{-2}{1}\right)} \\ \theta_2 &= -0.588 = -1.107 \text{ rad} = -63.4349^{\circ} \\\end{aligned}

The values in polar coordinates are

\begin{aligned} z_1 &= \sqrt{13}e^{j2.5536} = 3.606e^{j146^{\circ}} \\ z_2 &= \sqrt{5}e^{-j0.588} = 2.236e^{-j63.4^{\circ}} \\\end{aligned}

## Solution

### Part (a) $$z_1 z_2$$

$z_1 z_2 = |z_1| |z_2| e^{j \left( \theta_1 + \theta_2 \right)} = 3.606e^{146^{\circ}} 2.236e^{-63.4^{\circ}} = \boxed{8.0623e^{1.4464}}$

### Part(b) $$z_1/z_2^{*}$$

$z_1 / z_2^2 = \frac{\sqrt{13}e^{j2.5536}}{\sqrt{5}e^{j1.1071}} = \boxed{1.6125e^{j1.4464}}$

### Part(c) $$z_1^2$$

$z_1^2 = (z_1)^2 = \left(\sqrt{13}e^{j2.2361} \right)^2 = \boxed{13e^{-j1.176}}$

### Part(d) $$z_1z_1^{*}$$

\begin{aligned} |z_1| &= \sqrt{z_1 z_1^{*}} \\ |z_1|^2 &= z_1 z_1^{*} \\ |\sqrt{13}|^2 &= z_1 z_1^{*} \\ \boxed{13} &= z_1 z_1^{*} \\\end{aligned}

## Sample HTML Code

​html <a href="#">Hello world</a> ​

clc, clear
format compact, format short eng

z_1 = -3 + j*2
z_2 = 1 - j*2

x_1 = real(z_1)
y_1 = imag(z_1)

x_2 = real(z_2)
y_2 = imag(z_2)

case1a = x_1 >= 0
case1b = x_1 < 0 & y_1 >= 0
case1c = x_1 < 0 & y_1 < 0

case2a = x_2 >= 0
case2b = x_2 < 0 & y_2 >= 0
case2c = x_2 < 0 & y_2 < 0

theta_1_deg = (360 * theta_1_rad) / (2 * pi)

theta_2_deg = (360 * theta_2_rad) / (2 * pi)

abs(z_1)
angle(z_1)
abs(z_2)
angle(z_2)

a = z_1 * z_2
a_abs = abs(a)
a_phase = angle(a)

b = z_1 / conj(z_2)
b_abs = abs(b)
b_phase = angle(b)

c = z_1^2
c_abs = abs(c)
c_phase = angle(c)

d = z_1 * conj(z_1)
d_abs = abs(d)
d_phase = angle(d)