DEV Community

latexteada
latexteada

Posted on

LaTeX & Maths: Sub-equations and Matrices

Hello how are you? :)

Today I will tell you how to create a sub-equation environment, and how to declare matrices and some variants of these. Let's start!!!

The subequation environment

This environment allows us to put multiple equations in a single place. We need to declare the subequation environment and then put each equation in an equation environment



\begin{subequations}
    \begin{equation}
        Equation 1
    \end{equation}
...
    \begin{equation}
        Equation n
    \end{equation}
\end{subequations}


Enter fullscreen mode Exit fullscreen mode

code

Produces

Screenshot from 2021-08-30 09-57-29

But what if we want a subequation not numbered, well we just use the equation* environment

code

Produces

Screenshot from 2021-08-31 11-37-53

Remember that you can label any equation in this environment, you can check how to label here or you can check how to label here

Matrices

The commands to create a matrix are similar to the table environment, but here you do not need to declare the number of columns.

  • We use & to declare the columns
  • We use \\ to declare a new row

You need to put these matrix environments inside a math environment

The most simple command is matrix

code

Produces

Screenshot from 2021-08-31 11-48-45

Wait, this is not a matrix!!! where are the parentheses?

Well, there are other matrix environments, let's see

code

Produces

Screenshot from 2021-08-31 11-54-43

Thanks, this is all for today

Do not forget to follow me on Twitter @latexteada

Top comments (0)