Underleaf Logo
Underleaf
PricingBlogAffiliatesInstall for OverleafGet Started

How to Write Vectors in LaTeX

August 15, 2025

How to Write Vectors in LaTeX

Writing vectors in LaTeX is essential for mathematics, physics, and engineering documents. This comprehensive guide covers all the different ways to represent vectors in LaTeX, from basic notation to advanced formatting techniques.

Basic Vector Notation in LaTeX

There are several ways to represent vectors in LaTeX. The most common approaches are using bold notation and arrow notation. Here are the standard methods:

1. Bold Vector Notation

The most common way to write vectors is using bold notation. Use \mathbf{} for bold vectors:

For unit vectors, you typically use \hat{} with bold notation:

2. Arrow Vector Notation

Arrow notation is also popular, especially in physics. Use \vec{}:

Vector Components and Matrices

Vectors are often represented as column matrices. Here are different ways to format vector components:

Column Vectors

Row Vectors

Vector Operations in LaTeX

Here are common vector operations and how to write them in LaTeX:

Dot Product

Cross Product

Vector Magnitude

Advanced Vector Formatting

Vector Fields

Gradient Vector

Vector Equations

Common Vector Symbols and Commands

Here’s a reference table of common vector-related LaTeX commands:

  • \mathbf{v} - Bold vector
  • \vec{v} - Arrow vector
  • \hat{v} - Unit vector
  • \cdot - Dot product
  • \times - Cross product
  • \|v\| - Vector norm/magnitude
  • \nabla - Del/nabla operator
  • \begin{pmatrix} - Column vector with parentheses
  • \begin{bmatrix} - Column vector with brackets

Best Practices for Vector Notation

  • Consistency: Choose either bold (\mathbf) or arrow (\vec) notation and stick with it throughout your document
  • Unit vectors: Always use \hat{} for unit vectors to distinguish them from regular vectors
  • Spacing: Use proper spacing around vector operations with \, or \quad
  • Subscripts: Use descriptive subscripts like v_x, v_y, v_z for components

Examples for Different Fields

Physics: Force Vectors

Engineering: Position Vectors

Mathematics: Vector Spaces

Mastering vector notation in LaTeX is essential for anyone working in STEM fields. With these techniques and commands, you’ll be able to create professional-looking mathematical documents with proper vector notation. Remember to maintain consistency in your notation style and use the appropriate commands for your specific field of study.

Underleaf Logo
Underleaf

Empowering students and researchers with AI-powered tools for academic writing.

Go to app

Company

PricingBlogLearnFor TeamsAffiliates

© 2025 Underleaf. All rights reserved.