Open In App

Maths Commands in LaTeX

Last Updated : 20 Jun, 2020
Improve
Improve
Like Article
Like
Save
Share
Report
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.
  1. Fractions: Instead of writing fractions as A / B we will use below syntax Syntax :
    \frac{numerator}{denominator}
    
    Example –
    \frac{a+1}{b+1}
    
    OUTPUT: \frac{a+1}{b+1}
  2. 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: x^2
  3. 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: \sqrt[3]{27}
  4. 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:      \begin{matrix}     1 & x & x^2 \\     1 & y & y^2 \\     1 & z & z^2 \\     \end{matrix}
  5. 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:   f(n) = \begin{cases} n/2,  & \text{if $n$ is even} \\ n+1, & \text{if $n$ is odd} \end{cases}
  6. 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:  \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.
  7. 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^2
    
    Example –
    \sum_{i=0}^n i^2
    
    OUTPUT:  \sum_{i=0}^n i^2
  8. subscriptsis a character that is set slightly below the normal line of type. Syntax:
    \log_2 x
    
    Example –
    \log_2 x
    
    OUTPUT:  \log_2 x
  9. 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:  \lfloor 2.2 \rfloor
  10. ceil function maps to the least integer greater than or equal to, denoted. Syntax:
    \lceil n \rcei
    
    Example –
    \lceil 2.5 \rceil
    
    OUTPUT:  \lceil 2.5 \rceil
  11. Some Combined examples :
      Example –
    • Use
      \sum_{i=0}^n i^2 = \frac{(n^2+n)(2n+1)}{6}
      for \sum_{i=0}^n i^2 = \frac{(n)(n+1)(2n+1)}{6}
    • Example –
    • Use
      \left(\frac{\sqrt x}{y^3}\right)
      for \left(\frac{\sqrt x}{y^3}\right)
    • Example –
    • Use
      \Biggl(\biggl(\Bigl(\bigl((n)\bigr)\Bigr)\biggr)\Biggr)
      for  \Biggl(\biggl(\Bigl(\bigl((n)\bigr)\Bigr)\biggr)\Biggr)
    • Example –
    • Use
      \sqrt[3]{\frac xy}
      for \sqrt[3]{\frac xy}


Like Article
Suggest improvement
Previous
Next
Share your thoughts in the comments

Similar Reads