# To write this norm equation better?

I have this norm

\documentclass{article}
\usepackage{amsmath}
\begin{document}
$$\lVert f \rVert_{L_{2}(\Omega)} = \text{sup}_{ \begin{cases} v \in L_{2}(\Omega) \\ v \not= 0 \end{cases} } \frac{|(f,v)|} {\lVert v \rVert_{L_{2}(\Omega)}}$$
\end{document}


which looks like

In the Johnson book about Finite Element methods the regulations are under the suprenum. However, I am not sure if this is the best way to present this.

How can you write this equation rigorously?

If you have many norms in your document, it's better to use mathtools for simplifying input. I also add a \normL macro defined with the help of xparse.

Note that the commands \abs and \norm (as well as \normL) accept an optional argument which can be \big, \Big, \bigg or \Bigg in order to resize the fences; they can also be followed by * to imply usage of \left and \right.

The most important part is, however, \substack:

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

\DeclarePairedDelimiter{\abs}{\lvert}{\rvert}
\DeclarePairedDelimiter{\norm}{\lVert}{\rVert}
\NewDocumentCommand{\normL}{ s O{} m }{%
\IfBooleanTF{#1}{\norm*{#3}}{\norm[#2]{#3}}_{L_2(\Omega)}%
}

\begin{document}
$$\norm{f}_{L_{2}(\Omega)} = \sup_{\substack{v \in L_{2}(\Omega) \\ v \not= 0}} \frac{\abs{(f,v)}}{\norm{v}_{L_{2}(\Omega)}}$$
% Simplified notation with \normL
$$\normL{f} = \sup_{\substack{v \in L_{2}(\Omega) \\ v \not= 0}} \frac{\abs{(f,v)}}{\normL{v}}$$
\end{document}


• I can not see difference between (1) and (2). Should I change my glasses? lol Commented Jan 3, 2014 at 17:28
• @Sigur The two inputs are indeed supposed to give the same output. Commented Jan 3, 2014 at 17:29
• Ah, great! See them here, with a small xshift to compare: dl.dropboxusercontent.com/u/42709342/q26hp.png Commented Jan 3, 2014 at 17:33
• I love your way of using DeclarePair, since it improves the readability of Mathematics inside TeX much. Commented Jan 3, 2014 at 22:14
• @masi You're supposed to say \abs[\Big]{x}. Commented Jan 3, 2014 at 22:49

First, you should use \sup. With amsmath you can use \substack{} which allows multiple lines on the index.

With \nolimits the index is not below the \sup.

$$\lVert f \rVert_{L_{2}(\Omega)} = \sup\nolimits_{ \substack{v \in L_{2}(\Omega) \\ v \neq 0 } } %% \neq used \frac{|(f,v)|}{\lVert v \rVert_{L_{2}(\Omega)}}$$


The default is below the \sup.

$$\lVert f \rVert_{L_{2}(\Omega)} = \sup_{ \substack{v \in L_{2}(\Omega) \\ v \neq 0 } } \frac{|(f,v)|}{\lVert v \rVert_{L_{2}(\Omega)}}$$


Like @Sigur, I would use \sup and a \substack directive rather than a cases environment to place v \in L_{2}(\Omega) and v \not= 0 immediately below sup.

In addition, in order to achieve a slightly better positioning (IMNSHO) of the subscript term L_2(\Omega) with respect to the norm terms, I suggest you define a macro called \norm that uses explicit \left and \right directives, as in

\newcommand{\norm}[1]{\left\lVert #1 \right\rVert}


Note that the size of the double vertical bars that encase the f and v terms won't be affected by the presence of these additional directives. The purpose of using \left and \right, then, is purely to affect the positioning of the superscript term, which will be lower than if \left and \right weren't used in conjunction with \lVert and \rVert.

\documentclass{article}
\usepackage{amsmath}
\newcommand{\abs}[1]{ \left\lvert#1\right\rvert} % absolute value: single vertical bars
\newcommand{\norm}[1]{\left\lVert#1\right\rVert} % norm: double vertical bars

\begin{document}
$$\norm{f}_{L_{2}(\Omega)} = \sup_{ \substack{v \in L_{2}(\Omega) \\ v \not= 0} } \frac{ \abs{(f,v)} }{ \norm{v}_{L_{2}(\Omega)} }$$
\end{document}

• Sorry, but the definition of \abs and \norm are wrong. Commented Jan 3, 2014 at 15:42
• @egreg - Would you mind elaborating? In the examples at hand, there is no difference between the output created by "my" macros and those generated via the \DeclarePairedDelimiter macro of the mathtools package. Hence, "my" macros can't be that wrong!
– Mico
Commented Jan 3, 2014 at 17:10
• Yes, they are, because they always use \left and \right; you know I'm adamant at this. Commented Jan 3, 2014 at 17:12
• @egreg - I agree with you that the automatic insertion of extra whitespace effected by \left and \right is, in general, undesirable. However, in the specific case of absolute-value and norm expressions, I believe there's actually a (modest) virtue to having LaTeX insert a bit of extra space outside these terms, especially when there are several consecutive such terms: the bit of extra space provides some visual "breathing room" that helps the eye parse the expressions. Give it a try with formulas such as $k\abs{f}\abs{g}$ and $a\norm{u}\norm{v}$...
– Mico
Commented Jan 3, 2014 at 17:23
• No, that's solved by $a\norm{u}\,\norm{v}$. Commented Jan 3, 2014 at 17:30