# Math expressions

Mathematical expressions are an important part of technical documentation, especially in fields like mathematics, physics, data science, and engineering.

Writerside supports rendering mathematical expressions as block elements using Tex syntax, which can include Greek letters, operators, trigonometric functions, and other mathematical symbols. For more information about the syntax, see Wikibooks: LaTeX/Mathematics.

To add a math expression, use a code block and set the language to tex. For example, the following code defines the quadratic formula:

<code-block lang="tex"> $$x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}$$ </code-block>
tex $$x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}$$ 
$$$$x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}$$$$

The result will look like this:

## Inline math expressions

Use the $ element to insert math equations in a paragraph, not as a separate block. In a Markdown topic, use dollar characters .... Pythagorean theorem: [itex]x^2 + y^2 = z^2$
Pythagorean theorem: $x^2 + y^2 = z^2$

Pythagorean theorem: