# Complex Vectors
### Big Idea
A complex number $z$ can be represented in Cartesian form ($z = a + ib$) or in polar form ($z = r e^{i \theta}$). The set of all $n$-dimensional vectors with complex entries forms the complex vector space $\mathbb{C}^n$. To ensure the vector norm is real and positive, the *inner product* in $\mathbb{C}^n$ is defined using the complex conjugate: $\langle \mathbf{u} , \mathbf{v} \rangle = \mathbf{u}^T \overline{\mathbf{v}}$.
## Complex Numbers
:::info
**Definition** A *complex number* is written in the form $z = a + i b$, where $i = \sqrt{-1}$ and $a, b$ are real numbers.
* $i$ is the imaginary unit, satisfying $i^2 = -1$.
* $a = \mathrm{Re}(z)$ is the *real part*.
* $b = \mathrm{Im}(z)$ is the *imaginary part*.
:::
### Arithmetic
Complex numbers follow standard arithmetic rules:
* *Addition/Subtraction:* $(a + bi) \pm (a' + b'i) = (a \pm a') + (b \pm b')i$.
* *Multiplication:* $(a + bi)(a' + b'i) = (aa' - bb') + (ab' + a'b)i$.
* *Division/Inverse:* $\frac{1}{a + bi} = \frac{a}{a^2 + b^2} - \frac{b}{a^2 + b^2} i$.
:::warning
**Example** Let $z = 3 + 2i$ and $z' = 2 + 5i$.
* $z + z' = 5 + 7i$.
* $zz' = (3)(2) + (3)(5i) + (2i)(2) + (2i)(5i) = 6 + 15i + 4i - 10 = -4 + 19i$.
* $\frac{z}{z'} = \frac{3 + 2i}{2 + 5i} \cdot \frac{2 - 5i}{2 - 5i} = \frac{6 - 15i + 4i - 10i^2}{4 - 25i^2} = \frac{16 - 11i}{29} = \frac{16}{29} - \frac{11}{29} i$.
:::
### Complex Conjugate and Modulus
* **Complex Conjugate:** The conjugate of $z = a + bi$ is $\overline{z} = a - bi$.
* $\overline{z_1 \pm z_2} = \overline{z_1} \pm \overline{z_2}$ and $\overline{z_1 z_2} = \overline{z_1}\,\overline{z_2}$.
* **Modulus (Absolute Value):** The length of $z$ is $|z| = \sqrt{a^2 + b^2}$.
* $|z|^2 = z \overline{z}$.
* $|z_1 z_2| = |z_1|\,|z_2|$ and $|z^{-1}| = 1/|z|$.
:::danger
**Porposition** For any complex number $z$:
* $z$ is a real number if and only if $z = \overline{z}$.
* $\operatorname{Re}(z) = \frac{z + \overline{z}}{2}$ and $\operatorname{Im}(z) = \frac{z - \overline{z}}{2i}$.
* $z^{-1} = \frac{\overline{z}}{|z|^2}$ (if $z \neq 0$).
:::
### Polar Form
:::info
**Definition** A complex number $z = a + ib$ can be represented geometrically as a point $(a, b)$ in the complex plane. Its polar form is:$$z = r e^{i \theta}$$
* $r = |z| = \sqrt{a^2 + b^2}$ is the modulus.
* $\theta = \arg z = \arctan(b/a)$ is the argument (angle). The argument is usually restricted to $\theta \in (-\pi, \pi]$.

:::
#### Euler's Formula
The relationship between the Cartesian and polar forms is given by *Euler's Formula*:
$$
e^{i\theta} = \cos\theta + i\sin\theta
$$
#### Operations in Polar Form
The polar form simplifies multiplication, division, and powers:
* *Conjugate:* $\overline{z} = r e^{-i\theta}$.
* *Multiplication:* If $z_1 = r_1 e^{i\theta_1}$ and $z_2 = r_2 e^{i\theta_2}$, then $z_1 z_2 = r_1 r_2 e^{i(\theta_1 + \theta_2)}$.
* *Division:* $\frac{z_1}{z_2} = \frac{r_1}{r_2} e^{i(\theta_1 - \theta_2)}$ (if $z_2 \neq 0$).
:::warning
**Example** Let $z = 1 - i$. Calculating $z^4$.
* $|z| = \sqrt{2}$ and $\arg z = -\frac{\pi}{4}$. Thus, $z = \sqrt{2}\, e^{-i \pi/4}$.
* $z^4 = (\sqrt{2} e^{-i\pi/4})^4 = (\sqrt{2})^4 e^{-i4\pi/4} = 4 e^{-i\pi}$.
* Since $e^{-i\pi} = \cos(-\pi) + i\sin(-\pi) = -1$, we have $z^4 = 4(-1) = -4$.
:::
### Fundamental Theorem of Algebra
:::danger
**Theorem (Fundamental Theorem of Algebra)**
Every polynomial of positive degree with complex coefficients has at least one *complex root*.
:::
This theorem implies that if $f(x) \in \mathbb{C}[x]$ is a polynomial of degree $n \ge 1$, it can be uniquely factored (up to the order of factors) over the complex numbers: $$f(x) = u(x - u_1)(x - u_2)\cdots(x - u_n), \quad u, u_i \in \mathbb{C}.$$where $u$ is the leading coefficient and $u_1, \dots, u_n$ are the $n$ roots of the polynomial (possibly repeated).
## Complex Vector Space
:::info
**Definition**
The *complex vector space* $\mathbb{C}^n$ is the set of vectors of length $n$ whose entries are complex numbers:$$\mathbf{v} = \begin{bmatrix} v_1 \\ \vdots \\ v_n \end{bmatrix}, \quad v_i \in \mathbb{C}$$
The *conjugate* of a vector $\mathbf{v} \in \mathbb{C}^n$ is obtained by taking the conjugate of each entry:$$\overline{\mathbf{v}} = \begin{bmatrix} \overline{v}_1 \\ \vdots \\ \overline{v}_n \end{bmatrix}$$
:::
### Inner Product and Norm
The inner product in $\mathbb{C}^n$ retains properties similar to the real dot product, with key differences involving the complex conjugate:
:::info
**Definition** The *standard inner product* (or Hermitian inner product) of $\mathbf{u}, \mathbf{v} \in \mathbb{C}^n$ is defined using the conjugate transpose of $\mathbf{v}$:$$\langle \mathbf{u} , \mathbf{v} \rangle = \mathbf{u}^T \overline{ \mathbf{v} } = u_1 \overline{v}_1 + \cdots + u_n \overline{v}_n$$
:::
:::danger
**Theorem** Let $\mathbf{u} , \mathbf{v} \in \mathbb{C}^n$ and $c \in \mathbb{C}$.
1. (Linearity in the first argument) $\langle c \, \mathbf{u} , \mathbf{v} \rangle = c \, \langle \mathbf{u} , \mathbf{v} \rangle$
2. (Conjugate linearity in the second argument) $\langle \mathbf{u} , c \, \mathbf{v} \rangle = \overline{c} \, \langle \mathbf{u} , \mathbf{v} \rangle$
3. (Conjugate symmetry) $\langle \mathbf{u} , \mathbf{v} \rangle = \overline{\langle \mathbf{v} , \mathbf{u} \rangle}$
4. (Positivity) $\langle \mathbf{v} , \mathbf{v} \rangle \geq 0$, and $\langle \mathbf{v} , \mathbf{v} \rangle = 0$ if and only if $\mathbf{v} = \mathbf{0}$.
:::
:::info
**Definition** The norm (or length) of $\mathbf{v} \in \mathbb{C}^n$ is defined using the inner product:$$\| \mathbf{v} \| = \sqrt{ \langle \mathbf{v} , \mathbf{v} \rangle } = \sqrt{ |v_1|^2 + \cdots + |v_n|^2 }$$
:::
:::warning
**Example** Let $\mathbf{u} = \begin{bmatrix} 2 \\ 1-i \\ 2i \end{bmatrix}$.
* The inner product $\langle \mathbf{u}, \mathbf{u}\rangle$ is always real and non-negative: $$\langle \mathbf{u}, \mathbf{u}\rangle = 2\overline{2} + (1-i)\overline{(1-i)} + (2i)\overline{(2i)} = 4 + (1-i)(1+i) + (2i)(-2i) = 4 + 2 + 4 = 10$$
* The norm is $\lVert \mathbf{u} \rVert = \sqrt{10}$.
:::
:::info
**Definition** Two complex vectors $\mathbf{u} , \mathbf{v} \in \mathbb{C}^n$ are *orthogonal* if their inner product is zero: $\langle \mathbf{u} , \mathbf{v} \rangle = 0$.
:::
## Complex Matrices and Operators
### Conjugate Transpose
:::info
**Definition** The *conjugate transpose* (or adjoint) of a complex matrix $A$ is denoted $A^\ast$ and is defined as the transpose of the conjugate matrix: $A^\ast = \overline{A}^T$.
:::
:::warning
**Example** If $A = \begin{bmatrix} 1 & i \\ 2i & 2 \end{bmatrix}$, then $A^\ast = \overline{A}^T = \begin{bmatrix} \overline{1} & \overline{i} \\ \overline{2i} & \overline{2} \end{bmatrix}^T = \begin{bmatrix} 1 & -i \\ -2i & 2 \end{bmatrix}^T = \begin{bmatrix} 1 & -2i \\ -i & 2 \end{bmatrix}$.
:::
:::danger
**Proposition**
* $(A^*)^* = A$.
* $A^* = A^T$ if and only if all entries of $A$ are real (i.e., $A$ is a real matrix).
* The inner product form for matrix multiplication is: $\langle A \mathbf{u} , \mathbf{v} \rangle = \langle \mathbf{u} , A^* \mathbf{v} \rangle$ for all $\mathbf{u} , \mathbf{v} \in \mathbb{C}^n$.
:::
### Hermitian and Unitary Matrices
In $\mathbb{C}^n$, the analogs of real symmetric and orthogonal matrices are Hermitian and Unitary matrices.
| Matrix Type | Definition | Real Analog | Key Property |
| :--- | :--- | :--- | :--- |
| **Hermitian** | $A = A^\ast$ (Symmetric under conjugate transpose) | Symmetric matrix ($A=A^T$) | $\langle A \mathbf{u} , \mathbf{v} \rangle = \langle \mathbf{u} , A \mathbf{v} \rangle$ |
| **Unitary** | $A A^\ast = A^\ast A = I$ ($A^\ast = A^{-1}$) | Orthogonal matrix ($A^T=A^{-1}$) | $\langle A \mathbf{u} , A \mathbf{v} \rangle = \langle \mathbf{u} , \mathbf{v} \rangle$ (Preserves inner product) |
:::warning
**Example**
- $\begin{bmatrix} 1 & i \\ -i & 1 \end{bmatrix}$ is Hermitian.
- $\begin{bmatrix} 0 & i \\ 1 & 0 \end{bmatrix}$ is unitary.
:::
:::danger
**Proposition**
* All diagonal entries of a Hermitian matrix are *real*.
* If $A$ is unitary, it preserves the inner product, meaning it also preserves the vector norm: $\|A\mathbf{v}\| = \|\mathbf{v}\|$.
:::
:::success
**Exercises**
1. Determine if the following pairs of vectors are orthogonal:
* a. The vectors $\mathbf{u} = \begin{bmatrix} i \\ 2i \\ 1 - i \\ 2 \end{bmatrix}$ and $\mathbf{v} = \begin{bmatrix} 1 - i \\ 1 + i \\ i \\ i \end{bmatrix}$
* b. The vectors $\mathbf{u} = \begin{bmatrix} i \\ 2i \\ 1 - i \\ -4 \end{bmatrix}$ and $\mathbf{v} = \begin{bmatrix} 1 - i \\ 1 + i \\ i \\ i \end{bmatrix}$
2. Identify all true statements regarding complex matrices:
* a. If $A$ is any $N \times N$ complex matrix then $A + \overline{A}^T$ is Hermitian.
* b. If $A$ is any $N \times N$ complex matrix then $A - \overline{A}^T$ is Hermitian.
* c. If $A$ is any $N \times N$ complex matrix then $A + \overline{A}^T$ is unitary.
* d. If $A$ is any $N \times N$ complex matrix then $A - \overline{A}^T$ is unitary.
* e. If $A$ is any $N \times N$ complex matrix then $A \overline{A}^T$ is Hermitian.
* f. If $A$ is any $N \times N$ complex matrix then $A \overline{A}^T$ is unitary.
:::