## Week 4A: Quaternions

You are already familiar with complex numbers: A quantity that consists of a real and an imaginary number. William Rowan Hamilton was already a well-established mathematician when he proposed to extend such complex numbers to quantities consisting of four components. A so-called quaternion ($Q$) would consist of a real part and three imaginary parts

$Q = a + ib + jc + kd.$

With the imaginary units
$i,j,k$
satisfying
$i^2 = j^2 = k^2 = ijk = -1$.
In a nutshell, these quaternions would be our algebraic structure of
choice when working with Euclidean vectors *and* scalars. A
vector
$\vec{v_1} = v_{1,x}\vec{e}_x + v_{1,y}\vec{e}_y + v_{1,z}\vec{e}_z$
would be written as a quaternion with a zero real part,

$v = v_{1,x}i + v_{1,y}j + v_{1,z}k.$

Interestingly, if you would multiply two vectors ($v_1$ and $v_2$) represented as quaternions the Hamilton product would give you both the scalar product and the cross product.

$Q = v_1v_2 = (v_{1,x}i + v_{1,y}j + v_{1,z}k)(v_{2,x}i + v_{2,y}j + v_{2,z}k) =$ $= \text{ expression with with 9 terms}$ $\begin{align} = -(v_{1,x}v_{2,x} + v_{1,y}v_{2,y} + v_{1,z}v_{2,z}) +\\ i(v_{1,y}v_{2,z}- v_{z,1}v_{y,2}) + \\ j(v_{1,x}v_{2,z}- v_{z,1}v_{x,2}) + \\ k(v_{1,x}v_{2,y}- v_{y,1}v_{x,2}). \end{align}$

Apart from the minus sign for the scalar product (inner product), it would allow for some neat vectorial algebra. For example, unlike the cross product, the Hamilton product is associative,

$(v_1v_2)v_3 = v_1(v_2v_3).$

However, as you may have already realized, despite the efforts of Hamilton (Together with others such as Peter Tait) the quaternion system did not have enough compelling arguments to convince contemporaries such as Oliver Heaviside and Josiah Gibbs who were proponents of the vector algebra thought on this class. It may be instructive to realize that the vector algebra is not without its controversy (compare associative multiplication against the BACCAB rule), and if you find certain definitions not logical, than that is likely because they are not, they just happen to work well for some relevant applications.

Thank you history! for the interesting perspective.

## Week 4A: A Leap into the deep

You have already seen how a vector-valued function can be used to describe lines in space. For example, a “Leap into the deep”-like structure can be described in cylindrical coordinates,

$\{r(\gamma),\ \phi(\gamma),\ z(\gamma)\} = \{\frac{3}{2}\gamma \left(\gamma - \pi\right)^2,\ 7\gamma,\ 7\frac{1}{2}\sin(\gamma)\}.$

We can draw the local coordinate system as we “walk” over this line in positive $\gamma$ direction.

But how is this useful? Well, consider the construction drawings of the actual artwork below.

The curve is split into several sections that start out as a straight pipe. In a first step, the curvature is added. Curvature is inversely proportional to the radius of a local circle ($\kappa(\gamma) = \frac{1}{r_c(\gamma)}$) fitted to the curve. It can be computed according to the Frenet-Serret formula,

$\frac{\mathrm{d}\vec{t}}{\mathrm{d}s} = \kappa \vec{n}.$

Where $\vec{t}$ and $\vec{n}$ are the unit tangential and normal vector, respectively, $s$ is the intrinsic parameter, or the path length of the curve $s = s(\gamma) = \int_0^{\gamma} \|\frac{\mathrm{d}\vec{r}(\Gamma)}{\mathrm{d}\Gamma} \|\mathrm{d}\Gamma$. So the curvature is a measure of how much the tangential vector moves in the direction of the normal direction per unit of length along the curve. After the pipes are bend, they will still lay flat on the floor. Some axial twist (i.e. so-called torsion $\tau$) is added, which can also be computed from the paramterization,

$\frac{\mathrm{d}\vec{b}}{\mathrm{d}s} = -\tau \vec{n}.$

Indeed, the torsion is a measure for the movement of the binormal vector away from the (principal) normal vector.

Thank you local coordinate system and vector-function differentiation! for helping me describe these pipes.

## Week 4B: Climbing the “Laplace tent”

On the Laplace square of our campus, i.e. near the parking space between the Traverse building and the Gemini building, sits an interesting tent-like structure. Upon close inspection is combines both circular and triangular arches into one structure. Say you want to climb this structure, but you first want to analyze your challenge. In order to make a proper free-body diagram to access the forces and their directions, you need to know the slope on various places on the roof. If you knew an expression for the unit normal vector ($\vec{n}$), one could compute the angle ($\theta$) with respect to the vertical direction $\vec{e}_z$, using the inner product,

$\cos(\theta) = \vec{n}\cdot\vec{e}_z = n_z.$

We need some description of the surface. It turns out that is consists of four identical sections, the height ($z$) of the roof can be described with a functional relation in first quadrant using the $x,y$ coordinates drawn in the image.

$z(x,y) = \sqrt{R^2-xy} \text{ } \forall \text{ (for all) } x + y<2R \land \text{ (and) } x,y>0,$

with $R$ related to the radius of the aforementioned circular arch. We can compute two tangential vectors that span the tangent plane in $\{x,y,z\}$.

$\vec{t}_1 = \vec{e}_x + \frac{\partial z}{\partial x}\vec{e}_z = \vec{e}_x - \frac{y}{2\sqrt{R^2-xy}}\vec{e}_z,$ $\vec{t}_2 = \vec{e}_y + \frac{\partial z}{\partial y}\vec{e}_z = \vec{e}_y - \frac{x}{2\sqrt{R^2-xy}}\vec{e}_z.$

The (not normalized) normal vector $\vec{N}$ is perpendicular to this plane,

$\vec{N} = \vec{t}_x \times \vec{t}_y = \begin{vmatrix} \vec{e}_x & \vec{e}_y & \vec{e}_z \\ 1 & 0 & t_{1,z} \\ 0 & 1 & t_{2,z} \end{vmatrix} = \frac{y}{2\sqrt{R^2-xy}}\vec{e}_x + \frac{x}{2\sqrt{R^2-xy}}\vec{e}_y + 1\vec{e}_z.$

The unit normal is give by,

$\vec{n} = \frac{\vec{N}}{\|\vec{N}\|}.$

We can workout its z-component value ($n_z$),

$n_z = \frac{1}{\sqrt{1^2 + \left(\frac{y}{2\sqrt{R^2-xy}} \right)^2 + \left(\frac{x}{2\sqrt{R^2-xy}}\right)^2}}.$

Which could be rewritten into a more compact form, but not by a lot. One can see that if $x = y = 0$ we get $n_z = 1$, corresponding to $\cos(\theta) = 1$ and thus $\theta = 0$ (One may stand straight up). However as $x,y \rightarrow R$ the terms in the square roots become zero and $n_z \rightarrow 0$, representing a vertical wall.

Thank you functions of multiple variables! for the help with climbing this structure.