Vector Arrow in LaTeX (\vec{x})

x⃗\vec{x}
LaTeX command
\vec{x}
Package
No package needed: built into LaTeX
Mode
Math mode only

Where it is used

Places a small right-pointing arrow over a single letter to mark it as a vector.

School physics and many engineering texts write vectors as \vec{F}, \vec{v} or \vec{r}, while pure mathematics more often uses bold \mathbf{v} or plain letters. The arrow has a fixed size meant for one character; over two points such as AB it looks cramped, so use \overrightarrow{AB} instead. The arrow sits slightly right of center over italic letters to follow their slant. Combining it with a hat for unit vectors (\hat{\vec{x}}) works but stacks tall, so many writers use \hat{\mathbf{x}}.

Also listed under: Lineaire Algebra

Minimal compilable example

Paste this into an empty .tex file and compile it with pdfLaTeX, XeLaTeX or LuaLaTeX.

F⃗=ma⃗=dp⃗dt\vec{F} = m\vec{a} = \frac{d\vec{p}}{dt}
\documentclass{article}
\begin{document}
Vector Arrow: $\vec{x}$

\[ \vec{F} = m\vec{a} = \frac{d\vec{p}}{dt} \]
\end{document}

Related symbols

All Accenten & Modificatoren →

Frequently asked questions

How do I write Vector Arrow in LaTeX?
Type \vec{x} in math mode, for example $\vec{F} = m\vec{a} = \frac{d\vec{p}}{dt}$. It works in plain LaTeX without loading any package.
Which package do I need for \vec{x}?
None. \vec{x} is part of standard LaTeX, so it compiles with nothing in the preamble but the document class.
Can I use \vec{x} in text mode, or only in math mode?
Only in math mode. Outside $...$ LaTeX stops with "Missing $ inserted", so write $\vec{x}$ in running text.
Math poweredSchrijf LaTeX met AI

Beste AI LaTeX Editor, Overleaf Alternatief

Octree helpt onderzoekers van 15+ universiteiten sneller onderzoeksartikelen schrijven met AI

  • Genereer mooie TikZ-diagrammen met AI
  • Upload afbeelding en converteer naadloos naar LaTeX
  • Krijg directe hulp bij het schrijven en opmaken van onderzoeksartikelen