# How do you write a vector with an underline instead of an arrow?

I don't like the way the vector with an arrow $\vec{x}$ looks. I would prefer to indicate it with a line underline but when I google it nothing comes up to show me how to do it. Does anyone know?

\documentclass[a4paper,11pt]{article}

\begin{document}

\vec{x}

\end{document}

-
Welcome to TeX.sx! Please add a minimal working example (MWE) that illustrates your problem. –  Kurt Oct 7 '12 at 19:53
I did but someone edited it out. –  Magpie Oct 7 '12 at 20:30
the macro itself is not an MWE. It is customary here to include the simplest document starting from \documentclass{...} ... \end{document} such that users can copy/paste your code and work on it directly. –  percusse Oct 7 '12 at 21:05

Here is a comparison of a few techniques to represent a vector (not sure about the \overline, \underline ones as I don't think that that is standard usage):

## Code:

\documentclass{article}
\usepackage{amsmath}

\begin{document}
$\vec{x}$  $\overline{x}$  $\underline{x}$  $\mathbf{x}$

$\vec{\mathbf{x}}$  $\overline{\mathbf{x}}$  $\underline{\mathbf{x}}$
\end{document}

-
I really dislike using \mathbf since the font changes to upright. I want my vectors italic according to ISO 80000-2. Previously I have used the Boldmath bm package, now I use isomath for this. –  Martin Ueding Jul 25 at 20:08
@MartinUeding: I am not familiar with isomath. Perhaps you should post an answer. –  Peter Grill Jul 26 at 1:42

You can renew the command \vec.

\renewcommand{\vec}[1]{\underline{#1}}


In this case, if you use \vec your vector will be underlined. If you change mind and you want to use a dot or whatever, you can change the definition and all your \vec on the document will automatically change in the next compilation.

\documentclass{standalone}
\usepackage{amsmath}

\renewcommand{\vec}[1]{\underline{#1}}

\begin{document}
$\vec{x} = \cdots % "x" will be underlined$
\end{document}

-