I usually add

\newcommand{\M}[1]{\bm{#1}}                  % Matrix
\newcommand{\V}[1]{\boldsymbol{\mathbf{#1}}} % Vector

to my preambles. Short command names because I use them very often. Is this considered a proper or correct way to do matrix/vector typesetting? (Not the typesetting itself, but the commands used.)

  • Do you know vector package?
    – Ignasi
    Jun 8, 2015 at 6:35

1 Answer 1


It does not matter, what commands you are taking. If they are already defined for something else, you will notice that soon. And you can always check by typing \show\M in your document. Have a look in your .log then.

However, I would not recommend such short macros. First point: The longer, the less likelihood of duplications. Second point: It gets much easier to read for other (and sometimes even for you, if you look in older documents).

I tend to use three characters at least. As you use upper case her, this would mean just one key stroke more for my solution. Please see my MWE!

% arara: pdflatex

\newcommand*{\mat}[1]{\bm{#1}} % everybody understands "mat" and it's easy to type. Use a star here (http://tex.stackexchange.com/q/1050)!
\renewcommand*{\vec}[1]{\mathbf{#1}} % \vec is the typical command in LaTeX. I would redefine it. Like this, others will be able to copy parts of your code and to reuse them with the 'normal' arrow on top of vectors.


The \boldsymbol was kind of redundant here. I deleted it. Maybe you have to show us some compilable code, if you really needed that in the first place.

My own recommendation for those two command would be, to use \bm for both. They are both variables and should therefore be set italic.

  • Thank you. I agree to the length thing. The combination \boldsymbol\mathbf is to make vectors upright bold. Only \mathbfgives non-bold greek letters. Jun 9, 2015 at 20:19

You must log in to answer this question.

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