# Increasing the size of a symbol "|"

I'm using LyX, and I'm trying to create a large |, as shown in the following image:

If I'll use:

G=\left\{ \begin{pmatrix}t & 0\\
0 & \frac{1}{t}
\end{pmatrix}|t\in\mathbb{R}^{\times}\right\}


I would get:

Is it possible to make the | symbol larger without using any external modules?

• This question reminds me of something similar: was it, perhaps, this question?
– GuM
Dec 19, 2018 at 21:51

You can use \middle|, and you have to add some horizontal spacing on the right and on the left.

Even if you don't want to use external package modules, I suggest using the DeclarePairedDelimiter from mathtools (which is just an extension of amsmath, which takes care of all the spacing problems, and loading xparse to simplify the syntax (both arguments are separated by a ;). Here is a code for each solution:

\documentclass{article}
\usepackage{xparse, mathtools, amsfonts}

\DeclarePairedDelimiterX{\set}[1]\{\}{\setargs{#1}}
\NewDocumentCommand{\setargs}{>{\SplitArgument{1}{;}}m}
{\setargsaux#1}
\NewDocumentCommand{\setargsaux}{mm}
{\IfNoValueTF{#2}{#1}{\nonscript\,#1\nonscript\;\delimsize\vert\nonscript\:\allowbreak #2\nonscript\,}}

\begin{document}

$G=\left\{ \begin{pmatrix}t & 0\\ 0 & \frac{1}{t} \end{pmatrix}\,\middle|\, t\in\mathbb{R}^{\times}\right\}$
\bigskip

$G=\set*{ \begin{pmatrix}t & 0\\ 0 & \frac{1}{t} \end{pmatrix} ; t\in\mathbb{R}^{\times}}$

\end{document}


First off, I would use inline-fraction notation, 1/t, instead of \frac{1}{t} in order to typeset the matrix more compactly. If you're OK with using psmallmatrix instead of pmatrix, you can then get by with \bigl(, \bigm| (or \bigm\vert), and \bigr). If you prefer using pmatrix, use \biggl(, \biggm|, and \biggr) instead.

Observe that \biggm| automatically adds the typographically required amount of whitespace around the vertical bar. This is in contrast to \bigg|, wwhere no whitespace is inserted.

\documentclass{article}
\usepackage{mathtools} % for 'psmallmatrix' env.
\usepackage{amssymb}   % for '\mathbb' macro
\begin{document}
\begin{align*}
G&=\bigl\{
\begin{psmallmatrix} t & 0\\ 0 & 1/t \end{psmallmatrix}
\bigm|
t\in\mathbb{R}^{\times}
\bigr\} \\
&=\biggl\{
\begin{pmatrix} t & 0\\ 0 & 1/t \end{pmatrix}
\biggm|
t\in\mathbb{R}^{\times}
\biggr\}
\end{align*}
\end{document}


I don't think this is a Lyx-specific issue. Does this work for you?

\documentclass{article}

\usepackage{amsmath}

\begin{document}

$G=\left\{ \left. %ADDED (as a blank bracket) \begin{pmatrix} t & 0\\ 0 & \frac{1}{t} \end{pmatrix} \right| %ADDED (as expandable bracket) t\in\mathbb{R}^{\times}\right\}$

\end{document}


The way this works is be wrapping another set of brackets around the pmatrix environment. The first one is empty (\left.) while the you replace the current | as the companion right bracket (\right|). This allows it to match the height automatically.

For to increase simply the | symbol an alternative might be to use the commands \bigg\vert, or \Bigg\vert. See the my MWE with the picture.

\documentclass{article}
\usepackage{mathtools,amssymb}

\begin{document}

$G=\Biggl\{ \begin{pmatrix} t & 0\\ 0 & \frac{1}{t} \end{pmatrix} \bigg\vert \,t\in\mathbb{R}^{\times}\Biggr\}$

\end{document}


2nd example:

\documentclass{article}
\usepackage{mathtools,amssymb}

\begin{document}

$G=\Biggl\{ \begin{pmatrix} t & 0\\ 0 & \frac{1}{t} \end{pmatrix} \Bigg\vert \,t\in\mathbb{R}^{\times}\Biggr\}$

\end{document}

• If you write \Biggm\vert instead of \Bigg\vert, one needn't engage in visual formatting by inserting a \, instruction.
– Mico
Dec 19, 2018 at 21:22
• @Mico Thank you very much for your comment. I saw your answer that I appreciated so much. I absolutely did not know of the existence of \biggm. Dec 19, 2018 at 21:30

I'm not sure if an array is OK to use or not, but this is simple.

\documentclass{article}
\usepackage{amsmath,amsfonts}
\begin{document}

$G=\left\{\begin{array}{@{}c|c@{}} \begin{pmatrix} t & 0\\ 0 & \frac1t \end{pmatrix} & t\in\mathbb{R}^\times \end{array}\right\}$

\end{document}