LaTeX

Snippets

$\color{orange}t\in R3$


$t\in R3$

$\vec t\in R^3$


$\stackrel{\to }{t}\in {R}^{3}$

Square root

$\lVert\vec a\rVert=\sqrt{a_1^2+a_2^2+\ldots+a_n^2}$


$‖\stackrel{\to }{a}‖=\sqrt{{a}_{1}^{2}+{a}_{2}^{2}+\dots +{a}_{n}^{2}}$

Fracture and big brackets

$\phi=\arccos\bigg(\frac{\vec a\cdot\vec b}{\lVert\vec a\rVert\cdot\lVert\vec b\rVert}\bigg)$


$\varphi =\mathrm{arccos}\left(\frac{\stackrel{\to }{a}\cdot \stackrel{\to }{b}}{‖\stackrel{\to }{a}‖\cdot ‖\stackrel{\to }{b}‖}\right)$

Matrix/array

$\vec c=\vec a+\vec b=\begin{pmatrix}a_1+b_2\\a_2+b_2\\\ldots\\a_n+b_n\end{pmatrix}$


$\stackrel{\to }{c}=\stackrel{\to }{a}+\stackrel{\to }{b}=\left(\begin{array}{c}{a}_{1}+{b}_{2}\\ {a}_{2}+{b}_{2}\\ \dots \\ {a}_{n}+{b}_{n}\end{array}\right)$

$\vec i=\begin{pmatrix}1\\0\\0\end{pmatrix},\vec j=\begin{pmatrix}0\\1 \\0\end{pmatrix},\vec k=\begin{pmatrix}0\\0\\1\end{pmatrix}$


$\stackrel{\to }{i}=\left(\begin{array}{c}1\\ 0\\ 0\end{array}\right),\stackrel{\to }{j}=\left(\begin{array}{c}0\\ 1\\ 0\end{array}\right),\stackrel{\to }{k}=\left(\begin{array}{c}0\\ 0\\ 1\end{array}\right)$

$\vec i=\begin{array}{}1\\0\\0\end{array},\quad\vec j=\begin{matrix}0\\1 \\0\end{matrix},\quad\vec k=\begin{pmatrix}0\\0\\1\end{pmatrix}$


$\stackrel{\to }{i}=\begin{array}{}1\\ 0\\ 0\end{array},\phantom{\rule{1em}{0ex}}\stackrel{\to }{j}=\begin{array}{c}0\\ 1\\ 0\end{array},\phantom{\rule{1em}{0ex}}\stackrel{\to }{k}=\left(\begin{array}{c}0\\ 0\\ 1\end{array}\right)$

Array with alignment

$\Bigg\{\begin{array}{rcl}100.45&1.44&212.4\\30.32&77.0&99.44\\433.42&787.1&99.441\end{array}\Bigg\}$


$\left\{\begin{array}{rcl}100.45& 1.44& 212.4\\ 30.32& 77.0& 99.44\\ 433.42& 787.1& 99.441\end{array}\right\}$

Sum

$\sum_{j=0}^7j^2\pi$


$\sum _{j=0}^{7}{j}^{2}\pi$

Math Calligraphy

$\langle\,\mathcal{hello,\,HELLO}\,\rangle$


$⟨\phantom{\rule{0.167em}{0ex}}\mathcal{hello}\mathcal{,}\phantom{\rule{0.167em}{0ex}}\mathcal{HELLO}\phantom{\rule{0.167em}{0ex}}⟩$

Dots

$\ldots\,\,\vdots$


$\dots \phantom{\rule{0.167em}{0ex}}\phantom{\rule{0.167em}{0ex}}⋮$

Spacing

$x\!y$


$x\phantom{\rule{-0.167em}{0ex}}y$

$\xy$


$xy$

$x\,y$


$x\phantom{\rule{0.167em}{0ex}}y$

$x\:y$


$x\phantom{\rule{0.222em}{0ex}}y$

$x\;y$


$x\phantom{\rule{0.278em}{0ex}}y$

$x\quad y$


$x\phantom{\rule{1em}{0ex}}y$

$x\quad y$


$x\phantom{\rule{1em}{0ex}}y$

Splitting

$$\begin{split} Area & = \frac{length \times breadth }{2} \\ & = \frac{1}{2} length \times breadth \end{split}$$

$\begin{array}{rl}Area& =\frac{length×breadth}{2}\\ & =\frac{1}{2}length×breadth\end{array}$

Align multiple equations

\begin{align*} 5x - 1y &= 3 \\ 3x + 7y &= 2 \end{align*}

$\begin{array}{rl}5x-1y& =3\\ 3x+7y& =2\end{array}$

Align in columns

\begin{align*} y&=x & a &=z & b&=a+c\\ 5x&=y & 4z&=\frac{4}{2}z & z&=y\\ 4 + 2x&=1+y & q+2&=4+a & we&=cd\\ x&=y & q &=a & c&=a+b\\ \end{align*}

$\begin{array}{rlrlrl}y& =x& a& =z& b& =a+c\\ 5x& =y& 4z& =\frac{4}{2}z& z& =y\\ 4+2x& =1+y& q+2& =4+a& we& =cd\\ x& =y& q& =a& c& =a+b\end{array}$

Centering

$$\begin{gather*} 5x^2 - 15y = 8 \\ 3x^2 + 9y = 7 \end{gather*}$$

$\begin{array}{c}5{x}^{2}-15y=8\\ 3{x}^{2}+9y=7\end{array}$