4
\begin{align}

&\vec{\nabla} \cdot \vec{E} = \frac{\rho}{\epsilon_0} & \text{Gauss’s Law}\\

&\vec{\nabla} \cdot \vec{B} = 0 & \text{Gauss’s Law for Magnetism}

\end{align}

enter image description here

Bernard
  • 271,350

2 Answers2

12

. You've forgotten that n alignment points requires 2n -1 ampersands: one to introduce each alignment column but the first, and one for each alignment point in its column. So try this:

\begin{align}    
\vec{\nabla} \cdot \vec{E} &= \frac{\rho}{\epsilon_0} & &\text{Gauss’ Law}\\
\vec{\nabla} \cdot \vec{B} &= 0 & &\text{Gauss’ Law for Magnetism}    
\end{align}
Bernard
  • 271,350
3

A different approach using a simple enviroment array where I have used a different aesthetic of LaTeX-code. It is possible also to use also alignat instead of an array.

\documentclass[a4paper,12pt]{article}
\usepackage{amsmath,amssymb}
\begin{document}
\[
\begin{array}{lll}
\boldsymbol{\nabla}\cdot \mathbf{E} = \dfrac{\rho}{\epsilon_0} &\qquad \text{Gauss's Law}\\
\boldsymbol{\nabla}\cdot \mathbf{B} = \mathbf{0} &\qquad  \text{Gauss's Law for Magnetism} 
\end{array}
\]
\end{document}

enter image description here

Sebastiano
  • 54,118