What is the correct way to typeset a matrix or vector with subscript/index? Should the index be part of the vector with the
Variant 1:
\vec{x}_i \mat{A}_i %\mat being defined as upright bold
Variant 2:
\vec{x_i} \mat{A_i}
And what about a superscript (like T for transpose)?
Let's say \vec{x}
is a column vector that I want to show as being transposed. How should the T be typeset? Should it be inside or outside the \vec
command?
Variant 1:
\vec{x}_i^T
Variant 2:
\vec{x_i^T}
EDIT: This part of the question originally asked, whether ^T
is the right way of expressing transposition of a matrix/vector. This is being answered by What is the best symbol for vector/matrix transpose?.
MWE:
\documentclass{article}
\newcommand{\mat}[1]{\mathbf{#1}}
\begin{document}
Variant 1:
$\vec{x}_i \mat{A}_i$
Variant 2:
$\vec{x_i} \mat{A_i}$
Superscripts: \\
Variant 1:
$\vec{x}_i^T$
Variant 2:
$\vec{x_i^T}$
\end{document}
Best Answer
An index can be a scalar, or a vector in its own right: compare
$\vec{x}_r$
with$\vec{x}_{\vec{r}}$
- these are different mathematical entities! The dimensions of the index may not coincide with the dimensions of the indexed object.Therefore as a general rule your variant 1 should be preferred: it shows that the quantity is a vector or a matrix with a scalar index (or vector index if appropriate).
Of course some journals and publishers introduce their own "house styles" which may have different recommendations. Sadly enough, sometimes these "house styles" are written without input from the mathematicians, so I can envision a style that requires (mathematically unsound) variant 2.