## With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

No credit card required

# Writing theorems and definitions

LaTeX provides environment for theorems, definitions, and alike. Returning to our first example in this chapter, we could define a theorem environment by:

\newtheorem{thm}{Theorem}

Then, we declare a definition environment, using an optional argument stating an existing environment with which we would like to share the numbering:

\newtheorem{dfn}[thm]{Definition}

And in this simple way, we may use these environments:

\begin{dfn} A quadratic equation is an equation of the form $$\label{quad} ax^2 + bx + c = 0,$$ where $$a, b$$ and $$c$$ are constants and $$a \neq 0$$. \end{dfn} \begin{thm} A quadratic equation (\ref{quad}) has two solutions for the variable $$x$$:  ...

## With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

No credit card required