%Caleb McWhorter
%May 6, 2016

\documentclass[11pt]{amsart}

%%%%%%%%%%%%%%%%%%%%
%Packages
%%%%%%%%%%%%%%%%%%%%

\usepackage{
amsmath,
enumerate,
graphicx,
hyperref,
lastpage,
verbatim
}

\usepackage[scale=0.75]{geometry}
\geometry{a4paper,headheight=12pt}
\usepackage[all,cmtip]{xy}

\DeclareGraphicsRule{.tif}{png}{.png}{`convert #1 `dirname #1`/`basename #1 .tif`.png}

%%%%%%%%%%%%%%%%%%%%
% Possible Extra Packages (If Needed)
%%%%%%%%%%%%%%%%%%%%

%\usepackage[parfill]{parskip}    % Begin paragraphs with an empty line rather than an indent

%\usepackage{
%amscd,
%amssymb,
%amsfonts,
%amsthm,
%bbm,
%caption,
%epstopdf,
%epsfig,
%epstopdf,
%float,
%layout,
%lipsum,
%longtable,
%multicol,
%setspace,
%subcaption
%}

%%%%%%%%%%%%%%%%%%%
% Tikz & Tikz-Cd Packages
%%%%%%%%%%%%%%%%%%%

\usepackage{tikz}
\usetikzlibrary{calc,matrix,arrows,shapes.geometric,positioning,decorations.pathmorphing}
\usepackage{tikz-cd}
\usepackage{tkz-euclide}
\usepackage{pgfplots}
\pgfplotsset{compat=1.8}
\usepgfplotslibrary{polar}
\usepgflibrary{shapes.geometric}
\usetikzlibrary{calc}
\pgfplotsset{my style/.append style={axis x line=middle, axis y line=middle, xlabel={$x$}, ylabel={$y$}, axis equal}}
\tikzset{snake it/.style={-stealth,
decoration={snake, 
    amplitude = .4mm,
    segment length = 2mm,
    post length=0.9mm},decorate}}

%%%%%%%%%%%%%%%%%%%%
% Hyperref
%%%%%%%%%%%%%%%%%%%%

%This code should go after hyperref if it is loaded.
%\usepackage{xpatch}
%\makeatletter
%\xapptocmd{\@sect}{\csname #1mark\endcsname{#7}}{}{}
%\makeatother   

%%%%%%%%%%%%%%%%%%%%
% Commands
%%%%%%%%%%%%%%%%%%%%

\DeclareMathOperator{\coker}{coker}
\DeclareMathOperator{\Hom}{Hom}
\DeclareMathOperator{\im}{im}
%\newcommand\newsim{\rotatebox[origin=c]{90}{\sim}}
\newcommand{\ma}[1]{\stackrel{#1}{\longrightarrow}}

\newcommand*\pp{{\rlap{\('\)}}}

%%%%%%%%%%%%%%%%%%%%
% Fonts
%%%%%%%%%%%%%%%%%%%%

\usepackage[bitstream-charter]{mathdesign}
\usepackage[T1]{fontenc}

%%%%%%%%%%%%%%%%%%%%
% Header & Footers
%%%%%%%%%%%%%%%%%%%%

%Header Packages
\usepackage{fancyhdr}
\pagestyle{fancy}

\fancyhf{} %Clears headers & footers.
\setlength{\headheight}{17pt}

%Headers
\fancyhead[L]{\Large }
\fancyhead[C]{\Large LaTex Samples}
\fancyhead[R]{\Large }
\renewcommand{\headrulewidth}{0.4pt}
%Footers
\fancyfoot[L]{}
\fancyfoot[C]{}
\fancyfoot[R]{\thepage \,of \pageref{LastPage}}
\renewcommand{\footrulewidth}{0.4pt}

%%%%%%%%%%%%%%%%%%%%
% Content
%%%%%%%%%%%%%%%%%%%%

\begin{document}
\thispagestyle{fancy} %To override title page format. 

This document contains many examples of various TeX commands. The examples were not coded in the shortest or most efficient manner. Instead, they were coded in the simplest manner for a person beginning in TeX to follow -- a starting point. \\

%Diagram 1
\noindent \textbf{Diagram 1:}
\[
\begin{tikzcd}
V \arrow[out=0,in=90,loop]{}
\end{tikzcd}
\]

%Diagram 2
\noindent \textbf{Diagram 2:}
\[
\underbrace{M_i \ma{k_i} M \ma{\pi_j} M_j}_{f_{ji} \stackrel{\text{def}}{=} \pi_j f k_i}
\]

%Diagram 3
\noindent \textbf{Diagram 3:}
\[
\begin{tikzcd}
\mathbb{Z} \arrow{r}{r} & \mathbb{Q} \arrow[yshift=1ex]{r}{g_1} \arrow[yshift=-1ex]{r}{g_2} & A
\end{tikzcd}
\]

%Diagram 4
\noindent \textbf{Diagram 4:}
\[
0 \longrightarrow A \stackrel{f}{\longrightarrow} B \stackrel{g}{\longrightarrow} C \longrightarrow 0
\]

%Diagram 5
\noindent \textbf{Diagram 5:}
\[
\cdots \ma{} P^{n+1} \ma{d^{n+1}} P^n \ma{d^n} \cdots \ma{d^2} P^1 \ma{d^1} P^0 \ma{d^0} M \ma{} 0
\]

%Diagram 6
\noindent \textbf{Diagram 6:}
\[
\cdots \ma{} \underbrace{0}_{\text{3-dimensional}} \ma{} \underbrace{0}_{\text{2-dimensional}} \ma{\partial_2} \underbrace{\mathbb{Z} u \oplus \mathbb{Z} v \oplus \mathbb{Z}w}_{\text{1-dimensional}} \ma{\partial_1} \underbrace{\mathbb{Z} a \oplus \mathbb{Z} b \oplus \mathbb{Z} c}_{\text{0-dimensional}} \ma{\partial_0} \underbrace{0}_{\text{(-1)-dimensional}}
\]

%Diagram 7
\noindent \textbf{Diagram 7:}
\[
\begin{tikzcd}
\; & \;& M \arrow[dotted,swap]{dl}{s} \arrow{d}{h} & \; & \; \\
0 \arrow{r} & A \arrow{r}{f} & B \arrow{r}{g} & C \arrow{r} & 0
\end{tikzcd}
\]

%Diagram 8
\noindent \textbf{Diagram 8:}
\[
\begin{tikzcd}
0 \arrow{r} & A \arrow{r}{f} \arrow{d}{\alpha} & B \arrow{r}{g} \arrow{d}{\beta} & C \arrow{r} \arrow{d}{\gamma} & 0 \\
0 \arrow{r} & A' \arrow{r}{f'} & B' \arrow{r}{g'} & C' \arrow{r} & 0
\end{tikzcd}
\]

%Diagram 9
\noindent \textbf{Diagram 9:}
\[
\begin{tikzcd}
0 \arrow{r} & A \arrow[shift left=1.5ex]{d}{f} \arrow{r} & B \arrow[shift left=1.5ex]{d}{g} \arrow{r} & C \arrow[shift left=1.5ex]{d}{h} \arrow{r} & 0 \\
0 \arrow{r} & A' \arrow{u}{f^{-1}} \arrow{r} & B' \arrow{u}{g^{-1}} \arrow{r} & C \arrow{u}{h^{-1}} \arrow{r} & 0
\end{tikzcd}
\]

%Diagram 10
\noindent \textbf{Diagram 10:}
\[
\begin{tikzcd}
A \arrow{r}{f} \arrow{d}{\alpha} & B \arrow{r}{g} \arrow{d}{\beta} & C \arrow{r} \arrow[dotted]{d}{h} & 0 \\
A' \arrow{r}{f'} & B' \arrow{r}{g'} & C' \arrow{r} & 0
\end{tikzcd}
\]

%Diagram 11
\noindent \textbf{Diagram 11:}
\[
\begin{tikzcd}
V_i \arrow{d}{h_i} \arrow{r}{f_{\alpha_1}} & V_{i_1} \arrow{d}{h_{i_1}} \arrow{r}{f_{\alpha_2}} & \cdots \arrow{r}{f_{\alpha_{\varphi-1}}} & V_{i_{\varphi-1}} \arrow{r}{f_{\alpha_\varphi}} \arrow{d}{h_{i_{\varphi-1}}} & V_\varphi \arrow{d}{h_\varphi} \\
W_i \arrow{r} & W_{i_1} \arrow{r} & \cdots \arrow{r} & W_{i_{\varphi-1}} \arrow{r} & W_\varphi
\end{tikzcd}
\]

%Diagram 12
\noindent \textbf{Diagram 12:}
\[
\begin{tikzcd}
0 \arrow{r} & S_1 \arrow{d}{\sim} & S_1 \oplus \cdots \oplus S_n \arrow{d}{\sim} \arrow{r} & S_2 \oplus \cdots \oplus S_n \arrow[dotted]{d}{\exists !} \arrow{r} & 0 \\
0 \arrow{r} & T_1 & T_1 \oplus \cdots \oplus T_n \arrow{r} & T_2 \oplus \cdots \oplus T_s \arrow{r} & 0 
\end{tikzcd}
\]

%Diagram 13
\noindent \textbf{Diagram 13:}
\[
\begin{tikzcd}
\xi: & 0 \arrow{r} & A \arrow{d}{=} \arrow{r} & X_n \arrow{r} \arrow{d}{\alpha_n} & \cdots \arrow{r} & X_1 \arrow{d}{\alpha_1} \arrow{r} & C \arrow{d}{=} \arrow{r} & 0 \\
\xi': & 0 \arrow{r} & A \arrow{r} & X_n' \arrow{r} & \cdots \arrow{r} & X_1' \arrow{r} & C \arrow{r} & 0 
\end{tikzcd}
\]

%Diagram 14
\noindent \textbf{Diagram 14:}
\[
\begin{tikzcd}
B \arrow[dotted]{rr}{\varphi}
 \arrow[swap]{dr}{\varphi_i}
 &                & P \arrow{dl}{\pi_i} \\
 & A_i & 
\end{tikzcd}
\]

%Diagram 15
\noindent \textbf{Diagram 15:}
\[
\begin{tikzcd}
  \hspace{0.1cm} & P \arrow[swap]{dl}{\pi_1} \arrow{dr}{\pi_2} \arrow{d}{\varphi} & \\
 A_1 & B \arrow{l}{\varphi_1} \arrow[swap]{r}{\varphi_2} & A_2
\end{tikzcd}
\]

%Diagram 16
\noindent \textbf{Diagram 16:}
\[
\begin{tikzcd}
A_i \arrow{r}{\varphi_i} \arrow[swap]{dr}{\tau_i} & B \\
 &  A_1 \times A_2 \times \cdots \arrow[swap]{u}{\varphi} \supset S
\end{tikzcd}
\]

%Diagram 17
\noindent \textbf{Diagram 17:}
\[
\begin{tikzcd}
X \arrow{r}{\beta} & Y \arrow{r}{\gamma} \arrow[swap]{d}{\alpha} & Z \arrow[dotted]{dl}{s} \\
& T & 
\end{tikzcd}
\]

%Diagram 19
\noindent \textbf{Diagram 19:}
\[
\begin{tikzcd}
A \arrow[hook]{r} \arrow[swap]{d}{f} & A' \arrow[hook]{r} \arrow{dl}{f'} & B \\
E
\end{tikzcd}
\]

%Diagram 20
\noindent \textbf{Diagram 20:}
\[
\begin{tikzcd}
B \arrow{r}{g} & C \arrow{r} & 0 \\
& P \arrow[swap]{u}{f} & \\
& F=P\oplus Q \arrow[swap]{u}{\pi_P} \arrow[dotted]{uul}{\overline{h}}
\end{tikzcd}
\]  

%Diagram 21
\noindent \textbf{Diagram 21:}
\[
\begin{tikzcd}
B \arrow{r}{g} & C \arrow{r} & 0 \\
& \bigoplus_{i \in \mathcal{I}} P_i \arrow[dotted]{ul}{h} \arrow[swap]{u}{f} \\
& P_i \arrow[swap]{u}{k_i} \arrow[dotted]{uul}{h_i}
\end{tikzcd}
\]

%Diagram 22
\noindent \textbf{Diagram 22:}
\[
\begin{tikzcd}
0 \arrow{r} & A \arrow[swap]{d}{f} \arrow{r}{j} & B \arrow[dotted,swap]{dl}{\exists g_i} \arrow[dotted]{ddl}{\exists f} \\
&  E_i \arrow[hook]{d} & \\
&\prod E_i &
\end{tikzcd}
\]

%Diagram 23
\noindent \textbf{Diagram 23:}
\[
\begin{tikzcd}
 \;  &  \;  & A \times B \arrow{dr}{f} \arrow[hookrightarrow]{d} &   &   \\
0 \arrow{r} & S \arrow{r} & F \arrow{r} \arrow[shift right=1ex]{d}{g} \arrow[dotted, shift left=1ex]{d}{\exists! \overline{g}} & A \otimes B \arrow{r} \arrow[dotted]{dl}{\exists! h} & 0 \\
   &    & G &   &   \\
\end{tikzcd}
\]

%Diagram 24
\noindent \textbf{Diagram 24:}
\[
\begin{tikzcd}
B \arrow{r}{f} & C \arrow{r} & 0 \\
& P \arrow{u}{g} \arrow[dotted]{ul}{\exists h} \arrow[xshift=0.5ex]{d}{i} & \\
& F=P\oplus Q \arrow[xshift=-0.5ex]{u}{\pi} \arrow[dotted,yshift=-1ex]{uul}{\overline{h}}
\end{tikzcd}
\]

%Diagram 25
\noindent \textbf{Diagram 25:}
\[
\begin{tikzcd}
L \arrow{r}{\varphi} \arrow[swap]{d}{\psi} & N \arrow[swap]{d}{\beta} \arrow{ddr}{\beta'} &  \\
M \arrow{r}{\alpha} \arrow[swap]{drr}{\alpha'} & D \arrow[dotted]{dr}{\theta} &  \\
 &  & Y \\
\end{tikzcd}
\]

%Diagram 26
\noindent \textbf{Diagram 26:}
\[
\begin{tikzcd}
X \arrow{drr}{\alpha'} \arrow[dotted,swap]{dr}{\theta} \arrow[swap]{ddr}{\beta'} & & \\
& D \arrow{r}{\alpha} \arrow{d}{\beta} & C \arrow{d}{g} \\
& B \arrow[swap]{r}{f} & A
\end{tikzcd}
\]

%Diagram 27
\noindent \textbf{Diagram 27:}
\[
\begin{tikzcd}
0 \arrow{r} & R \arrow{r}{f=\begin{bmatrix} y \\ -x \end{bmatrix}} & R^2 \arrow{r}{[x\;\;y]} \arrow{d} & R \arrow{r}{\pi} & M \arrow{r} & 0 \\
 & K \arrow[swap]{ru}{f} & (x,y) \arrow{ur} & & & \\
 & 0 \arrow{ur} & & & & 
\end{tikzcd}
\]

%Diagram 28
\noindent \textbf{Diagram 28:}
\[
\begin{tikzcd}
\im f \arrow[swap]{dr}{i} \arrow{drr}{0} & & \\
& C \arrow{r}{c} & D \\
B \arrow[dotted]{uu}{\pi} \arrow{ur}{f} \arrow[swap]{urr}{0} & & 
\end{tikzcd}
\]

%Diagram 29
\noindent \textbf{Diagram 29:}
\[
\begin{tikzcd}
\; & X'' \arrow[swap]{dl}{sm} \arrow{dr}{sm} & \\
X & X'' \arrow{u}{1} \arrow{r}{sm} \arrow[swap]{l}{sm} \arrow{d}{sm} & X \\
\; & X \arrow{ul}{1} \arrow[swap]{ur}{1} & 
\end{tikzcd}
\]

%Diagram 30
\noindent \textbf{Diagram 30:}
\[
\begin{tikzcd}[ampersand replacement=\&]
V_i \oplus W_i \arrow{r}{\begin{bmatrix} f_\alpha & 0 \\ 0 & g_\alpha \end{bmatrix}} \& V_j \oplus W_j 
\end{tikzcd}
\]

%Diagram 31
\noindent \textbf{Diagram 31:}
\[
\begin{tikzcd}[ampersand replacement=\&]
V_1 \oplus W_1 \arrow[swap]{dr}{\begin{bmatrix} f_1 & 0 \\ 0 & g_1 \end{bmatrix}} \& \& V_2 \oplus W_2 \arrow{dl}{\begin{bmatrix} f_2 & 0 \\ 0 & g_2 \end{bmatrix}} \\
\& V \oplus W \& 
\end{tikzcd}
\]

%Diagram 32
\noindent \textbf{Diagram 32:}
\[
\begin{tikzcd}
 \phantom{x} & B' \arrow[dotted]{dr}{g} \arrow[crossing over]{ddl}{\gamma} & \\
 C' \arrow{d}{\beta} \arrow[dotted]{ur}{f} & & A' \arrow{ll}{j[1]i} \arrow{ddl}{i} \\
 A\arrow{dr}{u} \arrow[crossing over]{rr}{vu} & & C \arrow{u}{x} \arrow[crossing over]{uul}{y} \\
 & B' \arrow{uul}{j} \arrow{ur}{v} & \\
\end{tikzcd}
\]

%Diagram 33
\noindent \textbf{Diagram 33:}
\[
\begin{tikzcd}
B \arrow[dotted]{r}{\varphi} \arrow[yshift=3]{dr}{\varphi_\alpha} & P \arrow{d}{\pi_i} \\
S \arrow{u}{\varphi} & A_\alpha \arrow{l}{\tau_i} \arrow[yshift=-3]{ul}{\varphi_i}
\end{tikzcd}
\]

%Diagram 34
\noindent \textbf{Diagram 34:}
\[
\begin{tikzcd}
A \arrow[yshift=1ex]{r}{i_A} & M=A \oplus C \arrow[yshift=-1ex]{l}{\pi_A} \arrow[shift left=1ex]{d}{\pi_C} \\
 & C \arrow[shift left=1ex]{u}{i_C}
\end{tikzcd}
\]

%Diagram 35
\noindent \textbf{Diagram 35:}
\[
\begin{tikzcd}
K_\alpha \arrow{r}{i_\alpha} \arrow[dotted,swap]{d}{h} & X \arrow{r}{\alpha} \arrow{d}{j} \arrow[dotted,swap]{dl}{\overline{h}} & Y \arrow{d}{k} \\
K_\beta \arrow{r}{i_\beta} & Z \arrow{r}{\beta} & W
\end{tikzcd}
\]

%Diagram 36
\noindent \textbf{Diagram 36:}
\[
\begin{tikzcd}
\Hom_S(A \otimes B,C) \arrow{r}{\varphi_{A,B,C}} \arrow{d}{1_R \otimes g} & \Hom_R(A,\Hom_S(B,C)) \arrow{d}{g} \\
\Hom_S(A \otimes B,C') \arrow{r}{\varphi_{A,B,C'}} & \Hom_R(A,\Hom_S(B,C')) 
\end{tikzcd}
\]

%Diagram 37
\noindent \textbf{Diagram 37:}
\[
\begin{tikzpicture}
\matrix (m) [matrix of nodes, row sep=3em,
column sep=3em, text height=1.5ex, text depth=0.25ex]
{ $B$ & $C$  \\
  $B'$ & $C'$ \\ };
\path[->]
(m-1-1) edge node[above] {$g$} (m-1-2)
             edge node[left] {$\beta$} (m-2-1)
             edge [bend left=90, looseness=2,snake it] (m-2-2)
             edge [bend right=90, looseness=2, snake it] (m-2-2);
\path[->]
(m-1-2) edge node[right] {$\gamma$} (m-2-2);
\path[->]
(m-2-1)  edge node[below] {$g'$} (m-2-2);
\end{tikzpicture}
\]

%Diagram 38
\noindent \textbf{Diagram 38:}
\[
\begin{tikzcd}
P \arrow{dr}{f} & & 0 \\
& M \arrow{ru} \arrow{dr} & \\
Q \arrow{ru}{g} \arrow{uu}{h}  & & 0  
\end{tikzcd}
\]

%Diagram 39
\noindent \textbf{Diagram 39:}
\[
\begin{tikzcd}
M \arrow{dr}{n} & & & & & N \arrow{dr}{m} & & \\ 
 & N \arrow{dr}{m} & & & & & M \arrow{dr}{n} & \\
M_i \arrow{ur}{g} \arrow{rr}{f} \arrow{uu}{f} & & M & & & M_i \arrow{uu}{g} \arrow{ur}{f} \arrow{rr}{g} & & N \\
\end{tikzcd}
\]

%Diagram 40
\noindent \textbf{Diagram 40:}
\[
\begin{tikzcd}
M_1 \arrow[bend left=50]{rrd}{f_1} \arrow{dr}{i_1} \arrow[swap]{dd}{\varphi} & & \\
& L \arrow[dotted]{r}{\exists! f} & T  \\
M_2 \arrow[swap]{ur}{i_2} \arrow[bend right=50,swap]{rru}{f_2} & & 
\end{tikzcd}
\]

%Diagram 41
\noindent \textbf{Diagram 41:}
\[
\begin{tikzcd}
S^{-1}R \arrow{rr}{\varphi} & & X\\
& R_i \arrow{ul}{m_i} \arrow[swap]{ur}{g_i} \arrow{d}{f^{j-i}} & \\
 & R_j \arrow[bend left=50]{uul}{m_j} \arrow[bend right=50,swap]{uur}{g_j} & 
\end{tikzcd}
\]

%Diagram 42
\noindent \textbf{Diagram 42:}
\[
\begin{tikzcd}
\varinjlim M_i \arrow[dotted]{rr}{\theta} & & X \\
& M_i \arrow{ul}{\alpha_i} \arrow[swap]{ur}{f_i} \arrow{d}{\varphi_j^i} & \\
& \arrow[bend left = 50]{uul}{\alpha_j} M_j  \arrow[bend right=50ex,swap]{uur}{f_j} & 
\end{tikzcd}
\]

%Diagram 43
\noindent \textbf{Diagram 43:}
\[
\begin{tikzcd}
\varinjlim M_i \arrow[dotted,yshift=1ex]{rr}{\theta}& & \overline{\varinjlim M_i} \arrow[dotted,yshift=-1ex]{ll}{\overline{\theta}}\\
& M_i \arrow{ul}{\alpha_i} \arrow[swap]{ur}{\beta_i} \arrow{d}{\varphi^i_j} & \\
& M_j \arrow[bend left=50]{uul}{\alpha_j} \arrow[bend right=50,swap]{uur}{\beta_j} & 
\end{tikzcd}
\] 

%Diagram 44
\noindent \textbf{Diagram 44:}
\[
\begin{tikzcd}
C(vu) \arrow{dr} \arrow[dotted,bend left=50]{rrrr}{g} & & C \arrow{ll} \arrow{rr} & & C(v) \arrow{dl} \arrow[bend left=50]{ddll}{(j[1] \circ i)[1]} \\
& A \arrow[swap]{rr}{u} \arrow{ur}{vu} & & B  \arrow{dl} \arrow[swap]{ul}{v} & \\
& & C(u) \arrow[dotted,bend left=50]{uull}{f} \arrow{ul} & & 
\end{tikzcd}
\]

%Diagram 45
\noindent \textbf{Diagram 45:}
\[
\begin{tikzcd}
C' \arrow[bend right=50,swap]{ddrr}{\exists f} \arrow[swap]{dr}{\beta} & & B \arrow[swap]{ll}{j} \arrow{dr}{v} & & A' \arrow[swap]{ll}{i} \arrow[bend right=40,swap]{llll}{j[1]i} \\
 & A \arrow{ur}{u} \arrow{rr}{vu} &  & C \arrow[swap]{ur}{x} \arrow{dl}{y} &  \\
 & & B' \arrow{ul}{\gamma} \arrow[bend right=50,swap]{rruu}{\exists g} & &  \\
\end{tikzcd}
\]

%Diagram 46
\noindent \textbf{Diagram 46:}
\[
\begin{tikzcd}
\; & Z^C_{n+1} \arrow[hook]{d} & Z^C_n \arrow[hook]{d} & Z^C_{n-1} \arrow[hook]{d} & \\
\cdots \arrow{r} & C_{n+1} \arrow{d}{f_{n+1}} \arrow{r}{\delta_{n+1}} & C_n \arrow{d}{f_n} \arrow{r}{\delta_n} & C_{n-1} \arrow{d}{f_{n-1}} \arrow{r}{\delta_{n-1}} & \cdots \\
\cdots \arrow{r} & D_{n+1} \arrow{r}{\overline{\delta}_{n+1}} & D_n \arrow{r}{\overline{\delta}_n} & D_{n-1} \arrow{r}{\overline{\delta}_{n-1}} & \cdots  \\
& Z^D_{n+1} \arrow[hook]{u} & Z^D_n \arrow[hook]{u} & Z^D_{n-1} \arrow[hook]{u} & 
\end{tikzcd}
\]

%Diagram 47
\noindent \textbf{Diagram 47:}
\[
\begin{tikzcd}
\phantom{x}  & \vdots \arrow{d} & \vdots \arrow{d} & \vdots \arrow{d}  & \\
0 \arrow{r} & P' \arrow{d} \arrow{r} & P_1' \oplus P_1'' \arrow{d} \arrow{r} & P_1'' \arrow{d} & \\
0 \arrow{r} & P_0' \arrow{d}{\epsilon'} \arrow{r}{i_1} & P_0' \oplus P_0'' \arrow[dotted]{d} \arrow{r}{\pi_2} & P_0'' \arrow{r} \arrow{d}{\epsilon''} \arrow[dotted]{dl}{\theta} & 0 \\
0 \arrow{r} & M' \arrow{d} \arrow{r}{i} & M \arrow{r}{\pi} & M'' \arrow{d} \arrow{r}& 0 \\
& 0 & & 0 & 
\end{tikzcd}
\]

%Diagram 48
\noindent \textbf{Diagram 48:}
\[
\begin{tikzcd}
\; & 0 \arrow{d} & 0 \arrow{d} & 0 \arrow{d} & \\
0 \arrow[dotted]{r} & \ker f \arrow{d} \arrow[dotted]{r} & \ker g \arrow{d} \arrow[dotted]{r} & \ker h \arrow{d} & \\
0 \arrow{r} &  A \arrow{d} \arrow{r} & B \arrow{d} \arrow{r} & C \arrow{d} \arrow{r} & 0 \\
0 \arrow{r} & A' \arrow{d} \arrow{r} & B' \arrow{d} \arrow{r} & C' \arrow{r} \arrow{d} & 0 \\
 & \coker f \arrow[dotted]{r} \arrow{d} & \coker g \arrow[dotted]{r} \arrow{d} & \coker h \arrow[dotted]{r} \arrow{d} & 0 \\
 & 0 & 0 & 0 & 
\end{tikzcd}
\]

%Diagram 49
\noindent \textbf{Diagram 49:}
\[
  \xymatrix@!R{
                & 0                  & 0                  & 0                      \\
0 \ar@{-->}[r]  & {\ker(a)} \ar[r]   & {\ker(b)} \ar[r]   & {\ker(c)}
                \ar@{-}`r[d]`[d]^\delta[d] % curved arrow 1
                                                                               & \\
0 \ar@{-->}[r]  & A    \ar[r]^{f}    & B  \ar[r]^{g}      & C \ar[r]
                 \ar@{}+<0.6cm,0cm>="p1"  %intersection point 1
                                                                               & 0 \\
0 \ar[r]        & A\pp \ar[r]^{f'}
                 \ar@{}[l]+<1cm,0cm>="p2" %intersection point 2
                 \ar`_l[l]+<1.03cm,0cm>`[d]`[d][d] % curved arrow 2
                               & B\pp \ar[r]^{g'}   & C\pp \ar@{-->}[r]        & 0 \\
          & {\coker(a)} \ar[r] & {\coker(b)} \ar[r] & {\coker(c)} \ar@{-->}[r] & 0 \\
          & 0                  & 0                  & 0                            \\
% vertical arrows
\ar"1,2";"2,2"   \ar"1,3";"2,3"     \ar"1,4";"2,4"
\ar"2,2";"3,2"   \ar"2,3";"3,3"     \ar"2,4";"3,4"
\ar"3,2";"4,2"^a \ar"3,3";"4,3"^<<b \ar"3,4";"4,4"^c
\ar"4,2";"5,2"   \ar"4,3";"5,3"     \ar"4,4";"5,4"
\ar"5,2";"6,2"   \ar"5,3";"6,3"     \ar"5,4";"6,4"
% diagonal arrow, with 1 hole
\ar@{-}"p1";"p2"|!{"2,3";"3,3"}\hole
}
\]

%Diagram 50
\noindent \textbf{Diagram 50:}
\[
\begin{tikzpicture}[descr/.style={fill=white,inner sep=1.5pt}]
        \matrix (m) [
            matrix of math nodes,
            row sep=1em,
            column sep=2.5em,
            text height=1.5ex, text depth=0.25ex
        ]
        { 0 & H^0(\mathcal A) & H^0(\mathcal B) & H^0(\mathcal C) \\
            & H^1(\mathcal A) & H^1(\mathcal B) & H^1(\mathcal C) \\
            & H^2(\mathcal A) & H^2(\mathcal B) & H^2(\mathcal C) \\
            & \mbox{}         &                 & \mbox{}         \\
            & H^n(\mathcal A) & H^n(\mathcal B) & H^n(\mathcal C) \\
        };

        \path[overlay,->, font=\scriptsize,>=latex]
        (m-1-1) edge (m-1-2)
        (m-1-2) edge (m-1-3)
        (m-1-3) edge (m-1-4)
        (m-1-4) edge[out=355,in=175] node[descr,yshift=0.3ex] {$\alpha^0$} (m-2-2)
        (m-2-2) edge (m-2-3)
        (m-2-3) edge (m-2-4)
        (m-2-4) edge[out=355,in=175] node[descr,yshift=0.3ex] {$\alpha^1$} (m-3-2)
        (m-3-2) edge (m-3-3)
        (m-3-3) edge (m-3-4)
        (m-3-4) edge[out=355,in=175,dashed] (m-5-2)
        (m-5-2) edge (m-5-3)
        (m-5-3) edge (m-5-4);
\end{tikzpicture}
\]

%Diagram 51
\noindent \textbf{Diagram 51:}
\[
\begin{tikzcd}
  A^0 \rar & B^0 \rar & C^0 \ar[out=-30, in=150]{dll} \\
  A^1 \rar & B^1 \rar & C^1 \ar[out=0, in=180]{dll} \\
  A^2 \rar & B^2 \rar & C^2 \ar[out=0, in=180, looseness=2]{dll}\\
  A^3 \rar & B^3 \rar & C^3 \ar[out=0, in=180, looseness=3]{dll}\\
  A^4 \rar & \cdots   &
\end{tikzcd}
\]

%Diagram 52
\noindent \textbf{Diagram 52:}
\[
\begin{tikzcd}
  \cdots \rar   & L_{n+1}F(M') \rar & L_{n+1}F(M) \rar & L_{n+1}F(M'')
          \ar[out=0, in=180, looseness=2, overlay]{dll}{\delta_{n+1}}   & \\
        & L_nF(M') \rar & L_nF(M) \rar & L_nF(M'')
          \ar[out=0, in=180, looseness=2, overlay]{dll}{\delta_n}   & \\
        & L_{n-1}F(M') \rar & L_{n-1}F(M) \rar & \cdots
          \ar[out=0, in=180, looseness=2, overlay]{dll}{\delta_1}   & \\
        & L_0F(M')  \rar & L_0F(M)\rar & L_0F(M'') \rar & 0
\end{tikzcd}
\]

%Diagram 53
\noindent \textbf{Diagram 53:}
\[
\begin{split}
\mathcal{J}(M/N)&=\left\{\sum_{\text{finite}} x_i(m_i+N)\;|\; x_i \in \mathcal{J},m_i \in M \right\} \\
&=\left\{\sum x_im_i+N \;|\; x_i \in \mathcal{J},m_i \in M \right\} \\
&=(\mathcal{J}M+N)/N \\
&= M/N
\end{split}
\]

%Diagram 54
\noindent \textbf{Diagram 54:}
\[
\underbrace{R/\mathcal{J} \oplus R/\mathcal{J} \oplus \cdots \oplus R/\mathcal{J}}_{n \text{ copies}} \cong R^n/\mathcal{J}(R^n)
\]

%Diagram 55
\noindent \textbf{Diagram 55:}
\[
0\leq \limsup E_k = \left| \bigcap_{n=1}^\infty \bigcup_{k=n}^\infty E_k \right| \leq \left| \bigcup_{k=n}^\infty E_k \right|_e \leq \sum_{n=N}^\infty |E_k|_e < \epsilon
\]

%Diagram 56
\noindent \textbf{Diagram 56:}
\[
p(\lambda)=\text{det }(\lambda I-T)=
\begin{pmatrix}
\lambda & 0 & 0 & \cdots & 0 & 0 & -a_1 \\
-1 & \lambda & 0 & \cdots & 0 & 0 & -a_2 \\
0 & -1 & \lambda & \cdots & 0 & 0 & -a_3 \\
0 & 0 & -1 & \cdots & 0 & 0 & a_4 \\
\vdots & \vdots & \vdots & \ddots & \vdots & \vdots & \vdots \\
0 & 0 & 0 & \cdots & -1 & \lambda & -a_{n-1} \\
0 & 0 & 0 & \cdots & 0 & -1 & \lambda 
\end{pmatrix}
\]

%Diagram 57
\noindent \textbf{Diagram 57:}
\[
\begin{pmatrix}
a_{1,1} & a_{1,2} & \cdots & \cdots & a_{1,n} \\
a_{2,1} & a_{2,2} & \cdots & \cdots & a_{2,n} \\
\vdots & & \ddots &  & \vdots  \\
a_{n,1} & a_{n,2} & \cdots & \cdots & a_{n,n}
\end{pmatrix}
\]

%Diagram 58
\noindent \textbf{Diagram 58:}
\[
\iiint_V \frac{\partial \mathbf{F}_i}{\partial x_i} \; dV = \oiint_S \mathbf{F}_i n_i \; dS
\]

%Diagram 59
\noindent \textbf{Diagram 59:}
\[
f^{-1}(n)= \frac{-1}{f(1)} \sum_{\substack{d \mid n \\ d<n}} f\left(\frac{n}{d}\right) f^{-1}(d) \text{ for }n>1
\]

\newpage
%Diagram 60
\noindent \textbf{Diagram 60:}
\[
\sum_{d \mid n} \mu(d)= \left[ \frac{1}{n} \right] = 
\begin{cases}
1, & \text{if }n=1 \\
0, & \text{if } n>1
\end{cases}
\]

%Diagram 61
\noindent \textbf{Diagram 61:}
\[
f(x)=
\begin{cases}
2x+2, & \hspace{0.6cm} x \leq -2 \\
2, & -2<x \leq 2 \\
\frac{1}{2}x+3, & \hspace{0.6cm} 2<x
\end{cases}
\]

\begin{enumerate}[(a)]
\item This is (a)
\item This is (b)
\item This is (c)
\end{enumerate}

\begin{enumerate}[(1.)]
\item This is (1)
\item This is (2)
\item This is (3)
\end{enumerate}

\begin{enumerate}[(1)]
\item First part.
    \begin{enumerate}[(a)]
    \item Here is a subpart.
    \end{enumerate}
\item Final part.
\end{enumerate}

\begin{enumerate}
\item[Part Red:] Something
\item[Part Blue:] Something
\item[Part Green:] Something
\end{enumerate}

\newpage

\begin{verbatim} Demonstrating LaTex within LaTex: \int x \; dx = \dfrac{x^2}{2} + C \end{verbatim}

\[
\begin{split}
0= \frac{\partial^2}{\partial \eta_i^2} \; 1 &= \frac{\partial^2}{\partial \eta_i^2} \int \;h(x) \; \text{exp}\left(\sum \eta_it_i(x)- \overline{c}(\eta)\right) \; dx \\
&=\int h(x) \; \frac{\partial^2}{\partial \eta_i^2} \; \text{exp}\left(\sum \eta_it_i(x)- \overline{c}(\eta)\right) \; dx \\
&=\int h(x) \; \frac{\partial}{\partial \eta_i} \; \left( \left( t_i - \frac{\partial}{\partial \eta_i} \overline{c}(\eta) \right) \text{exp}\left((\sum \eta_it_i(x)- \overline{c}(\eta)\right) \right) \; dx\\
&=\int h(x) \; \left( - \frac{\partial^2}{\partial \eta_i^2}\;  \overline{c}(\eta) \; \text{exp}\left(\sum \eta_it_i(x)- \overline{c}(\eta)\right)+ (t_i- \frac{\partial}{\partial \eta_i} \overline{c}(\eta))^2 \; \text{exp}\left(\sum \eta_it_i(x)- \overline{c}(\eta)\right) \right) \; dx \\
&=\int h(x)  - \frac{\partial^2}{\partial \eta_i^2} \; \overline{c}(\eta) \; \text{exp}\left(\sum \eta_it_i(x)- \overline{c}(\eta)\right) \;dx  \\
&+ \int h(x) \;(t_i- \frac{\partial}{\partial \eta_i} \; \overline{c}(\eta))^2 \; \text{exp}\left(\sum \eta_it_i(x)- \overline{c}(\eta)\right) \; dx \\
&=- \frac{\partial^2}{\partial \eta_i^2} \; \overline{c}(\eta) + \int h(x) \; t_i(x)^2  \; \text{exp}\left(\sum \eta_it_i(x)- \overline{c}(\eta)\right) \; dx \\
&+ \int h(x) \left( \frac{\partial}{\partial \eta_i} \;\overline{c}(\eta) \right)^2  \text{exp}\left(\sum \eta_it_i(x)- \overline{c}(\eta)\right) \; dx \\
&- 2 \frac{\partial \overline{c}(\eta)}{\partial \eta_i} \int t_i(x) \; h(x)\;  \text{exp}\left(\sum \eta_it_i(x)- \overline{c}(\eta)\right) \; dx \\
&= - \frac{\partial^2}{\partial \eta_i^2} \;\overline{c}(\eta) + E(t_i^2)-E(t_i)^2 \\
&= - \frac{\partial^2}{\partial \eta_i^2} \; \overline{c}(\eta)+ \text{var}(t_i)
\end{split}
\]

\newpage

\begin{figure}[h]
\centering
\begin{tikzpicture}
   \tkzInit[xmax=8,ymax=8,xmin=-8,ymin=-8]
   \tkzGrid
   \tkzAxeXY
  \end{tikzpicture}
\end{figure}

\newpage

\begin{figure}[h]
\centering
\begin{tikzpicture}
    \begin{axis}[
        width=15cm, height=15cm,
        grid = major,
        grid style={dashed, gray!30},
        xmin=-10,  
        xmax=10,    
        ymin=-10,  
        ymax=10, 
        /pgfplots/xtick={-10,-9,...,10}, 
        /pgfplots/ytick={-10,-9,...,10}, 
        axis background/.style={fill=white},
        %ylabel=y,
        %xlabel=x,
        tick align=inside]

       \addplot[domain=-10:10, black, thick] 
        {0}; 
       \draw ({axis cs:0,0}|-{rel axis cs:0,0}) -- ({axis cs:0,0}|-{rel axis cs:0,1});
       \node[pos=0.1,pin=135:{\color{yellow}$f(x)=-2$}]{};
       \addplot[
    mark=none,
    domain=-10:10,
    samples=80,
    black,
    thick,
] {(x<-2)*((1/2)*x+2) + (!(x<-2) && (x<2))*1 + (!(x<2)) * (2*x-2.9)}
;
      \draw (150,190) node {$f(x)$};
    \end{axis} 
\end{tikzpicture}
\end{figure}

\newpage

\begin{center}
  \begin{tikzpicture}
    %Circles 
    \foreach \r in {1, 2,...,7}
      \draw[gray, thick] (0,0) circle (\r);    
    \foreach \r in {0.5, 1.5,...,7}
      \draw[gray, thin] (0,0) circle (\r);
    %1° Rays
    \foreach \a in {0, 1,...,359}
      \draw[gray] (\a:7.7) -- (\a:8);
    %5° Rays
    \foreach \a in {0, 5,...,359}
      \draw[gray] (\a:7.5) -- (\a:8);      
    %15° Rays
    \foreach \a in {0, 15,...,359}
      \draw[thick,gray] (\a:1) -- (\a:8); 
    %30° Rays
    \foreach \a in {0, 30,...,359}
      \draw[thick,gray] (0, 0) -- (\a:8);
    %Radius labels (background filled white)
    \foreach \r in {1, 2,...,7}
      \draw (\r,0) node[inner sep=1pt,below=3pt,rectangle,fill=white] {$\r$};
    %Main rays
    \foreach \a in {0, 90,...,359}
      \draw[very thick] (0, 0) -- (\a:8);
    %Angle labels  
    \foreach \a in {0, 15,...,359}
      \draw (\a: 8.5) node {$\a^\circ$};
    %Central point
    \draw[fill=red] (0,0) circle(0.7mm);
  \end{tikzpicture}
\end{center}

\newpage

\begin{thebibliography}{9}
\bibitem{bending} Bending snakes with xy-pic. \url{http://tex.stackexchange.com/questions/31687/bending-snakes-with-xy-pic}. October 15, 2011. 
 
\bibitem{snake arrow} How do you draw the ``snake” arrow for the connecting homomorphism in the snake lemma?. \url{http://tex.stackexchange.com/questions/3892/how-do-you-draw-the-snake-arrow-for-the-connecting-homomorphism-in-the-snake-l}. October 8, 2010. 

\bibitem{curved} Curved Arrows in Tikz. \url{http://tex.stackexchange.com/questions/209942/curved-arrows-in-tikz}. October 31, 2014. 

\bibitem{milne} Milne, James. The tikz package. Guide to Commutative Diagrams. \url{http://www.jmilne.org/not/Mtikz.pdf}. October 30, 2012. 

\bibitem{nikolic} Nikolic, Zoran. Polar coordinates template. \url{http://www.texample.net/tikz/examples/polar-coordinates-template/}. December 15, 2009. 

\end{thebibliography}

\end{document}