# How to Write the Pi Symbol (π) in LaTeX

In LaTeX, you can write the Pi symbol (π) using the `\pi`

command.

The following examples show how to write the Pi symbol in LaTeX.

## How to Write the Pi Symbol in Text

We can use the `\pi`

command to write the Pi symbol in LaTeX document for text.

Suppose we want to write the Pi symbol in the text.

We can use the following LaTeX code to do so:

```
\documentclass{article}
\begin{document}
This is an example of using the Pi symbol: \( \pi \).
\end{document}
```

Output: 👇️

```
This is an example of using the Pi symbol: π.
```

In this example, we use the `\pi`

command to display the Pi symbol in the document.

## How to Write the Pi Symbol in Mathematical Expressions

For mathematical expressions, we can use the `\pi`

command to ensure proper formatting.

Suppose we would like to write mathematical expressions that contain the Pi symbol.

We can use the following LaTeX code to do so:

```
\documentclass{article}
\begin{document}
An inline mathematical expression: \( \pi r^2 \).
A displayed mathematical expression:
\[
\pi r^2
\]
\end{document}
```

Output: 👇️

```
πr²
```

In this example, we use the `\pi`

command to denote the Pi symbol in both inline and displayed mathematical expressions.

## Conclusion

We use the `\pi`

command for both text and mathematical expressions.