Javatpoint Logo
Javatpoint Logo

Latex Fractions

The fraction is defined as the numerical quantity expressed in the form of the numerator and the denominator.

A fraction is created by using the command:

Align Environment

The align environment is also used to implement the fractions, which is given below:

The align environment is declared to align the equations. It is not possible to write two equations in a single environment. To overcome this, the asterisk (*) is used with the align command. The * symbol with align signifies that the equations entered in this environment are not numbered.

The code using the align environment is given below:

The output will display the three equations listed in the above code in a separate line, which is not possible using the equation environment. You need to use a separate equation environment for each equation.

You can notice the below output:

Latex Fractions

There are commonly two environments in the category of the align environment.

The two types of align environment are listed below:

1) The falign environment is used to align the text at both sides of the margin.

The code for such an example is given below:

Output:

Latex Fractions 1

The multialign environment is used to align the long text in different lines. The text otherwise will not be appropriately aligned.

Let's consider an example.

  • With the use of multialign

The code for such type of example is given below:

Output:

Latex Fractions 2
  • Without the use of multialign

The code for such type of example is given below:

Output:

Latex Fractions 3

Fractions Types

Let's understand fractions with a few examples.

Example-1: The code for the first example is given below:

Output:

Latex Fractions 4

Example-2: The code for the second example is given below:

Output:

Latex Fractions 5

Slanted Fractions

The fraction usually has a straight line between the numerator and the denominator. But to create the slanted line between the numerator and the denominator, the \sfrac command is used.

The \sfrac command is used to create a slanted line, while the \frac command is used to create the straight line between the numerator and the denominator.

To implement \sfrac, we need to use the xfrac package. The package is written as \usepackage{xfrac}.

The math environment is used to implement such commands. The environment is written as:

Let's understand with the few examples.

Example-1: The code for the first example is given below:

Output:

Latex Fractions 6

Example-2: The code for the second example is given below:

Output:

Latex Fractions 7

Binomials

The binomial pattern is commonly used in the factorials. The \binom command is used to represent the variables in the binomial form.

Let's understand with an example.

The code is given below:

Output:

Latex Fractions 8

Roots

The roots are widely used in mathematics. The \sqrt{expression} command is used to create a root. It is termed as square root. The expression inside the curly brackets are the term under the root. If we want to change the magnitude of the root, then we need to use the \sqrt[magnitude]{expression} command.

Let's understand with the few examples.

The code for the first example is given below:

Output:

Latex Fractions 9

The code for the second example is given below:

Output:

Latex Fractions 10

Continued Fractions

The continue fractions are represented in the form of a ladder, or that is in the continuous form. These fractions are commonly used in ladder structures in various subjects or topics.

The \cfrac command is used to implement the continued fractions.

We can use equation environment to create the continue fractions.

Let's understand with an example. Below is the code:

Output:

Latex Fractions 11

Sum

The sum command is used to insert the summation symbol. We can specify the range and the limits of the summation symbol.

The sum command is written as:

Let's understand with two examples.

The code for first example is given below:

Output:

Latex Fractions 12

The code for the second example is given below:

Output:

Latex Fractions 13
Next TopicLatex Matrix




Help Others, Please Share

facebook twitter google plus pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA