1

Here is the code.

\documentclass[18pt]{article}  
\usepackage{amsmath}
\begin{document}
\title{An Introduction to Matrix}
\maketitle

\section{Introduction}
This is an example.\\
We will talk this in great detail later.
\section{Example Part}
$A=\begin{bmatrix}
  1 & 2 & -1\\ 
  -2 & 0 & 1\\
 1 & -1 & 0
\end{bmatrix}$ 
\section{How to calculate the Inverse of A}
\end{document}

I want to add $A^(-1)$ in \section{How to calculate the Inverse of A}.

kile
  • 655
  • Welcome! \section{\boldmath How to calculate $A^{-1}$}? –  Feb 04 '20 at 08:00
  • 2
    \section{How to calculate $A^{-1}$} (the symbol for the matrix should be the same as in the text). – egreg Feb 04 '20 at 08:02
  • @Schrödinger'scat Thanks Bro. How can I draw a vertical line within Matrix? – kile Feb 04 '20 at 08:04
  • @egreg No, it should not. kile, see e.g. https://tex.stackexchange.com/a/33523. –  Feb 04 '20 at 08:06
  • @Schrödinger'scat In mathematics, and generally denote different objects that may or not be related to each other. – egreg Feb 04 '20 at 08:09
  • @egreg It is up to you to suggest whatever, but all modern books typeset it in the way I propose. It is also not ambiguous. The other parameters like size and so on change as well, and that is good because it would look awful if it didn't. –  Feb 04 '20 at 08:14
  • @egreg How to type $A^{-1}$ with bold ? – kile Feb 04 '20 at 08:22
  • @kile I tried to explain that you shouldn't embolden the A. It's mostly a question of style; you can follow the \bm advice, if you prefer to abuse notation. – egreg Feb 04 '20 at 08:25
  • Formatting carries semantic meaning for notation systems. Citing modern books as authority assumes (i) they know how to typeset, and (ii) they are able to typeset. All three propositions erode as variation becomes the template. In other words, stylisms come to predominate over communicative clarity. The tipping point will be how wide and deep the penumbra of meaning becomes. Statistically, I would expect a signal-decay shape for the curve, with a long fading tail. – Cicada Feb 04 '20 at 12:32
  • @Schrödinger'scat -- Whether or not a math expression in a bold section title is also emboldened is probably discipline-dependent. In pure math, it's reasonably common to use both a lightface and boldface (same) letter to mean different things, so in a pure math publication, it would be wrong to embolden the letter to "agree" with the fact that a section heading is bold. This is probably true also for theoretical applied math. So AMS copyeditors would check, and reverse "global" emboldening if it changes meaning. – barbara beeton Feb 04 '20 at 22:40
  • @barbarabeeton Certainly not in physics and many math journals and books. In fact, I am not aware of a single modern journal or book where they would vary the font weight, and to me it simply looks wrong. I do, however, see attempts to avoid typing formulae in section headings, or to change the font weight in those. BTW I really appreciate your recent discussion of the differential d. –  Feb 04 '20 at 22:51
  • @Schrödinger'scat -- There is value to avoiding formulae in section headings; it's even more important in titles. The main reason is that aggregators of bibliographic information often can't handle such headings properly. (Also the reason that "TeXorpdf" exists for bookmarks.) – barbara beeton Feb 04 '20 at 23:08
  • @barbarabeeton I agree with that but also would like to mention that \boldmath exists for a reason. Namely to allow one to have a consistent font weights in section headings and so on. Given that there is an agreement that the font size gets adjusted, I really do not understand the apparent disagreement on the font weight. (I just pulled out one of my favorite book to double-check what I already knew: $p$-adic really gets typset as \boldmath $p$-adic in the section title. It is a respected publisher, and the only books where I can see deviations are old, perhaps older than \boldmath.) –  Feb 04 '20 at 23:19
  • @Schrödinger'scat -- To quote from the AMS style guide (section 3.1): "Math is always permissible in section heads, but displays are not. Any math in any head appears in math mode; it is not fonted to match the section head." Tradition, long-standing. – barbara beeton Feb 05 '20 at 01:33
  • @barbarabeeton I don't know what "it is not fonted to match the section head" precisely means. Does it mean that the font shape is not to be changed? Then I agree. Does it mean that the font size does not get adjusted? Or that the font weight does not get adjusted? In either of the cases I'd just break with the tradition. –  Feb 05 '20 at 01:39
  • @Schrödinger'scat -- Font shape and weight are not adjusted. Size is adjusted. (Or, rather, size matching is automatic, not requiring explicit adjustment.) – barbara beeton Feb 05 '20 at 01:43
  • @barbarabeeton Not too bad. In two out of three points we agree. ;-) –  Feb 05 '20 at 01:44

1 Answers1

4

Regarding how to type A^1 (or any other math expression) in a section heading, ..., it depends.

For traditional publishers of pure mathematics, the answer is "enter it as ordinary math", or $A^1$. The American Mathematical Society's style guide says this (section 3.1):

Math is always permissible in section heads, but displays are not. Any math in any head appears in math mode; it is not fonted to match the section head.

Translated out of jargon, this means that the font of a math expression is not changed in a bold (or small caps) heading; it should appear exactly as it does in text.

The reason for this is that, rather often, mathematicians use both a lightface and a bold version of the same letter in the same document to mean two different things. (Sometimes, even more variations on a single letter are used!) To embolden a lightface letter (as used in text) could therefore cause confusion, especially among less experienced readers.

That said, the practice is sometimes different in disciplines other than pure math, e.g., physics. In such a case, \boldmath would serve to embolden the expression: \boldmath ... $A^1$.

A comment to the question states that this is the reason why \boldmath was created. Not so. Some fonts used for math are available only in lightface versions, and if a letter or other symbol in such a font is needed in bold form to make a necessary mathematical distinction, \boldmath (or better, \bm applied to only that character`) is a way to make the bold form available.

  • +1: What is a "display" in "but displays are not"? – Dr. Manuel Kuehner Apr 05 '20 at 23:21
  • 1
    @Dr.ManuelKuehner -- a "display" is, by definition, a chunk of math that is separate from the main, inline, text. It is what is wrapped in \[...\], the equation environment, or one of the amsmath multiline structures. – barbara beeton Apr 05 '20 at 23:26