You are on page 1of 17

Basics Typesetting Math rich tables

Typesetting Mathematics in LaTeX


Getting your hands dirty
Suddhasheel Ghosh
1
Department of Civil Engineering
MGMs Jawaharlal Nehru Engineering College,
Aurangabad, MH
2
MGM - Institute of Biosciences and Technology
Aurangabad, MH
The LaTeX workshop
shudh Mathematics
Basics Typesetting Math rich tables
Outline
1
Preliminary commands
2
Inline and display math
Setting up equations
Step-wise functions or case based functions
Matrices and determinants
3
Math rich tables
shudh Mathematics
Basics Typesetting Math rich tables
Outline
1
Preliminary commands
2
Inline and display math
Setting up equations
Step-wise functions or case based functions
Matrices and determinants
3
Math rich tables
shudh Mathematics
Basics Typesetting Math rich tables
Preamble settings
Necessary requirement for typesetting math
In the preamble, set the following
\usepackage{amssymb, amsmath}
shudh Mathematics
Basics Typesetting Math rich tables
Basic commands
It is necessary to enclose all math by the $ sign.
$\sum_{i=1}^n
a_n x^n = 0$
$\prod_{i=1}^n
a_n x^n = 1$
$\int x^n dx =
\frac{x^{n+1}}{n+1}$
$\int_0^\infty x^n dx =
\frac{1}{n+1} \left[
x^{n+1}\right]_0^\infty$
${4}\choose{2}$
n

i=1
a
n
x
n
= 0
n

i=1
a
n
x
n
= 1
_
x
n
dx =
x
n+1
n + 1
_

0
x
n
dx =
1
n + 1
_
x
n+1
_

0
_
4
2
_
shudh Mathematics
Basics Typesetting Math rich tables
Our greeky friends
The small ones:
\alpha, \beta, \gamma, \dots, \chi, \pi, \phi, \psi, \xi
provide:
, , , . . . , , , , ,
On the other hand, the capital ones:
A, B, \gamma, \dots, X, \pi, \phi, \psi, \xi
provide:
A, B, , . . . , X, , , ,
shudh Mathematics
Basics Typesetting Math rich tables
Our wonderful roots
The Euclidean distance between two points $\mathbf{p}
(x_1, y_1)$ and $\mathbf{q}(x_2,y_2)$ is given by:
$$ d(\mathbf{p}, \mathbf{q}) = \sqrt{(x_1-x_2)^2
+ (y_1 - y_2)^2}$$
and the Minkowskis distance with the $p$-norm is given as
$$d_p(\mathbf{p}, \mathbf{q}) = \sqrt[p]{\vert x_1-x_2
\vert ^p + \vert y_1 - y_2 \vert ^p}$$
produces:
The Euclidean distance between two points p(x
1
, y
1
) and
q(x
2
, y
2
) is given by:
d(p, q) =
_
(x
1
x
2
)
2
+ (y
1
y
2
)
2
and the Minkowskis distance with the p-norm is given as
d
p
(p, q) =
p
_
|x
1
x
2
|
p
+ |y
1
y
2
|
p
shudh Mathematics
Basics Typesetting Math rich tables
Symbols we love
\pm \mp
\forall \in
\supset \subset
\le \nleq
\ge \ngeq
\sim \approx
\nsim \napprox
\equiv \nequiv
\cap \cup
\times \div
\ll \gg
\rightarrow \Rightarrow
\leftarrow \Leftarrow
x \bar{x}

x \vec{x}
All symbols require math mode. The math expressions must
be surrounded by the $ sign on both sides.
shudh Mathematics
Basics Typesetting Math rich tables
Thats the limit !
$\lim_{x \rightarrow 5} \frac{x^2 - 25}{x - 5} = 10$
produces:
lim
x5
x
2
25
x 5
= 10
shudh Mathematics
Basics Typesetting Math rich tables Equations Cases Matrices and determinants
Outline
1
Preliminary commands
2
Inline and display math
Setting up equations
Step-wise functions or case based functions
Matrices and determinants
3
Math rich tables
shudh Mathematics
Basics Typesetting Math rich tables Equations Cases Matrices and determinants
Typesetting math
Inline and display modes
The equation of a straight line is given by $y = m x + c$, where $m$
denotes the slope, and $c$ denotes the $y$-intercept.
produces:
The equation of a straight line is given by y = mx + c, where m
denotes the slope, and c denotes the y-intercept.
The Fourier transform of a function $f:\mathbb{R}\rightarrow
\mathbb{C}$ is given by:
$$
f\hat(\xi) = \int_{-\infty}^{\infty} f(x) e^{-2\pi i x \xi} dx
$$
produces:
The Fourier transform of a function f : R C is given by:

f () =
_

f (x)e
2ix
dx
shudh Mathematics
Basics Typesetting Math rich tables Equations Cases Matrices and determinants
Typesetting math
Equations
\begin{equation}
\sum_{i=0}^n a_i \cos \theta + b_i \sin \theta
= \mathcal{F}
\end{equation}
n

i=0
a
i
cos + b
i
sin = F (1)
shudh Mathematics
Basics Typesetting Math rich tables Equations Cases Matrices and determinants
Typesetting math
Piecewise functions or case based functions
$$
f(x) =
\begin{cases}
0 & x\in\mathbb{Q} \\
1 & x\in\mathbb{I}
\end{cases}
$$
f (x) =
_

_
0 x Q
1 x I
shudh Mathematics
Basics Typesetting Math rich tables Equations Cases Matrices and determinants
Typesetting math
Matrices
$$
\begin{bmatrix}
1 &2 &3 &4 \\
6 &7 &9 &10 \\
5 &6 &3 &1 \\
4 &2 &8 &2
\end{bmatrix}
\begin{bmatrix}
x \\ y \\ z \\ t
\end{bmatrix}
=
\begin{bmatrix}
4 \\ 5 \\ 5 \\ 2
\end{bmatrix}
$$
_

_
1 2 3 4
6 7 9 10
5 6 3 1
4 2 8 2
_

_
_

_
x
y
z
t
_

_
=
_

_
4
5
5
2
_

_
shudh Mathematics
Basics Typesetting Math rich tables Equations Cases Matrices and determinants
Typesetting math
Determinants
$$
\begin{vmatrix}
1 & 2 & 3 \\
4 & 5 & 6 \\
7 & 8 & 9
\end{vmatrix}
= 0
$$

1 2 3
4 5 6
7 8 9

= 0
shudh Mathematics
Basics Typesetting Math rich tables
Outline
1
Preliminary commands
2
Inline and display math
Setting up equations
Step-wise functions or case based functions
Matrices and determinants
3
Math rich tables
shudh Mathematics
Basics Typesetting Math rich tables
Tables with mathematical expressions
\begin{table}
\begin{tabular}{|c|l|c|l|}
\hline
S. No. &Type &Degree
&Expression \\
\hline
1 & Algebraic & 1 & $x$ \\
\hline
2 &Algebraic &2
&$x^2 + x + 1$ \\
\hline
3 &Algebraic &3
&$x^3 + x^2 + x + 1$ \\
\hline
\end{tabular}
\end{table}
S. No. Type Degree Expression
1 Algebraic 1 x
2 Algebraic 2 x
2
+ x + 1
3 Algebraic 3 x
3
+ x
2
+ x + 1
shudh Mathematics

You might also like