Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- \documentclass{article}
- \usepackage{mathtools}
- \usepackage{amssymb}
- \usepackage{breqn}
- \usepackage{graphicx}
- \usepackage{listings}
- \usepackage{systeme}
- \usepackage[load-configurations = abbreviations]{siunitx}
- \lstset{basicstyle=\ttfamily}
- \usepackage[margin=1in]{geometry}
- \usepackage{fancyhdr}
- \pagestyle{fancy}
- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- % %
- % Put the Header Stuff Here %
- % %
- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- \chead{Center Header Goes Here}
- \rhead{Right Header Goes Here}
- \newcommand{\proj}[2]{\operatorname{proj}_\mathbf{#2} {\mathbf{#1}}}
- \newcommand{\comp}[2]{\operatorname{comp}_\mathbf{#2} {\mathbf{#1}}}
- \newcommand{\bvec}[1]{\mathbf{#1}}
- \newcommand{\unitvec}[1]{\boldsymbol{\hat{\textbf{#1}}}}
- \newcommand{\dotvec}[2]{\bvec{#1} \cdot \bvec{#2}}
- \newcommand{\crossvec}[2]{\bvec{#1} \times \bvec{#2}}
- \newcommand{\ihat}{\boldsymbol{\hat{\textbf{\i}}}}
- \newcommand{\jhat}{\boldsymbol{\hat{\textbf{\j}}}}
- \newcommand{\khat}{\boldsymbol{\hat{\textbf{k}}}}
- \newcommand{\degrees}{^{\circ}}
- \newcommand{\rotateTwo}[1]{
- \renewcommand\arraystretch{1.5}
- \left( \begin{array}{cc}
- \cos { #1 } & -\sin { #1 } \\
- \sin { #1 } & \cos { #1 }
- \end{array} \right)
- }
- \newcommand{\columnVecTwo}[2]{
- \renewcommand\arraystretch{1.5}
- \left( \begin{array}{c}
- #1 \\ #2
- \end{array} \right)
- }
- \newcommand{\columnVecThree}[3]{
- \renewcommand\arraystretch{1.5}
- \left( \begin{array}{c}
- #1 \\ #2 \\ #3
- \end{array} \right)
- }
- \makeatletter
- \renewcommand*\env@matrix[1][*\c@MaxMatrixCols c]{%
- \hskip -\arraycolsep
- \let\@ifnextchar\new@ifnextchar
- \array{#1}}
- \makeatother
- \newcommand{\grstep}[2][\relax]{%
- \ensuremath{\mathrel{
- {\mathop{\longrightarrow}\limits^{#2\mathstrut}_{
- \begin{subarray}{l} #1 \end{subarray}}}}}}
- \newcommand{\swap}{\leftrightarrows}
- \newcommand{\norm}[1]{\left\lVert#1\right\rVert}
- \newcommand{\modulus}[1]{\left\lvert#1\right\rvert}
- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- % %
- % Actual document starts here %
- % %
- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- \begin{document}
- \section*{Examples}
- \subsection*{Vectors}
- Vectors are bolded
- \begin{align*}
- & \bvec{v}
- \end{align*}
- \subsubsection*{Unit Vectors}
- Unit vectors have a hat over them.
- \begin{align*}
- & \unitvec{v}
- \end{align*}
- %
- % Note: \unitvec does not work properly with i and j unit vectors
- % (see blow)
- %
- \subsubsection*{The $\ihat$, $\jhat$, and $\khat$ Unit Vectors}
- \begin{align*}
- & \ihat + \jhat + \khat
- \end{align*}
- \subsubsection*{Simple Cross and Dot Products}
- \begin{align*}
- & \crossvec{u}{v} = \bvec{w} \\
- & \dotvec{u}{v} = c
- \end{align*}
- \subsubsection*{Vector Projection}
- The component of $\bvec{a}$ onto $\bvec{b}$ is
- \begin{align*}
- & \comp{a}{b}
- \end{align*}
- \subsubsection*{Vector Component}
- The projection of $\bvec{a}$ onto $\bvec{b}$ is
- \begin{align*}
- & \proj{a}{b}
- \end{align*}
- \section*{Rotation}
- \subsection*{Degrees}
- Degrees are not as cool as radians
- \begin{align*}
- & 90\degrees = \dfrac{\pi}{2}
- \end{align*}
- \subsection*{2D Rotation Matrix}
- To rotate a point about the origin by $\dfrac{\pi}{4}$
- \begin{align*}
- & \rotateTwo{\pi/4} = \rotateTwo{45\degrees}
- \end{align*}
- \section{Column Vectors}
- A 2D Column Vector
- \begin{align*}
- & \columnVecTwo{1}{2}
- \end{align*}
- A 3D Column Vector
- \begin{align*}
- & \columnVecThree{1}{2}{3}
- \end{align*}
- \section*{Matrices}
- \subsection*{Augmented Matrix}
- \subsubsection*{Three (centered) columns on the left,
- two (centered) on the right}
- \begin{align*}
- \begin{pmatrix}[ccc|cc]
- a_{11} & a_{12} & a_{13} & c_{11} & c_{12} \\
- a_{21} & a_{22} & a_{23} & c_{21} & c_{22} \\
- a_{31} & a_{32} & a_{33} & c_{31} & c_{32}
- \end{pmatrix}
- \end{align*}
- \subsubsection*{Two (right-aligned) columns on the left,
- one (left-aligned) on the right}
- \begin{align*}
- \begin{pmatrix}[rr|l]
- a_{11} & a_{12} & c_{1} \\
- a_{21} & a_{22} & c_{2} \\
- a_{31} & a_{32} & c_{3}
- \end{pmatrix}
- \end{align*}
- \subsubsection*{Works on Any Kind of Bracketed Matrix}
- \begin{align*}
- \begin{bmatrix}[rr|l]
- a_{11} & a_{12} & c_{1} \\
- a_{21} & a_{22} & c_{2} \\
- a_{31} & a_{32} & c_{3}
- \end{bmatrix}
- \end{align*}
- \subsection*{Gaussian Elimination}
- \begin{align*}
- \begin{pmatrix}[rr|l]
- 0 & 1 & 1 \\
- 1 & 1 & 2
- \end{pmatrix}
- \grstep{R_2 - R_1}
- \begin{pmatrix}[rr|l]
- 0 & 1 & 1 \\
- 1 & 0 & 1
- \end{pmatrix}
- \grstep{R_1 \swap R_2}
- \begin{pmatrix}[rr|l]
- 1 & 0 & 1 \\
- 0 & 1 & 1
- \end{pmatrix}
- \end{align*}
- \section*{Other Stuff}
- \subsection*{Norm}
- \begin{align*}
- & \norm{a}
- \end{align*}
- \subsection*{Modulus}
- \begin{align*}
- & \modulus{a}
- \end{align*}
- \subsection*{Systems of Equations}
- \begin{align*}
- & \systeme{x + y = 2, 3x + 4y = 5} \\ \\
- & \systeme{x + y + z = 5, 10x + 3y + 5z = 12, 2x + 7y + 3z = 15}
- \end{align*}
- \subsubsection*{This Even Works outside of math mode}
- We can solve the system \systeme{x + y = 2, 3x + 4y = 5} with Gaussian
- Elimination.
- \subsection*{How I use Implication Arrows}
- \begin{align*}
- & x + y^2 = 5 \\
- \implies & y^2 = x - 5 \\
- \implies & y = \pm \sqrt{x - 5} \\
- \end{align*}
- \end{document}
Add Comment
Please, Sign In to add comment