0

I'm attempting to write out the bases of a matrix but I can't seem to get the formatting as I'd like it. I have looked online and I haven't come to an easy solution.

Here is my work around.

\documentclass[11pt,oneside,a4paper]{article}
\usepackage[margin=1in]{geometry}
\usepackage{tikz-cd}
\usepackage{enumitem}
\usepackage{fancyhdr}
\fancyhf{} % sets both header and footer to nothing
\renewcommand{\headrulewidth}{0pt}
\usepackage{fourier-orns}
\pagestyle{fancy}
\fancyhead[L,C]{}
\newcommand\descitem[1]{\item{\bfseries #1}\\}
\renewcommand\headrule{%
\hrulefill
\raisebox{-2.1pt}
{\quad\decofourleft\decotwo\decofourright\quad}%
\hrulefill}
\usepackage{amsfonts}
\usepackage[most]{tcolorbox}
\usepackage{lmodern}
\usepackage{blindtext}
\usepackage{calc}
\usepackage{ragged2e}
\usepackage{amsfonts}
\usepackage{gensymb}
\usepackage{lineno}

\begin{document}
\begin{enumerate}
\item Find the change-of-coordinates matrix from $\mathcal{B}$ to the standard basis in $\mathbb{R}^n$.\\
\begin{equation*}
  \mathcal{B} = \Bigg\{\begin{bmatrix} 3 \\ -1 \\ 4 \end{bmatrix},\begin{bmatrix} 2 \\ 0 \\ -5 \end{bmatrix},\begin{bmatrix} 8 \\ -2 \\ 7 \end{bmatrix}\Bigg\}
\end{equation*}
\end{enumerate}
\end{document} 

The desired result looks something like this.

desired result

What I am currently getting.

not pretty

2 Answers 2

3

A few notes:

  • Only load the packages you are actually using in your document.
  • Load mathtools instead of amsmath to use the bmatrix* environment, which allows right-justification
  • Use \left and \right to size your braces when you need them bigger than \Bigg, but use \Biggl and \Biggr for proper spacing when you do use \Bigg.
  • Don't use \\ at the end of \item
  • \equation* has the same meaning as \[ ... \]

enter image description here

\documentclass{article}

\usepackage{amssymb} % for \mathbb
\usepackage{mathtools} % for bmatrix*
\usepackage{lmodern} % slight shape changes

\begin{document}
\begin{enumerate}
\item Find the change-of-coordinates matrix from $\mathcal{B}$ to the standard basis in $\mathbb{R}^n$.
\[
  \mathcal{B} = \left\{\begin{bmatrix*}[r] 3 \\ -1 \\ 4 \end{bmatrix*},
  \begin{bmatrix*}[r] 2 \\ 0 \\ -5 \end{bmatrix*},
  \begin{bmatrix*}[r] 8 \\ -2 \\ 7 \end{bmatrix*}\right\}
\]
\end{enumerate}
\end{document} 
1
  • Actually, amsmath recommends using equation* instead of \[...\], for the simple reason that it's easier to remove/insert the * to add/remove the equation number.
    – egreg
    Apr 24, 2022 at 8:35
0

Commands like \big, \Bigg etc. manually define the size of your braces and delimiters. So you will only ever get one size of a bracket per command. Using \left\{ ... \right\} will dynamically resize the brackets to fit what is inside.

This is what i personally use so that i do not have to guess the correct sizes.

1
  • In general, always using \left/right is not a good idea as there are many situations where the generated size is inappropriate
    – daleif
    Apr 24, 2022 at 8:58

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .