[Tex/LaTex] Inline row vectors with smallmatrix

bracketsvector

I typeset inline column vectors with the smallmatrix environment from the amsmath package:

$\left(\begin{smallmatrix}a\\b\end{smallmatrix}\right)$

Unfortunately, when I do the same with row vectors I am not satisfied with the result since the height of the surrounding braces is the same as that of a column vector with two elements. Any recommendations of how to properly typeset the brackets?

Best Answer

I'm not sure you really want it, but here it is:

\documentclass{article}
\usepackage{amsmath}

\newcommand{\icol}[1]{% inline column vector
  \left(\begin{smallmatrix}#1\end{smallmatrix}\right)%
}

\newcommand{\irow}[1]{% inline row vector
  \begin{smallmatrix}(#1)\end{smallmatrix}%
}

\begin{document}

Text $\icol{a\\b}$ text $\irow{a&b}$ text
\end{document}

enter image description here

If you change the definition of \irow into

\newcommand{\irow}[1]{% inline row vector
  \begin{smallmatrix}(\,#1\,)\end{smallmatrix}%
}

then the result is

enter image description here

Refinements of the spacing are possible, but personally I'd go with no space.