When you write math in LaTeX, sometimes the formulas look too small, especially when you use fractions or sums inside inline math. This is because inline math tries to keep everything compact.
The \displaystyle command is used to make your math look bigger and clearer, just like it appears in display mode.
Normal inline vs displaystyle command
By default, inline math makes fractions small. Adding \displaystyle makes them full size. This is useful when you want to show big fractions or sums even inside a sentence.
\documentclass{article}
\begin{document}
Inline fraction: $ \frac{a}{b} $
With displaystyle: $ \displaystyle \frac{a}{b} $
\end{document}
displaystyle with sums
Sums in inline mode also look small and limits are beside the symbol. Using \displaystyle makes them bigger and moves the limits above and below, like in display mode.
\documentclass{article}
\begin{document}
Inline sum: $ \sum_{i=1}^n i $
With displaystyle: $ \displaystyle \sum_{i=1}^n i $
\end{document}
In display math you don’t need it
If you are already using \[...\], LaTeX gives you display style by default. That means you don’t need \displaystyle there. But sometimes you may use it inside arrays or special environments.
\documentclass{article}
\begin{document}
\[ \frac{a}{b} \quad \sum_{i=1}^n i \]
\end{document}
Inside arrays and tables
In environments like array or tabular, LaTeX may use text style math. Using \displaystyle inside forces bigger fractions and sums where you need them.
\documentclass{article}
\begin{document}
\[ \begin{array}{cc}
\text{Normal} & \frac{a}{b} \\
\text{Display style} & \displaystyle \frac{a}{b}
\end{array} \]
\end{document}
Combine with other commands
You can mix \displaystyle with \lim, \int, or \prod to make them look like proper display equations even when inside text.
\documentclass{article}
\begin{document}
Inline: $ \lim_{x \to 0} \frac{\sin x}{x} $
With displaystyle: $ \displaystyle \lim_{x \to 0} \frac{\sin x}{x} $
\end{document}
Best Practice
Use \displaystyle when you want big and clear math symbols inside inline mode.
For normal display equations (\[...\]) you don’t need it.
Avoid using it everywhere, because sometimes big math symbols break the line spacing. Keep it for fractions, sums, integrals, or limits that look better in large form.