3

I'm trying to typeset the Gell-Mann matrices in LaTeX on Overleaf, these are 8 matrices 3x3. The code I'm using is

\documentclass[a4paper, 11pt, twoside, titlepage]{report} \usepackage{amsmath, amssymb} \begin{document} \begin{align} &\lambda^1=\begin{pmatrix} 0 & 1 & 0\\ 1 & 0 & 0\\ 0 & 0 & 0 \end{pmatrix} & &\lambda^2=\begin{pmatrix} 0 & -i & 0\\ i & 0 & 0\\ 0 & 0 & 0 \end{pmatrix} & &\lambda^3=\begin{pmatrix} 1 & 0 & 0\\ 0 & -1 & 0\\ 0 & 0 & 0 \end{pmatrix}\notag\\[7pt] &\lambda^4=\begin{pmatrix} 0 & 0 & 1\\ 0 & 0 & 0\\ 1 & 0 & 0 \end{pmatrix} & &\lambda^5=\begin{pmatrix} 0 & 0 & -i\\ 0 & 0 & 0\\ i & 0 & 0 \end{pmatrix} & &\lambda^6=\begin{pmatrix} 0 & 0 & 0\\ 0 & 0 & 1\\ 0 & 1 & 0 \end{pmatrix}\\[7pt] &\lambda^7=\begin{pmatrix} 0 & 0 & 0\\ 0 & 0 & -i\\ 0 & i & 0 \end{pmatrix} & &\lambda^8=\frac{1}{\sqrt{3}}\begin{pmatrix} 1 & 0 & 0\\ 0 & 1 & 0\\ 0 & 0 & -2 \end{pmatrix} &\notag \end{align} \end{document} 

This result in

enter image description here

I don't really like the fact that the last two matrices are aligned with the others and that lambda3 is further from from lambda2 than lambda2 is from lambda1 (same for the 2nd row). I would love for the first two rows to be aligned where I specified but for the last two matrices to be placed generically centered. I tried with other environments (i.e. gather, split) but then I can't align the first two rows... I don't seem to find a solution. I need them to be in the same "block" (so I can't use two different align environment) and to have only one numbering tag placed in the center. Is there a way to break the alignement on a single row inside the align environment?

2
  • the simplest way if you want the last line centred is to center them all (and use gathered) (or gather) Commented May 5, 2024 at 18:18
  • Welcome to TeX.SE. Commented May 5, 2024 at 19:45

2 Answers 2

5

Here's a solution that encases an alignedat{3} environment in a gathered environment, itself encased in an equation environment. Compared with aligned, alignedat offers finer control over the spacing between columns (here, set to \qquad).

enter image description here

\documentclass[a4paper, 11pt, twoside, titlepage]{report} \usepackage{amsmath, amssymb} \begin{document} \begin{equation} \begin{gathered} \begin{alignedat}{3} \lambda^1 &= \begin{pmatrix} 0 & 1 & 0\\ 1 & 0 & 0\\ 0 & 0 & 0 \end{pmatrix} &\qquad \lambda^2 &= \begin{pmatrix} 0 & -i & 0\\ i & 0 & 0\\ 0 & 0 & 0 \end{pmatrix} &\qquad \lambda^3 &= \begin{pmatrix} 1 & 0 & 0\\ 0 & -1 & 0\\ 0 & 0 & 0 \end{pmatrix} \\[2\jot] \lambda^4 &= \begin{pmatrix} 0 & 0 & 1\\ 0 & 0 & 0\\ 1 & 0 & 0 \end{pmatrix} & \lambda^5 &= \begin{pmatrix} 0 & 0 & -i\\ 0 & 0 & 0\\ i & 0 & 0 \end{pmatrix} & \lambda^6 &= \begin{pmatrix} 0 & 0 & 0\\ 0 & 0 & 1\\ 0 & 1 & 0 \end{pmatrix} \end{alignedat} \\[2\jot] \lambda^7=\begin{pmatrix} 0 & 0 & 0\\ 0 & 0 & -i\\ 0 & i & 0 \end{pmatrix} \qquad \lambda^8= \frac{1}{\sqrt{3}}\begin{pmatrix} 1 & 0 & 0\\ 0 & 1 & 0\\ 0 & 0 & -2 \end{pmatrix} \end{gathered} \end{equation} \end{document} 
4

align doesn't have any \multicolumn equivalent but you could arrange the columns have more equal spacing or use gather(ed) and not align at all.

enter image description here

\documentclass[a4paper, 11pt, twoside, titlepage]{report} \usepackage{amsmath, amssymb} \begin{document} aligned \begin{equation} \begin{aligned} \lambda^1&=\begin{pmatrix} 0 & 1 & 0\\ 1 & 0 & 0\\ 0 & 0 & 0 \end{pmatrix}\phantom{\frac{1}{\sqrt{3}}} & \lambda^2&=\begin{pmatrix} 0 & -i & 0\\ i & 0 & 0\\ 0 & 0 & 0 \end{pmatrix} & \lambda^3&=\begin{pmatrix} 1 & 0 & 0\\ 0 & -1 & 0\\ 0 & 0 & 0 \end{pmatrix}\\[7pt] \lambda^4&=\begin{pmatrix} 0 & 0 & 1\\ 0 & 0 & 0\\ 1 & 0 & 0 \end{pmatrix} & \lambda^5&=\begin{pmatrix} 0 & 0 & -i\\ 0 & 0 & 0\\ i & 0 & 0 \end{pmatrix} & \lambda^6&=\begin{pmatrix} 0 & 0 & 0\\ 0 & 0 & 1\\ 0 & 1 & 0 \end{pmatrix}\\[7pt] \lambda^7&=\begin{pmatrix} 0 & 0 & 0\\ 0 & 0 & -i\\ 0 & i & 0 \end{pmatrix} & \lambda^8&=\frac{1}{\sqrt{3}}\begin{pmatrix} 1 & 0 & 0\\ 0 & 1 & 0\\ 0 & 0 & -2 \end{pmatrix} \end{aligned} \end{equation} gathered \begin{equation} \begin{gathered} \lambda^1=\begin{pmatrix} 0 & 1 & 0\\ 1 & 0 & 0\\ 0 & 0 & 0 \end{pmatrix} \quad \lambda^2=\begin{pmatrix} 0 & -i & 0\\ i & 0 & 0\\ 0 & 0 & 0 \end{pmatrix} \quad \lambda^3=\begin{pmatrix} 1 & 0 & 0\\ 0 & -1 & 0\\ 0 & 0 & 0 \end{pmatrix}\\[7pt] \lambda^4=\begin{pmatrix} 0 & 0 & 1\\ 0 & 0 & 0\\ 1 & 0 & 0 \end{pmatrix} \quad \lambda^5=\begin{pmatrix} 0 & 0 & -i\\ 0 & 0 & 0\\ i & 0 & 0 \end{pmatrix} \quad \lambda^6=\begin{pmatrix} 0 & 0 & 0\\ 0 & 0 & 1\\ 0 & 1 & 0 \end{pmatrix}\\[7pt] \lambda^7=\begin{pmatrix} 0 & 0 & 0\\ 0 & 0 & -i\\ 0 & i & 0 \end{pmatrix} \quad \lambda^8=\frac{1}{\sqrt{3}}\begin{pmatrix} 1 & 0 & 0\\ 0 & 1 & 0\\ 0 & 0 & -2 \end{pmatrix} \end{gathered} \end{equation} \end{document} 

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.