\documentclass[a4paper]{article}
\usepackage[a4paper,margin=2cm]{geometry}
\usepackage{multicol}
\usepackage{multirow}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{harpoon}
\usepackage{tabularx}
\usepackage[dvipsnames, table]{xcolor}
\usepackage{graphicx}
\usepackage{wrapfig}
\usepackage{tikz}
\usetikzlibrary{calc}
\usepgflibrary{arrows.meta}
\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}}
\newcolumntype{L}[1]{>{\hsize=#1\hsize\raggedright\arraybackslash}X}%
\newcolumntype{R}[1]{>{\hsize=#1\hsize\raggedleft\arraybackslash}X}%
\definecolor{cas}{HTML}{e6f0fe}
\linespread{1.5}

\begin{document}

\begin{multicols}{2}

  \section{Complex numbers}

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

    \begin{align*}
      \text{Cartesian form: } & a+bi\\
      \text{Polar form: } & r\operatorname{cis}\theta
    \end{align*}

    \subsection*{Operations}

      \begin{tabularx}{\columnwidth}{R{0.33}|X|X}
        & \textbf{Cartesian} & \textbf{Polar} \\
        \hline
        \(z_1 \pm z_2\) & \((a \pm c)(b \pm d)i\) & convert to \(a+bi\)\\
        \hline
        \(+k \times z\) & \multirow{2}{\hsize}{\(ka \pm kbi\)} & \(kr\operatorname{cis} \theta\)\\
        \cline{1-1}\cline{3-3}
        \(-k \times z\) & & \(kr \operatorname{cis}(\theta\pm \pi)\)\\
        \hline
        \(z_1 \cdot z_2\) & \(ac-bd+(ad+bc)i\) & \(r_1r_2 \operatorname{cis}(\theta_1 + \theta_2)\)\\
        \hline
        \(z_1 \div z_2\) & \((z_1 \overline{z_2}) \div |z_2|^2\) & \(\left(\frac{r_1}{r_2}\right) \operatorname{cis}(\theta_1 - \theta_2)\)
      \end{tabularx}

      \subsubsection*{Scalar multiplication in polar form}
      
        For \(k \in \mathbb{R}^+\):
        \[k\left(r \operatorname{cis}\theta\right)=kr \operatorname{cis}\theta\]

        \noindent For \(k \in \mathbb{R}^-\):
        \[k\left(r \operatorname{cis}\theta\right)=kr \operatorname{cis}\left(\begin{cases}\theta - \pi & 0<\operatorname{Arg}(z)\le \pi \\ \theta + \pi & -\pi<\operatorname{Arg}(z)\le 0\end{cases}\right)\]

    \subsection*{Conjugate}

      \begin{align*}
        \overline{z} &= a \mp bi\\
        &= r \operatorname{cis}(-\theta)
      \end{align*}

      \noindent \colorbox{cas}{On CAS:} \verb|conjg(a+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\\
        &=r \operatorname{cis}(-\theta)
      \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*{Polar form}

      \begin{align*}
        z&=r\operatorname{cis}\theta\\
        &=r(\cos \theta + i \sin \theta)
      \end{align*}

      \begin{itemize}
        \item{\(r=|z|=\sqrt{\operatorname{Re}(z)^2 + \operatorname{Im}(z)^2}\)}
        \item{\(\theta = \operatorname{arg}(z)\) \quad \colorbox{cas}{On CAS:} \verb|arg(a+bi)|}
        \item{\(\operatorname{Arg}(z) \in (-\pi,\pi)\) \quad \bf{(principal argument)}}
        \item{\colorbox{cas}{Convert on CAS:}\\ \verb|compToTrig(a+bi)| \(\iff\) \verb|cExpand{r·cisX}|}
        \item{Multiple representations:\\\(r\operatorname{cis}\theta=r\operatorname{cis}(\theta+2n\pi)\) with \(n \in \mathbb{Z}\) revolutions}
        \item{\(\operatorname{cis}\pi=-1,\qquad \operatorname{cis}0=1\)}
      \end{itemize}

    \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

      \begin{tabularx}{\columnwidth}{ R{0.55} X  }
        \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
        Remainder theorem & Let \(\alpha \in \mathbb{C}\). Remainder of \(P(z) \div (z-\alpha)\) is \(P(\alpha)\)\\
        \hline
        Factor theorem & \(z-\alpha\) is a factor of \(P(z) \iff P(\alpha)=0\) for \(\alpha \in \mathbb{C}\)\\
        \hline
        Conjugate root theorem & \(P(z)=0 \text{ at } z=a\pm bi\) (\(\implies\) both \(z_1\) and \(\overline{z_1}\) are solutions)
      \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\) \quad (intervals of \(\frac{2\pi}{n}\))}
      \end{itemize}

      \noindent For \(0=az^2+bz+c\), use quadratic formula:

      \[z=\frac{-b\pm\sqrt{b^2-4ac}}{2a}\]

    \subsection*{Fundamental theorem of algebra}

      A polynomial of degree \(n\) can be factorised into \(n\) linear factors in \(\mathbb{C}\):

        \[\implies P(z)=a_n(z-\alpha_1)(z-\alpha_2)(z-\alpha_3)\dots(z-\alpha_n)\]
        \[\text{ where } \alpha_1,\alpha_2,\alpha_3,\dots,\alpha_n \in \mathbb{C}\]

    \subsection*{Argand planes}
    
      \begin{center}\begin{tikzpicture}[scale=2]
        \draw [->] (-0.2,0) -- (1.5,0) node [right]  {$\operatorname{Re}(z)$};
        \draw [->] (0,-0.2) -- (0,1.5) node [above] {$\operatorname{Im}(z)$};
        \coordinate (P) at (1,1);
        \coordinate (a) at (1,0);
        \coordinate (b) at (0,1);
        \coordinate (O) at (0,0);
        \draw (0,0) -- (P) node[pos=0.5, above left]{\(r\)} node[pos=1, right]{\(\begin{aligned}z&=a+bi\\&=r\operatorname{cis}\theta\end{aligned}\)};
        \draw [gray, dashed] (1,1) -- (1,0) node[black, pos=1, below]{\(a\)};
        \draw [gray, dashed] (1,1) -- (0,1) node[black, pos=1, left]{\(b\)};
        \begin{scope}
          \path[clip] (O) -- (P) -- (a);
          \fill[red, opacity=0.5, draw=black] (O) circle (2mm);
          \node at ($(O)+(20:3mm)$) {$\theta$};
        \end{scope}
        \filldraw (P) circle (0.5pt);
      \end{tikzpicture}\end{center}

      \begin{itemize}
        \item{Multiplication by \(i \implies\) CCW rotation of \(\frac{\pi}{2}\)}
        \item{Addition: \(z_1 + z_2 \equiv\) \overrightharp{\(Oz_1\)} + \overrightharp{\(Oz_2\)}}
      \end{itemize}

    \subsection*{Sketching complex graphs}
      
      \subsubsection*{Linear}

        \begin{itemize}
          \item{\(\operatorname{Re}(z)=c\) or \(\operatorname{Im}(z)=c\) (perpendicular bisector)}
          \item{\(\operatorname{Im}(z)=m\operatorname{Re}(z)\)}
          \item{\(|z+a|=|z+b| \implies 2(a-b)x=b^2-a^2\)}
        \end{itemize}

      \subsubsection*{Circles}

        \begin{itemize}
          \item \(|z-z_1|^2=c^2|z_2+2|^2\)
          \item \(|z-(a+bi)|=c\)
        \end{itemize}

      \noindent \textbf{Loci} \qquad \(\operatorname{Arg}(z)<\theta\)

        \begin{center}\begin{tikzpicture}[scale=2,mydot/.style={circle, fill=white, draw, outer sep=0pt, inner sep=1.5pt}]
          \draw [->] (0,0) -- (1,0) node [right]  {$\operatorname{Re}(z)$};
          \draw [->] (0,-0.5) -- (0,1) node [above] {$\operatorname{Im}(z)$};
          \draw [<-, dashed, thick, blue] (-1,0) -- (0,0);
          \draw [->, thick, blue] (0,0) -- (1,1);
          \fill [gray, opacity=0.2, domain=-1:1, variable=\x] (-1,-0.5) -- (-1,0) -- (0, 0) -- (1,1) -- (1,-0.5) -- cycle;
          \begin{scope}
            \path[clip] (0,0) -- (1,1) -- (1,0);
            \fill[red, opacity=0.5, draw=black] (0,0) circle (2mm);
            \node at ($(0,0)+(20:3mm)$) {$\theta$};
          \end{scope}
          \node [font=\footnotesize] at (0.5,-0.25) {\(\operatorname{Arg}(z)<\theta\)};
          \node [blue, mydot] {};
        \end{tikzpicture}\end{center}

      \noindent \textbf{Rays} \qquad \(\operatorname{Arg}(z-b)=\theta\)

        \begin{center}\begin{tikzpicture}[scale=2,mydot/.style={circle, fill=white, draw, outer sep=0pt, inner sep=1.5pt}]
          \draw [->] (-0.75,0) -- (1.5,0) node [right]  {$\operatorname{Re}(z)$};
          \draw [->] (0,-1) -- (0,1) node [above] {$\operatorname{Im}(z)$};
          \draw [->, thick, brown] (-0.25,0) -- (-0.75,-1);
          \node [above, font=\footnotesize] at (-0.25,0) {\(\frac{1}{4}\)};
          \begin{scope}
            \path[clip] (-0.25,0) -- (-0.75,-1) -- (0,0);
            \fill[orange, opacity=0.5, draw=black] (-0.25,0) circle (2mm);
          \end{scope}
          \node at (-0.08,-0.3) {\(\frac{\pi}{8}\)};
          \node [font=\footnotesize, left] at (-0.75,-1) {\(\operatorname{Arg}(z+\frac{1}{4})=\frac{\pi}{8}\)};
          \node [brown, mydot] at (-0.25,0) {};
          \draw [<->, thick, green] (0,-1) -- (1.5,0.5) node [pos=0.25, black, font=\footnotesize, right] {\(|z-2|=|z-(1+i)|\)};
          \node [left, font=\footnotesize] at (0,-1) {\(-1\)};
          \node [below, font=\footnotesize] at (1,0) {\(1\)};
        \end{tikzpicture}\end{center}

    \section{Vectors}


\begin{itemize}
\item
  \textbf{vector:} a directed line segment\\
\item
  arrow indicates direction
\item
  length indicates magnitude
\item
  notated as \(\vec{a}, \widetilde{A}, \overrightharp{a}\)
\item
  column notation: \(\begin{bmatrix}  x \\ y  \end{bmatrix}\)
\item
  vectors with equal magnitude and direction are equivalent
\end{itemize}

%\includegraphics[width=0.2\textwidth,height=\textheight]{graphics/vectors-intro.png}

\subsection{Vector addition}

\(\boldsymbol{u} + \boldsymbol{v}\) can be represented by drawing each
 vector head to tail then joining the lines.\\
Addition is commutative (parallelogram)

\subsection{Scalar multiplication}

For \(k \in \mathbb{R}^+\), \(k\boldsymbol{u}\) has the same direction
as \(\boldsymbol{u}\) but length is multiplied by a factor of \(k\).

When multiplied by \(k < 0\), direction is reversed and length is
multplied by \(k\).

\subsection{Vector subtraction}

To find \(\boldsymbol{u} - \boldsymbol{v}\), add \(\boldsymbol{-v}\) to
\(\boldsymbol{u}\)

\subsection{Parallel vectors}

Same or opposite direction

\[\boldsymbol{u} || \boldsymbol{v} \iff \boldsymbol{u} = k \boldsymbol{v} \text{ where } k \in \mathbb{R} \setminus \{0\}\]

\subsection{Position vectors}

Vectors may describe a position relative to \(O\).

For a point \(A\), the position vector is \(\overrightharp{OA}\)

\subsection{Linear combinations of non-parallel
vectors}

If two non-zero vectors \(\boldsymbol{a}\) and \(\boldsymbol{b}\) are
not parallel, then:

\[m\boldsymbol{a} + n\boldsymbol{b} = p \boldsymbol{a} + q \boldsymbol{b}\quad \therefore \quad m = p, \> n = q\]

%\includegraphics[width=0.2,height=\textheight]{graphics/parallelogram-vectors.jpg}
%\includegraphics[width=1]{graphics/vector-subtraction.jpg}

\subsection{Column vector notation}

A vector between points \(A(x_1,y_1), \> B(x_2,y_2)\) can be represented
as \(\begin{bmatrix}x_2-x_1\\ y_2-y_1 \end{bmatrix}\)

\subsection{Component notation}

A vector \(\boldsymbol{u} = \begin{bmatrix}x\\ y \end{bmatrix}\) can be
written as \(\boldsymbol{u} = x\boldsymbol{i} + y\boldsymbol{j}\).\\
\(\boldsymbol{u}\) is the sum of two components \(x\boldsymbol{i}\) and
\(y\boldsymbol{j}\)\\
Magnitude of vector
\(\boldsymbol{u} = x\boldsymbol{i} + y\boldsymbol{j}\) is denoted by
\(|u|=\sqrt{x^2+y^2}\)

Basic algebra applies:\\
\((x\boldsymbol{i} + y\boldsymbol{j}) + (m\boldsymbol{i} + n\boldsymbol{j}) = (x + m)\boldsymbol{i} + (y+n)\boldsymbol{j}\)\\
Two vectors equal if and only if their components are equal.

\subsection{Unit vector \(|\hat{\boldsymbol{a}}|=1\)}
\begin{equation}\begin{split}\hat{\boldsymbol{a}} & = {1 \over {|\boldsymbol{a}|}}\boldsymbol{a} \\ & = \boldsymbol{a} \cdot {|\boldsymbol{a}|}\end{split}\end{equation}

  \subsection*{Scalar/dot product \(\boldsymbol{a} \cdot \boldsymbol{b}\)}

\[\boldsymbol{a} \cdot \boldsymbol{b} = a_1 b_1 + a_2 b_2\]

\textbf{on CAS:} \texttt{dotP({[}a\ b\ c{]},\ {[}d\ e\ f{]})}

\subsection{Scalar product properties}

\begin{enumerate}
\item
  \(k(\boldsymbol{a\cdot b})=(k\boldsymbol{a})\cdot \boldsymbol{b}=\boldsymbol{a}\cdot (k\boldsymbol{b})\)
\item
  \(\boldsymbol{a \cdot 0}=0\)
\item
  \(\boldsymbol{a \cdot (b + c)}=\boldsymbol{a \cdot b + a \cdot c}\)
\item
  \(\boldsymbol{i \cdot i} = \boldsymbol{j \cdot j} = \boldsymbol{k \cdot k}= 1\)
\item
  If \(\boldsymbol{a} \cdot \boldsymbol{b} = 0\), \(\boldsymbol{a}\) and
  \(\boldsymbol{b}\) are perpendicular
\item
  \(\boldsymbol{a \cdot a} = |\boldsymbol{a}|^2 = a^2\)
\end{enumerate}

For parallel vectors \(\boldsymbol{a}\) and \(\boldsymbol{b}\):\\
\[\boldsymbol{a \cdot b}=\begin{cases}
|\boldsymbol{a}||\boldsymbol{b}| \hspace{2.8em} \text{if same direction}\\
-|\boldsymbol{a}||\boldsymbol{b}| \hspace{2em} \text{if opposite directions}
\end{cases}\]

\subsection{Geometric scalar products}

\[\boldsymbol{a} \cdot \boldsymbol{b} = |\boldsymbol{a}| |\boldsymbol{b}| \cos \theta\]

where \(0 \le \theta \le \pi\)

\subsection{Perpendicular vectors}

If \(\boldsymbol{a} \cdot \boldsymbol{b} = 0\), then
\(\boldsymbol{a} \perp \boldsymbol{b}\) (since \(\cos 90 = 0\))

\subsection{Finding angle between
vectors}

\textbf{positive direction}

\[\cos \theta = {{\boldsymbol{a} \cdot \boldsymbol{b}} \over {|\boldsymbol{a}| |\boldsymbol{b}|}} = {{a_1 b_1 + a_2 b_2} \over {|\boldsymbol{a}| |\boldsymbol{b}|}}\]

\textbf{on CAS:} \texttt{angle({[}a\ b\ c{]},\ {[}a\ b\ c{]})} (Action
-\textgreater{} Vector -\textgreater{} Angle)

\subsection{Angle between vector and
axis}

Direction of a vector can be given by the angles it makes with
\(\boldsymbol{i}, \boldsymbol{j}, \boldsymbol{k}\) directions.

For
\(\boldsymbol{a} = a_1 \boldsymbol{i} + a_2 \boldsymbol{j} + a_3 \boldsymbol{k}\)
which makes angles \(\alpha, \beta, \gamma\) with positive direction of
\(x, y, z\) axes:
\[\cos \alpha = {a_1 \over |\boldsymbol{a}|}, \quad \cos \beta = {a_2 \over |\boldsymbol{a}|}, \quad \cos \gamma = {a_3 \over |\boldsymbol{a}|}\]

\textbf{on CAS:} \texttt{angle({[}a\ b\ c{]},\ {[}1\ 0\ 0{]})} for angle
between \(a\boldsymbol{i} + b\boldsymbol{j} + c\boldsymbol{k}\) and
\(x\)-axis

\subsection{Vector projections}

Vector resolute of \(\boldsymbol{a}\) in direction of \(\boldsymbol{b}\)
is magnitude of \(\boldsymbol{a}\) in direction of \(\boldsymbol{b}\):

\[\boldsymbol{u}={{\boldsymbol{a}\cdot\boldsymbol{b}}\over |\boldsymbol{b}|^2}\boldsymbol{b}=\left({\boldsymbol{a}\cdot{\boldsymbol{b} \over |\boldsymbol{b}|}}\right)\left({\boldsymbol{b} \over |\boldsymbol{b}|}\right)=(\boldsymbol{a} \cdot \hat{\boldsymbol{b}})\hat{\boldsymbol{b}}\]

\subsection{Scalar resolute of \(\boldsymbol{a}\) on \(\boldsymbol{b}\)}

\[r_s = |\boldsymbol{u}| = \boldsymbol{a} \cdot \hat{\boldsymbol{b}}\]

\subsection{Vector resolute of \(\boldsymbol{a} \perp \boldsymbol{b}\)}

\[\boldsymbol{w} = \boldsymbol{a} - \boldsymbol{u} \> \text{ where } \boldsymbol{u} \text{ is projection } \boldsymbol{a} \text{ on } \boldsymbol{b}\]

\subsection{Vector proofs}

\subsubsection{Concurrent lines}

\(\ge\) 3 lines intersect at a single point

\subsubsection{Collinear points}

\(\ge\) 3 points lie on the same line\\
\(\implies \vec{OC} = \lambda \vec{OA} + \mu \vec{OB}\) where
\(\lambda + \mu = 1\). If \(C\) is between \(\vec{AB}\), then
\(0 < \mu < 1\)\\
Points \(A, B, C\) are collinear iff
\(\vec{AC}=m\vec{AB} \text{ where } m \ne 0\)

\subsubsection{Useful vector properties}

\begin{itemize}
\item
  If \(\boldsymbol{a}\) and \(\boldsymbol{b}\) are parallel, then
  \(\boldsymbol{b}=k\boldsymbol{a}\) for some
  \(k \in \mathbb{R} \setminus \{0\}\)
\item
  If \(\boldsymbol{a}\) and \(\boldsymbol{b}\) are parallel with at
  least one point in common, then they lie on the same straight line
\item
  Two vectors \(\boldsymbol{a}\) and \(\boldsymbol{b}\) are
  perpendicular if \(\boldsymbol{a} \cdot \boldsymbol{b}=0\)
\item
  \(\boldsymbol{a} \cdot \boldsymbol{a} = |\boldsymbol{a}|^2\)
\end{itemize}

\subsection{Linear dependence}

Vectors \(\boldsymbol{a}, \boldsymbol{b}, \boldsymbol{c}\) are linearly
dependent if they are non-parallel and:

\[k\boldsymbol{a}+l\boldsymbol{b}+m\boldsymbol{c} = 0\]
\[\therefore \boldsymbol{c} = m\boldsymbol{a} + n\boldsymbol{b} \quad \text{(simultaneous)}\]

\(\boldsymbol{a}, \boldsymbol{b},\) and \(\boldsymbol{c}\) are linearly
independent if no vector in the set is expressible as a linear
combination of other vectors in set, or if they are parallel.

Vector \(\boldsymbol{w}\) is a linear combination of vectors
\(\boldsymbol{v_1}, \boldsymbol{v_2}, \boldsymbol{v_3}\)

\subsection{Three-dimensional vectors}

Right-hand rule for axes: \(z\) is up or out of page.

%\includegraphics{graphics/vectors-3d.png}

\subsection{Parametric vectors}

Parametric equation of line through point \((x_0, y_0, z_0)\) and
parallel to \(a\boldsymbol{i} + b\boldsymbol{j} + c\boldsymbol{k}\) is:

\begin{equation}\begin{cases}x = x_o + a \cdot t \\ y = y_0 + b \cdot t \\ z = z_0 + c \cdot t\end{cases}\end{equation}


  \end{multicols}
\end{document}
