Bold Vector in LaTeX (\mathbf{x})

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

Where it is used

Bold upright letter, the usual print convention for a vector such as x in R^n.

Linear algebra texts and physics papers mark vectors in bold, as in A\mathbf{x} = \mathbf{b}. \mathbf only affects Latin letters and digits; Greek letters such as \alpha stay unchanged, so use \boldsymbol{\alpha} for those. Note that \mathbf gives upright bold, whereas \boldsymbol{x} gives bold italic; ISO style prefers bold italic for vectors, while many textbooks use upright. Alternatives include \vec{x} with an arrow, common in introductory physics, and an underline in handwriting-style notes. Choose one convention and apply it consistently, ideally through a macro so it can be changed in one place.

Minimal compilable example

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

Ax=bA\mathbf{x} = \mathbf{b}
\documentclass{article}
\begin{document}
Bold Vector: $\mathbf{x}$

\[ A\mathbf{x} = \mathbf{b} \]
\end{document}

Related symbols

All الجبر الخطي →

Frequently asked questions

How do I write Bold Vector in LaTeX?
Type \mathbf{x} in math mode, for example $A\mathbf{x} = \mathbf{b}$. It works in plain LaTeX without loading any package.
Which package do I need for \mathbf{x}?
None. \mathbf{x} is part of standard LaTeX, so it compiles with nothing in the preamble but the document class.
Can I use \mathbf{x} in text mode, or only in math mode?
Only in math mode. Outside $...$ LaTeX stops with "Missing $ inserted", so write $\mathbf{x}$ in running text.
Math poweredاكتب LaTeX باستخدام الذكاء الاصطناعي

أفضل محرر LaTeX بالذكاء الاصطناعي، بديل Overleaf

يساعد Octree الباحثين من أكثر من 15 جامعة على كتابة أوراق البحث بشكل أسرع باستخدام الذكاء الاصطناعي

  • أنشئ رسوم TikZ جميلة باستخدام الذكاء الاصطناعي
  • ارفع صورة وحولها إلى LaTeX بسلاسة
  • احصل على مساعدة فورية في كتابة وتنسيق أوراق البحث