Matrix centering and adding the number of the equation in the right
1,060
The key to get simple numbered equations is to use the equation
environment.
In addition to the bmatrix
approach, I also give a tabstackengine
approach, which gives more flexibility on conveniently setting the baselineskip of rows, which helps when fractions like this are set.
\documentclass{article}
\usepackage{tabstackengine,amsmath}
\setstackgap{L}{1.5\baselineskip}
\setstacktabbedgap{2ex}
\begin{document}
\begin{equation}
\begin{bmatrix}
V_\alpha \\
V_\beta \\
\end{bmatrix}
= \frac{2}{3}
\begin{bmatrix}
1 & \frac{-1}{2} & \frac{-1}{2}\\
0 & \frac{\sqrt3}{2} & \frac{-\sqrt3}{2} \\
\end{bmatrix}
\begin{bmatrix}
V_a \\
V_b \\
V_c \\
\end{bmatrix}
\end{equation}
\begin{equation}
\bracketMatrixstack{
V_\alpha \\
V_\beta
}
= \frac{2}{3}
\bracketMatrixstack{
1 & \frac{-1}{2} & \frac{-1}{2}\\
0 & \frac{\sqrt3}{2} & \frac{-\sqrt3}{2}
}
\bracketMatrixstack{
V_a \\
V_b \\
V_c
}
\end{equation}
\end{document}
Author by
twimo
Updated on August 06, 2022Comments
-
twimo over 1 year
In fact, I am writing a paper and I am having a lot of equations with their respectives numbers.
So I want to center a matrix equation and write the number of the equation next to the matrix
Here is the latex code :
$ \begin{bmatrix} V_\alpha \\ V_\beta \\ \end{bmatrix} $ = $\frac{2}{3}$ $ \begin{bmatrix} 1 & \frac{-1}{2} & \frac{-1}{2}\\ 0 & \frac{\sqrt3}{2} & \frac{-\sqrt3}{2} \\ \end{bmatrix} $ $ \begin{bmatrix} V_a \\ V_b \\ V_c \\ \end{bmatrix} $
-
David Carlisle over 6 yearsremove all the
$
and put the equation in\begin{equation}...
\end{equation}` and it will be set as a displayed equation and numbered. -
Steven B. Segletes over 6 years
\documentclass{article} \usepackage{amsmath} \begin{document} \begin{equation} \begin{bmatrix} V_\alpha \\ V_\beta \\ \end{bmatrix} = \frac{2}{3} \begin{bmatrix} 1 & \frac{-1}{2} & \frac{-1}{2}\\ 0 & \frac{\sqrt3}{2} & \frac{-\sqrt3}{2} \\ \end{bmatrix} \begin{bmatrix} V_a \\ V_b \\ V_c \\ \end{bmatrix} \end{equation} \end{document}
-
twimo over 6 yearsThanks I had to add the usepackage{amssymb} to make this work
-