complex-theory
Complex numbers basics - the shit you should have learned in high school
Absolute basics
You can represent complex numbers as the sum of their real parts and their imaginary parts, which also lets you write it in vector notation:
We can represent complex conjugates with * notation:
Using conjugates, we can find the imaginary and real parts of a number quite easily, using these simple formulas:
and
For and , you can extract the real and imaginary scalar components via two functions:
- : takes in a complex number and returns the scalar that multiples the real number component
- : takes in a complex number and returns the scalar that multiples the imaginary number component

- getting the real component from a complex number: By adding a complex number and its conjugate together then dividing the sum by 2, we can isolate just the real number component of the complex number.
- getting the imaginary component from a complex number: By subtracting the conjugate of a complex number from the complex number itself, then dividing the sum by , we can isolate just the imaginary number component of the complex number.
Square and absolute value of a complex number
You also have this property of conjugates concerning the absolute value:
From this, we also get this basic formula of the absolute value of a complex number:
Polar representation
From this, we also get this basic formula of the absolute value of a complex number:
NOTE
key insight: represents the rotation in radians of the complex number vector rotated around the origin. Think about it as the angle the vector makes with the X (real number) axis.
Complexity theory with matrices
Dagger matrices
Just like how normal complex numbers have conjugates, you can take the conjugate of a matrix and get out of it by taking the conjugate of each individual complex number in the matrix:

The transpose of the conjugate and the conjugate of the transpose of a matrix result in a matrix .
Unitary and hermitian matrices
Unitary matrices are matrices that follow this property:
if the inverse of a matrix is , then is a unitary matrix
Unitary matrices possess key characteristics:
- posesses orthogonality: They are representative of orthonormal transformations.
- The product of two unitary matrices is also unitary.
NOTE
If a square matrix is composed of orthonormal basis vectors (either as its rows or its columns), it is automatically a unitary matrix. That is because by nature, all unitary matrices are also orthogonal matrices.
Hermitian matrices are a special case of unitary matrices where a unitary matrix is also its own inverse.
if is the same as , then is a hermitian matrix.
NOTE
All Hermitian matrices are unitary but not all unitary matrices are Hermitian.