Research skills for students

How To Write Equation in LaTeX?

If you look at previous articles, you have seen the name “LaTeX,” and you already know what it is. But if you didn’t, here is a brief opening and explanations.

LaTeX is a type of markup language, which means it employs specific instructions to define the structure and content of a document. These commands are frequently expressed in plain text, making LaTeX manuscripts portable and easy to share.

But here in this guidance, we explicitly discuss the “equation” and how to write them in LaTeX. Do you know how to write equations in LaTeX? Let me disagree with you if you think it is complex and time-consuming!

In the following section, you can find the best tips for writing beautiful LaTeX equations.

How to Create Mathematical Equations in LaTeX?

LaTeX is an exceptional typesetting technology for producing competent and appealing-looking texts. It is beneficial for technical, mathematical, and scientific writing but may also be used to create presentations, books, and correspondence.

The other usage of this software is formatting mathematical symbols in LaTeX. In this guidance, you can see the steps to write inline and display equations in LaTeX, which we tried to explain with examples to a better understanding.

LaTeX equations for mathematicians, engineers, scientists, and students:

You should know that we have two modes for the mathematical expressions on LaTeX: Inline math mode and Display math mode.

For formulas embedded within paragraphs, inline math mode is employed. Expressions that stand apart and occupy separate lines are written using display math mode.

We are adding the steps of each.

To write equations in LaTeX only in inline math mode, you can use any of the following practices:

·        Inline Math Mode

  1. (…)
  2. \begin{math}…\end{math}

These three delimiters will render the enclosed mathematical expression as inline text integrated within the surrounding paragraph. For example, to write the equation “e=mc²” in inline math mode, you would use any of the following three methods:

  1. $e=mc²$
  2. \(e=mc²\)
  3. \begin{math}e=mc²\end{math}

The choice of delimiter is essentially a matter of personal preference. The dollar sign () is the most common. It is also the most flexible, as it can embed mathematical ($), a more explicit way to indicate that the enclosed expression is in inline math mode. It is often used to separate inline equations from other text.

The \begin{math}…\end{math} environment is the most formal way to write inline math mode in LaTeX and is mainly used for more complex expressions.

Here are some examples of how to use inline math mode to write equations:

How To Write Equation in LaTeX?
How To Write Equation in LaTeX?

As you can see, inline math mode is a multipurpose tool for incorporating mathematical expressions into your LaTeX documents. It is a quick and easy way to write equations seamlessly integrated with the surrounding text. Now let’s find out about the other mode.

·        Display Math Mode

To write equations in LaTeX only in display math mode, you can use either the double dollar signs ($$) or the `\begin{displaymath}…\end{displaymath}` environment.

Both methods will render the enclosed mathematical expression on a separate line, isolated from the surrounding text.

  1. First method: **Using Double Dollar Signs:**

The double dollar signs ($$) are the simplest way to write a display equation in LaTeX. Simply enclose the expression between two pairs of dollar signs as follows:


This will produce the following output:


  • Second method: Using the \begin{displaymath}…\end{displaymath} Environment:

The \begin{displaymath}…\end{displaymath} environment provides a more formal way to write a display equation in LaTeX.

It also allows you to add formatting options, such as centering the equation or setting it in a different font.


\sum_{i=1}^n a_i = 10


This will produce the following output:


\sum_{i=1}^n a_i = 10


You can choose any of these methods based on your personal preferences.

  • The double dollar signs are quicker to type and are suitable for most simple equations.
  • The \begin{displaymath}…\end{displaymath} environment is more versatile and can be used for more complex equations and for customizing the formatting.

Here are some examples of how to use display math mode to write equations:

How To Write Equation in LaTeX?
How To Write Equation in LaTeX?

Using this method, you can write separate equations from the text, allowing you to format them more conveniently.

Read More: What Is Affiliation in Research Paper?


Whether you’re a student striving for academic excellence, a scientist unraveling the mysteries of the universe, or an engineer trying to design the future, LaTeX is your necessary tool for writing elegant and error-free equations that amaze your readers.

This article includes the comprehensive set of commands and environments of LaTeX that can empower you to create mathematical equations that blend smoothly with your text.

You can share your LaTeX expertise with us and other fellows by leaving a comment below and inviting them to use LaTeX to write mathematical equations.

5/5 - (2 votes)


Hi, my name is Mohammad, and I am currently pursuing my PhD at Istanbul Yildiz University. I have always been deeply passionate about research and academic writing, and this has led me to publish several articles in esteemed journals. Writing has always been my way of expressing my thoughts and ideas, and I take great joy in sharing my experiences and knowledge with others. Being a PhD candidate has allowed me to further explore my interests in the field of research and contribute to the academic community. I am excited about the opportunities that lie ahead, and I look forward to continuing my journey in this fascinating field.

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button