How to denote row matrix in LaTeX?

Elements of the row matrix are located along a row according to the sequence. Latex has more than one package to define the matrix. In this tutorial, row matrix is ​​define using amsmath and physics packages.

In this case, a row must be created in the latex environment. And according to the sequence, the elements of the matrix have to be inserted in this latex environment.

... & ... & ... & ...

You notice syntax above. A row is taken here and four elements are inserted in it. & symbol is used to separate each element of the row.

amsmath package for row matrix

To be bound by brackets on both sides of the matrix, bmatrix must be passed as an argument in a latex environment.

\[ \begin{bmatrix}
    a_{1} & a_{2} & \cdots & a_{n}  
 \end{bmatrix} \]

Output :

denote row matrix by latex

physics package for row matrix

There are more than one process for defining a matrix in a physics package. However, the easiest process is to define matrix using \mqty command.

\[ \mqty[a_{1} & a_{2} & \cdots & a_{n}] \]

Output :

denote row matrix by physics package in latex

Md Jidan Mondal

LaTeX expert with over 10 years of experience in document preparation and typesetting. Specializes in creating professional documents, reports, and presentations using LaTeX.

Leave a Comment

Your email address will not be published. Required fields are marked *