LATEX is a document preparation system for producing professional-looking documents. LaTeX is widely used for the communication and publication of scientific documents in many fields, including mathematics, statistics, computer science, engineering, physics, etc. It also has a prominent role in the preparation and publication of books and articles that contain complex multilingual materials, such as Sanskrit and Greek.
So in this post we have discussed the most used TEX commands used for Maths.
- Fractions:
Instead of writing fractions as A / B we will use below syntax
Syntax :\frac{numerator}{denominator}Example –
\frac{a+1}{b+1}OUTPUT:
- Nth power:
Instead of writing powers as x ^ n which is not clear as if it is xor or power so we will use below syntax
Syntax:
x^y
Example –
x^2
OUTPUT:
- Nth root:
Instead of writing roots as x^(1/N) which is not clear as if it is xor or root so we will use below syntax
Syntax:\sqrt[N]{27}Example –
\sqrt[3]{27}OUTPUT:
- Matrices
Instead of writing matrices as [[1, x, x^2], [1, y, y^2][1, z, z^2]] which is not very clear use below syntax
Syntax:\begin{matrix} 1 & x & x^2 \\ 1 & y & y^2 \\ 1 & z & z^2 \\ \end{matrix}Example –
\begin{matrix} 1 & x & x^2 \\ 1 & y & y^2 \\ 1 & z & z^2 \\ \end{matrix}OUTPUT:
- Definitions by cases (piecewise function) is a function defined by multiple sub-functions, each sub-function applying to a certain interval of the main function’s domain, a sub-domain.
Syntax:
f(n) = \begin{cases} n/2, & \text{if $n$ is even} \\ n+1, & \text{if $n$ is odd} \end{cases}Example –
f(n) = \begin{cases} n/2, & \text{if $n$ is even} \\ n+1, & \text{if $n$ is odd} \end{cases}OUTPUT:
- System of equations is a function defined by multiple sub-functions, each sub-function applying to a certain interval of the main function’s domain, a sub-domain.
Syntax:
\left\{ \begin{array}{c} a_1x+b_1y+c_1z=d_1 \\ a_2x+b_2y+c_2z=d_2 \\ a_3x+b_3y+c_3z=d_3 \end{array} \right.Example –
\left\{ \begin{array}{c} a_1x+b_1y+c_1z=d_1 \\ a_2x+b_2y+c_2z=d_2 \\ a_3x+b_3y+c_3z=d_3 \end{array} \right.OUTPUT:
- Summation is the addition of a sequence of any kind of numbers, called addends or summands; the result is their sum or total.
Syntax:
\sum_{i=0}^n i^2Example –
\sum_{i=0}^n i^2OUTPUT:
- subscriptsis a character that is set slightly below the normal line of type.
Syntax:
\log_2 x
Example –
\log_2 x
OUTPUT:
- floor is the function that takes as input a real number and gives as output the greatest integer less than or equal to, denoted.
Syntax:
\lfloor n \rfloor
Example –
\lfloor 2.2 \rfloor
OUTPUT:
- ceil function maps to the least integer greater than or equal to, denoted.
Syntax:
\lceil n \rcei
Example –
\lceil 2.5 \rceil
OUTPUT:
- Some Combined examples :
-
Example –
- Use
\sum_{i=0}^n i^2 = \frac{(n^2+n)(2n+1)}{6}for

- Use
\left(\frac{\sqrt x}{y^3}\right)for

- Use
\Biggl(\biggl(\Bigl(\bigl((n)\bigr)\Bigr)\biggr)\Biggr)
for

- Use
\sqrt[3]{\frac xy}for
![Rendered by QuickLaTeX.com \sqrt[3]{\frac xy}](https://web.archive.org/web/20201125061613im_/https://www.geeksforgeeks.org/wp-content/ql-cache/quicklatex.com-3052e669790f13a6d917962af892ce11_l3.png)
Example –
Example –
Example –
- Use
Attention reader! Don’t stop learning now. Get hold of all the important CS Theory concepts for SDE interviews with the CS Theory Course at a student-friendly price and become industry ready.
Recommended Posts:
- Greek Letters in LaTeX
- Geometry Notations in LaTeX
- Set Notations in LaTeX
- Brackets in Latex
- Logic Notations in LaTeX
- Relational Operators in LaTeX
- Trigonometric Functions in Latex
- Arrow Symbols in LaTeX
- Fonts in LaTeX
- Mathematical operator symbols in LaTeX
- Binary operation symbols in LaTeX
- Equality and Inference symbols in LaTeX
- Inequalities in LaTeX
- Accents in LaTeX
- Directional symbols in LaTeX
- Miscellaneous symbols in LaTeX
- Constructions in LaTeX
- Delimiters in LaTeX
- Discrete Maths | Generating Functions-Introduction and Prerequisites
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.

