DEV Community


Posted on

LaTeX & Maths: Conditional Expressions and Multiple Equations

Hello, how are you? :)

In this post I tell you how to create conditional expressions and what you can do if you have multiple equations and align them at the center. Let's start!!!

Conditional Expressions

You need to use the cases instruction to define the expression

Enter fullscreen mode Exit fullscreen mode



Screenshot from 2021-08-23 10-16-57

You can add a new file with \\ at the end of the line

  • This must be inside a math environment like $ $, \[ \] or equation

Aligning Multiple Equations

We have seen many ways to write equations, but Just one equation what if you want to write 5 equations, or more than 5 equations? Do we need to put each equation in \[\] it is going to be a nightmare!!

There exist an environment, the gather environment this centers a group of formulas on a separate line



Screenshot from 2021-08-23 10-30-29

  • You can create a new line with \\
  • No blank lines are permitted within the environment

This is all for today.

Do not forget to follow me on twitter @latexteada

Greetings :)

Top comments (0)