*This article aims to show you the simplest and easiest way to write the **floor symbol in LaTeX**.*

This symbol is typically used in mathematics and computer science, usually when you are studying functions or creating code regarding functions. Today you will learn how to write this symbol in LaTeX.

**Floor function **

In math and computer science, whenever the floor function is applied to a number, it returns the greatest integer less than or equal to the given real number value ** x**. You can define it using “floor(x)” or with two “half” square brackets with the value x between them.

**Floor symbol in LaTeX**

To write it we do not need extra packages, it is already by default in its built-in LaTeX symbols, that’s great news. First of all the math mode is mandatory for this expression, second we need two commands one for each side of the values used as arguments of the function, the first command is \**lfloor** (left side) and the second one is \**rfloor** (right side); therefore the argument will be between these two commands, for example

```
\documentclass{article}
\begin{document}
\begin{center}
\verb|lfloor| \verb|[argument]| \verb|rfloor|\\
$\lfloor 2, -3, 5 \rfloor$\\
$\lfloor x \rfloor$\\
\end{center}
\end{document}
```

Gives the output

We can notice what was mentioned before, the argument or value evaluated in the function is between both commands in the code.

In case we have a fraction or maybe the floor symbols do not fit, we can use two already known commands, \**left** and \**right**. Let’s look at an example

```
\begin{document}
\begin{center}
1) $\lfloor \dfrac{1}{x} \rfloor$ \\
\vspace{0.2cm}
2) $\left \lfloor \dfrac{1}{x} \right \rfloor$
\end{center}
\end{document}
```

Note: \**vspace**{} creates a vertical space between two lines, the height of the space is defined by the value inside the brackets.

**Ceiling Function and Ceiling Symbol in LaTeX**

Just as we have the floor functions there is also the opposite of it. The ceiling function, also denoted ceil(x), returns the last integer greater than or equal to a given real number ** x**. The symbols are the same as the floor function, except they are inverted,

In LaTeX we use \**lceil** and \**rceil** commands for each side of the ceiling function, the same principle from the floor function symbols apply for the ceil symbols. For example

```
\begin{center}
1) $\left \lceil \dfrac{x^2}{3} \right \rceil$\\
\vspace{0.2cm}
2) $\lceil 5.4 \rceil$
\end{center}
\end{document}
```

Here we have the basics for writing these two symbols and respective functions in LaTeX. There could be packages to help you write these symbols in different ways but most of the time, simpler is better or at least that is what we want to transmit whenever we can.

I hope this post was helpful, and as always keep writing in LaTeX.

*All the images were created with LaTeX by the author.*

**Further Reading**

**LaTex Tutorial** **on Symbols**

- How To Create A Cross Product Symbol In LaTeX
- How to create a hat symbol in LaTeX?
- How to create a prime symbol in LaTeX?
- How to create an absolute value symbol in LaTeX?
- How to create an approximate symbol in LaTeX?
- How to create an intersection symbol in LaTeX?
- How to create the empty set symbol in LaTeX?
- How to write a degree symbol in LaTeX?
- How to write a dot product in LaTeX?
- How to Write a Greater Than Symbol in LaTeX?
- How to write a norm symbol in LaTeX?
- How to write A Plus-Minus Symbol in LaTeX
- How to write a proportional to symbol in LaTeX?
- How to write a real number symbol in LaTeX?
- How to write a tilde symbol in LaTeX?
- How to write a union symbol in LaTeX?
- How to write a vector in LaTeX?
- How to write an infinity symbol in LaTeX?
- How to write bold text in LaTeX?
- How To Write Dots Symbols In LaTeX?
- How to write the arrow symbols in LaTeX
- How to write the Degree celsius symbol in LaTeX?
- How to write the equal or not equal symbol in LaTeX?
- How to write the Euro symbol in LaTeX?
- How to write the gradient operator symbol in LaTeX
- How To Write The Greater Than Or Equal To Symbol In LaTeX?
- How to write the integer number symbol in LaTeX?
- How to write the less than symbol in LaTeX?
- How to write the Natural numbers symbol in LaTeX?
- How to write the parallel symbol in LaTeX?
- How to write the percent symbol in LaTeX?
- How to write the square root symbol in LaTeX?
- How To Write The Symbol For A Subset In LaTeX?
- How to write the symbol for therefore in LaTeX?
- How to write with the mathbb in LaTeX?