0

So basically I want to write these two matrices equations but in only one referenced equation.

enter image description here

I have the following code:

\begin{equation*} \label{eq:matrices_estado}
\begin{bmatrix}
    \Dot{x}_1\\
    \Dot{x}_2\\
    \Dot{x}_3
\end{bmatrix}
=
\begin{bmatrix}
    0 & 2.083 & 0\\
    0 & -1.708 & 100\\
    -0.3183k & 0 & -100
\end{bmatrix}
\begin{bmatrix}
    x_1\\
    x_2\\
    x_3
\end{bmatrix}
+
\begin{bmatrix}
    0\\
    0\\
    3.1831k
\end{bmatrix}
\theta_i
\end{equation*}
\begin{align*}
    \theta_o = 
    \begin{bmatrix}
        0.1 & 0 & 0
    \end{bmatrix}
    \begin{bmatrix}
        x_1\\
        x_2\\
        x_3
    \end{bmatrix}
\end{align*}

And actually the outcome is the image I showed before, the only problem is that it doesn't appear numbered, and the reference in text appears wrong.

5
  • Do you want the two equations to share a tag?
    – Stephen
    Jun 10, 2023 at 2:03
  • 2
    Welcome. // Please make it a habit, to post only code, which compiles after copy. By doing so you automatically avoid us being puzzled, which package(s) you may or may not have used ... Thank you
    – MS-SPO
    Jun 10, 2023 at 8:40
  • 1
    Thanks for the note @MS-SPO I'll take it into account for other posts.
    – Isaac
    Jun 12, 2023 at 5:28
  • @Stephen I want to have only one equation number, like they're just one equations, just written in two different lines
    – Isaac
    Jun 12, 2023 at 5:30
  • Both equation* and align* do not produce a numbered equation(s).
    – Werner
    Jun 12, 2023 at 17:25

1 Answer 1

1

Do you mean like the image below? enter image description here

You can use \begin{gathered}...\end{gathered}, inside \begin{equation}...\end{equation} or \begin{align}...\end{align} like this:

\documentclass{article}
\usepackage{amsmath}

\begin{document}

\begin{equation}
    \begin{gathered}
        \begin{bmatrix}
            \Dot{x}_1\\
            \Dot{x}_2\\
            \Dot{x}_3
        \end{bmatrix}
        =
        \begin{bmatrix}
            0 & 2.083 & 0\\
            0 & -1.708 & 100\\
            -0.3183k & 0 & -100
        \end{bmatrix}
        \begin{bmatrix}
            x_1\\
            x_2\\
            x_3
        \end{bmatrix}
        +
        \begin{bmatrix}
            0\\
            0\\
            3.1831k
        \end{bmatrix}
        \theta_i\\
        \theta_o = 
        \begin{bmatrix}
            0.1 & 0 & 0
        \end{bmatrix}
        \begin{bmatrix}
            x_1\\
            x_2\\
            x_3
        \end{bmatrix}
    \end{gathered}
\label{eq:matrices_estado}
\end{equation}

\end{document}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .