## Latex Code Snippets

All the code snippets below should be placed between

tags to produce the output shown.

Curl of a Vector

 (\frac{\partial}{\partial x} \mathbf{i}+\frac{\partial}{\partial y} \mathbf{j}+ \frac{\partial}{\partial k} \mathbf{k}) \times (v_1 \mathbf{i} + v_2 \mathbf{j} + v_3 \mathbf{k})

$(\frac{\partial}{\partial x} \mathbf{i}+ \frac{\partial}{\partial y} \mathbf{j}+ \frac{\partial}{\partial z} \mathbf{k}) \times (v_1 \mathbf{i} + v_2 \mathbf{j} + v_3 \mathbf{k})$

 \left| \begin{array}{ccc} \mathbf{i} & \mathbf{j} & \mathbf{k} \\ \frac{\partial }{\partial x} & \frac{\partial }{\partial y} & \frac{\partial }{\partial z} \\ v_1 & v_2 & v_3 \end{array} \right|

$\left| \begin{array}{ccc} \mathbf{i} & \mathbf{j} & \mathbf{k} \\ \frac{\partial }{\partial x} & \frac{\partial }{\partial y} & \frac{\partial }{\partial z} \\ v_1 & v_2 & v_3 \end{array} \right|$

Cross Product of two Vectors

 \left| \begin{array}{ccc} \mathbf{i} & \mathbf{j} & \mathbf{k} \\ v_1 & v_2 & v_3 \\ w_1 & w_2 & w_3 \end{array} \right|

$\left| \begin{array}{ccc} \mathbf{i} & \mathbf{j} & \mathbf{k} \\ v_1 & v_2 & v_3 \\ w_1 & w_2 & w_3 \end{array} \right|$

Jacobean Matrix

 \left| \begin{array}{ccc} \frac{\partial f}{\partial x} & \frac{\partial g}{\partial x} & \frac{\partial h}{\partial x} \\ \frac{\partial f}{\partial y} & \frac{\partial g}{\partial y} & \frac{\partial h}{\partial y} \\ \frac{\partial f}{\partial z} & \frac{\partial g}{\partial z} & \frac{\partial h}{\partial z} \end{array} \right| = \frac{\partial {f,g,h)}{\partial(x,y,z)}

$\left| \begin{array}{ccc} \frac{\partial f}{\partial x} & \frac{\partial g}{\partial x} & \frac{\partial h}{\partial x} \\ \frac{\partial f}{\partial y} & \frac{\partial g}{\partial y} & \frac{\partial h}{\partial y} \\ \frac{\partial f}{\partial z} & \frac{\partial g}{\partial z} & \frac{\partial h}{\partial z} \end{array} \right| = \frac{\partial (f,g,h)}{\partial (x,y,z)}$

Aligning With an Equals Sign

 \begin{aligned} ds^2 &= d \mathbf{r} \cdot d \mathbf{r} \\ &=(\frac{\partial d \mathbf{r}}{\partial \alpha} d \alpha +\frac{\partial d \mathbf{r}}{\partial \beta} d \beta) \cdot (\frac{\partial d \mathbf{r}}{\partial \alpha} d \alpha +\frac{\partial d \mathbf{r}}{\partial \beta} d \beta) \\ &=\frac{\partial \mathbf{r}}{\partial \alpha} \cdot \frac{\partial \mathbf{r}}{\partial \alpha} d \alpha^2 +2 \frac{\partial \mathbf{r}}{\partial \alpha} \cdot \frac{\partial \mathbf{r}}{\partial \beta} d \alpha d \beta +\frac{\partial \mathbf{r}}{\partial \beta} \cdot \frac{\partial \mathbf{r}}{\partial \beta} d \beta^2 \end{aligned}

\begin{aligned} ds^2 &= d \mathbf{r} \cdot d \mathbf{r} \\ &=(\frac{\partial d \mathbf{r}}{\partial \alpha} d \alpha +\frac{\partial d \mathbf{r}}{\partial \beta} d \beta) \cdot (\frac{\partial d \mathbf{r}}{\partial \alpha} d \alpha +\frac{\partial d \mathbf{r}}{\partial \beta} d \beta) \\ &=\frac{\partial \mathbf{r}}{\partial \alpha} \cdot \frac{\partial \mathbf{r}}{\partial \alpha} d \alpha^2 +2 \frac{\partial \mathbf{r}}{\partial \alpha} \cdot \frac{\partial \mathbf{r}}{\partial \beta} d \alpha d \beta +\frac{\partial \mathbf{r}}{\partial \beta} \cdot \frac{\partial \mathbf{r}}{\partial \beta} d \beta^2 \end{aligned}
.

Curly Brackets Notation for Sets, and Vectors

\left\{ \begin{pmatrix}1\\0\\2\end{pmatrix} , \begin{pmatrix}0\\1\\1\end{pmatrix} \right\}

$\left\{ \begin{pmatrix}1\\0\\2\end{pmatrix} , \begin{pmatrix}0\\1\\1\end{pmatrix} \right\}$

Use of underbrace for Repeated Terms

\mathbf{M}^n =\underbrace{ \mathbf{P} \mathbf{D} \mathbf{P}^{-1} \mathbf{P} \mathbf{D} \mathbf{P}^{-1} ...\mathbf{P} \mathbf{D} \mathbf{P}^{-1}}_{n \: times}=\mathbf{P} \mathbf{D}^n \mathbf{P}^{-1}

$\mathbf{M}^n =\underbrace{ \mathbf{P} \mathbf{D} \mathbf{P}^{-1} \mathbf{P} \mathbf{D} \mathbf{P}^{-1} ...\mathbf{P} \mathbf{D} \mathbf{P}^{-1}}_{n \: times}=\mathbf{P} \mathbf{D}^n \mathbf{P}^{-1}$

Conditional Outcomes

\int \int_S \frac{\mathbf{r} \cdot \mathbf{n}}{r^3} dS = \left\{ \begin{array}{cc} 0 & (0,0,0) \notin S \\ 4 \pi & (0,0,0) \in S \end{array} \right.

$\int \int_S \frac{\mathbf{r} \cdot \mathbf{n}}{r^3} dS = \left\{ \begin{array}{cc} 0 & (0,0,0) \notin S \\ 4 \pi & (0,0,0) \in S \end{array} \right.$

Function defined piecewise

f(x)= \left\{ \begin{array}{c} x \; x \lt 0 \\ 1 \; x=0 \\ x \; x \gt 0  \end{array} \right.

$f(x)= \left\{ \begin{array}{c} x \; x \lt 0 \\ 1 \; x=0 \\ x \; x \gt 0 \end{array} \right.$