\documentclass[a4paper]{article}
\usepackage[a4paper,margin=2cm]{geometry}
\usepackage{multicol}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{harpoon}
\usepackage{tabularx}
\usepackage{graphicx}
\usepackage{wrapfig}
\usepackage{tikz}
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhead[LO,LE]{Year 12 Specialist}
\fancyhead[CO,CE]{Andrew Lorimer}

\usepackage{mathtools}
\usepackage{xcolor} % used only to show the phantomed stuff
\renewcommand\hphantom[1]{{\color[gray]{.6}#1}} % comment out!
\setlength\fboxsep{0pt} \setlength\fboxrule{.2pt} % for the \fboxes
\newcommand*\leftlap[3][\,]{#1\hphantom{#2}\mathllap{#3}}
\newcommand*\rightlap[2]{\mathrlap{#2}\hphantom{#1}}

\begin{document}

\begin{multicols}{2}

  \section{Complex numbers}

    \[\mathbb{C}=\{a+bi:a,b\in\mathbb{R}\}\]

    \subsection*{Operations}

      \begin{align*}
        z_1 \pm z_2&=(a \pm c)(b \pm d)i\\
        k \times z &= ka + kbi\\
        z_1 \cdot z_2 &= ac-bd+(ad+bc)i\\
        z_1 \div z_2 &= (z_1 \overline{z_2}) \div |z_2|^2
      \end{align*}

    \subsection*{Conjugate}

      \[\overline{z} = a \pm bi\]

      \subsubsection*{Properties}

        \begin{align*}
          \overline{z_1 \pm z_2} &= \overline{z_1}\pm\overline{z_2}\\
          \overline{z_1 \cdot z_2} &= \overline{z_1}\cdot\overline{z_2}\\
          \overline{kz} &= k\overline{z} \quad | \quad k \in \mathbb{R}\\
          z\overline{z} &= (a+bi)(a-bi)\\
          &= a^2 + b^2\\
          &= |z|^2
        \end{align*}

    \subsection*{Modulus}

      \[|z|=|\vec{Oz}|=\sqrt{a^2 + b^2}\]

      \subsubsection*{Properties}

        \begin{align*}
          |z_1z_2|&=|z_1||z_2|\\
          \left|\frac{z_1}{z_2}\right|&=\frac{|z_1|}{|z_2|}\\
          |z_1+z_2|&\le|z_1|+|z_2|
        \end{align*}

    \subsection*{Multiplicative inverse}

      \begin{align*}
        z^{-1}&=\frac{a-bi}{a^2+b^2}\\
        &=\frac{\overline{z}}{|z|^2}
        a
      \end{align*}

    \subsection*{Dividing over \(\mathbb{C}\)}

      \begin{align*}
        \frac{z_1}{z_2}&=z_1z_2^{-1}\\
        &=\frac{z_1\overline{z_2}}{|z_2|^2}\\
        &=\frac{(a+bi)(c-di)}{c^2+d^2}\\
        & \qquad \text{(rationalise denominator)}
      \end{align*}

    \subsection*{Argand planes}

      \begin{tikzpicture}\begin{scope}[thick,font=\scriptsize]
        \draw [->] (-1.5,0) -- (1.5,0) node [above left]  {$\operatorname{Re}(z)$};
        \draw [->] (0,-1.5) -- (0,1.5) node [below right] {$\operatorname{Im}(z)$};

        % If you only want a single label per axis side:
        \draw (1,-3pt) -- (1,0pt)   node [below] {$1$};
        \draw (-1,-3pt) -- (-1,0pt) node [below] {$-1$};
        \draw (-3pt,1) -- (0pt,1)   node [left] {$i$};
        \draw (-3pt,-1) -- (0pt,-1) node [left] {$-i$};
      \end{scope}\end{tikzpicture}

      Multiplication by \(i \implies\) anticlockwise rotation of \(\frac{\pi}{2}\)

    \subsection*{de Moivres' theorem}

    \[(r \operatorname{cis} \theta)^n = r^n \operatorname{cis}(n\theta) \text{ where } n \in \mathbb{Z}\]

    \subsection*{Complex polynomials}
    
      Include \(\pm\) for all solutions, incl. imaginary

\newcolumntype{R}{>{\raggedleft\arraybackslash}X}
\newcolumntype{L}{>{\raggedright\arraybackslash}X}
      \begin{tabularx}{\columnwidth}{rX}
        \hline
        Sum of squares & \(\begin{aligned} 
        z^2 + a^2 &= z^2-(ai)^2\\
        &= (z+ai)(z-ai) \end{aligned}\) \\
        \hline
        Sum of cubes & \(a^3 \pm b^3 = (a \pm b)(a^2 \mp ab + b^2)\)\\
        \hline
        Division & \(P(z)=D(z)Q(z)+R(z)\) \\
        \hline
        \parbox[t]{2cm}{Remainder} & Let \(\alpha \in \mathbb{C}\). Remainder of \(P(z) \div (z-\alpha)\) is \(P(\alpha)\)\\
        \hline
\end{tabularx}

\subsection*{Roots}

\(n\)th roots of \(z=r\operatorname{cis}\theta\) are:

\[z = r^{\frac{1}{n}} \operatorname{cis}\left(\frac{\theta+2k\pi}{n}\right)\]

\begin{itemize}

  \item{Same modulus for all solutions}
  \item{Arguments are separated by \(\frac{2\pi}{n}\)}

\item{Solutions of \(z^n=a\) where \(a \in \mathbb{C}\) lie on the circle \(x^2+y^2=\left(|a|^{\frac{1}{n}}\right)^2\)}
\end{itemize}

\subsubsection*{Conjugate root theorem}

If \(a+bi\) is a solution to \(P(z)=0\), then the conjugate \(\overline{z}=a-bi\) is also a solution.

\end{multicols}
\end{document}
