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: Linear 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 Accents at Modifiers →

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 poweredSumulat ng LaTeX gamit ang AI

Pinakamahusay na AI LaTeX Editor, Alternatibo sa Overleaf

Tinutulungan ng Octree ang mga researcher mula sa 15+ na unibersidad na sumulat ng research papers nang mas mabilis gamit ang AI

  • Gumawa ng magagandang TikZ diagrams gamit ang AI
  • Mag-upload ng larawan at i-convert ito sa LaTeX nang walang problema
  • Makakuha ng instant na tulong sa pagsulat at pag-format ng research papers