What Does a Superscript 1 Mean in an Art
This folio introduces various useful commands for rendering math in LaTeX, likewise as instructions for edifice your own commands.
Contents
- 1 Subscripts and Superscripts
- 2 Math Commands
- 2.i Fractions
- 2.2 Radicals
- 2.3 Sums, Products, Limits and Logarithms
- 2.4 Mods
- 2.five Combinations
- two.6 Trigonometric Functions
- 2.7 Calculus
- two.8 Overline and Underline
- 3 LaTeX
- 3.1 Other Functions
- 4 Matrices
- 5 Text Styles in Math Way
- vi How to Build Your Own Commands
- seven Run into Also
Subscripts and Superscripts
Subscripts and superscripts (such as exponents) can be made using the underscore _ and carat ^ symbols respectively.
Symbol | Control | Symbol | Command |
---|---|---|---|
![]() | 2^2 | ![]() | a_i |
![]() | 2^{23} | ![]() | n_{i-one} |
![]() | a^{i+ane}_3 | ![]() | ten^{iii^ii} |
![]() | 2^{a_i} | ![]() | 2^a_i |
Notice that we can apply both a subscript and a superscript at the same time. For subscripts or superscripts with more than one character, you must surroundings with curly braces. For instance, x^ten
produces , while
x^{ten}
produces .
Math Commands
Here are some usually used math commands in LaTeX:
Fractions
Symbol | Command |
---|---|
![]() | \frac{1}{2} or \frac12 |
![]() | \frac{2}{x+2} |
![]() | \frac{one+\frac{1}{ten}}{3x + 2} |
Notice that with fractions with a 1-digit numerator and a 1-digit denominator, we tin can but group the numerator and the denominator together every bit one number. However, for fractions with either a numerator or a denominator that requires more than one character (or if the numerator starts with a alphabetic character), you need to surround everything in curly brackets.
Use \cfrac for continued fractions.
Expression | Command |
---|---|
![]() | \cfrac{two}{ane+\cfrac{2}{1+\cfrac{2}{1+\cfrac{2}{1}}}} |
Radicals
Symbol | Command |
---|---|
![]() | \sqrt{3} |
![]() | \sqrt{ten+y} |
![]() | \sqrt{10+\frac{1}{2}} |
![]() | \sqrt[3]{iii} |
![]() | \sqrt[due north]{ten} |
Sums, Products, Limits and Logarithms
Utilize the commands \sum, \prod, \lim, and \log respectively. To announce lower and upper bounds, or the base of the logarithm, use _ and ^ in the same mode they are used for subscripts and superscripts. (Lower and upper bounds for integrals work the same mode, as you'll see in the calculus department)
Symbol | Command |
---|---|
![]() | \sum_{i=ane}^{\infty}\frac{one}{i} |
![]() | \prod_{due north=ane}^v\frac{due north}{north-one} |
![]() | \lim_{ten\to\infty}\frac{1}{10} |
![]() | \lim\limits_{ten\to\infty}\frac{1}{x} |
![]() | \log_n n^ii |
Some of these are prettier in display mode:
Symbol | Control |
---|---|
![]() | \sum_{i=1}^{\infty}\frac{1}{i} |
![]() | \prod_{n=1}^5\frac{northward}{n-1} |
![]() | \lim_{ten\to\infty}\frac{1}{x} |
Note that nosotros can employ sums, products, and logarithms without _ or ^ modifiers.
Symbol | Command |
---|---|
![]() | \sum\frac{ane}{i} |
![]() | \frac{n}{n-1} |
![]() | \log northward^2 |
![]() | \ln east |
Mods
Symbol | Command |
---|---|
![]() | 9\equiv 3 \bmod{vi} |
![]() | nine\equiv 3 \pmod{6} |
![]() | 9\equiv 3 \mod{6} |
![]() | 9\equiv iii \pod{6} |
Combinations
Symbol | Command |
---|---|
![]() | \binom{one}{one} |
![]() | \binom{northward-i}{r-1} |
These often look better in display way:
Symbol | Command |
---|---|
![]() | \dbinom{9}{three} |
![]() | \dbinom{due north-1}{r-one} |
Trigonometric Functions
Almost of these are but the abbreviation of the trigonometric role with simply a backslash added earlier the abridgement.
Symbol | Command | Symbol | Command | Symbol | Command |
---|---|---|---|---|---|
![]() | \cos | ![]() | \sin | ![]() | \tan |
![]() | \sec | ![]() | \csc | ![]() | \cot |
![]() | \arccos | ![]() | \arcsin | ![]() | \arctan |
![]() | \cosh | ![]() | \sinh | ![]() | \tanh |
![]() | \coth |
Hither are a couple examples:
Symbol | Control |
---|---|
![]() | \cos^2 x +\sin^2 ten = 1 |
![]() | \cos 90^\circ = 0 |
Calculus
Below are examples of calculus expressions rendered in LaTeX. Most of these commands have been introduced before. Notice how definite integrals are rendered (and the difference between regular math and display mode for definite integrals). The \, in the integrals makes a small space before the dx.
Symbol | Command |
---|---|
![]() | \frac{d}{dx}\left(x^2\right) = 2x |
![]() | \int 2x\,dx = x^2+C |
![]() | \int^5_1 2x\,dx = 24 |
![]() | \int^5_1 2x\,dx = 24 |
![]() | \frac{\partial^2U}{\partial ten^2} + \frac{\partial^2U}{\partial y^2} |
![]() | \frac{one}{4\pi}\oint_\Sigma\frac{ane}{r}\frac{\partial U}{\partial northward} ds |
Overline and Underline
Symbol | Command |
---|---|
![]() | \overline{a+bi} |
![]() | \underline{747} |
LaTeX
Other Functions
Symbol | Command | Symbol | Control | Symbol | Command |
---|---|---|---|---|---|
![]() | \arg | ![]() | \deg | ![]() | \det |
![]() | \dim | ![]() | \exp | ![]() | \gcd |
![]() | \hom | ![]() | \inf | ![]() | \ker |
![]() | \lg | ![]() | \liminf | ![]() | \limsup |
![]() | \max | ![]() | \min | ![]() | \Pr |
![]() | \sup | ![]() | \smiley |
Some of these commands take subscripts in the same way sums, products, and logarithms do. Some render differently in display way and regular math manner.
Symbol | Command | Symbol | Command | Symbol | Command |
---|---|---|---|---|---|
![]() | \dim_x | ![]() | \gcd_x | ![]() | \inf_x |
![]() | \liminf_x | ![]() | \limsup_x | ![]() | \max_x |
![]() | \min_x | ![]() | \Pr_x | ![]() | \sup_x |
Matrices
Nosotros can build an assortment or matrix with the \brainstorm{array}…\terminate{array} commands, and employ \left and \right to properly size the delimiters around the matrix:
The characteristic polynomial $f(\lambda)$ of the $3 \times 3$ matrix \[ \left( \brainstorm{array}{ccc} a & b & c <br />d & east & f <br />one thousand & h & i \terminate{assortment} \right)\] is given past the equation \[ f(\lambda) = \left| \begin{array}{ccc} \lambda - a & -b & -c <br />-d & \lambda - due east & -f <br />-g & -h & \lambda - i \end{array} \correct|.\]
More than just, we can use the shortcut matrix environments in the amsmath package:
The characteristic polynomial $f(\lambda)$ of the $3 \times 3$ matrix \[ \begin{pmatrix} a & b & c <br />d & e & f <br />g & h & i \end{pmatrix} \] is given past the equation \[ f(\lambda) = \begin{vmatrix} \lambda - a & -b & -c <br />-d & \lambda - e & -f <br />-g & -h & \lambda - i \stop{vmatrix}.\]
You can read more than about how the assortment environs works here (it works the same as tabular).
We can also use this environment to typeset any mathematics that calls for multiple columns, such as piecewise-divers functions like this i:
\[ f(x) = \left\{ \begin{assortment}{ll} x+7 & \mbox{if $5< 10$};<br />ten^two-iii & \mbox{if $-3 \le x \le 5$};<br />-10 & \mbox{if $10 < -3$}.\end{assortment} \right. \]
But information technology would be better to use the cases environment and \text command that the amsmath package provides:
\[ f(x) = \begin{cases} x+7 & \text{if $5< x$}; <br />ten^ii-3 & \text{if $-3 \le x \le five$};<br />-x & \text{if $x < -iii$}. \cease{cases} \]
Text Styles in Math Way
Y'all can return letters in diverse styles in math mode. Below are examples; y'all should be able to utilize these with whatsoever letters. The \mathbb requires the amsfonts packet to be included in your document's preamble. Do non try to do \mathbb{yr}. Y'all'll get , and that looks nothing like information technology!
Symbol | Command | Symbol | Command | Symbol | Control | Symbol | Command |
---|---|---|---|---|---|---|---|
![]() | \mathbb{R} | ![]() | \mathbf{R} | ![]() | \mathcal{R} | ![]() | \mathfrak{R} |
![]() | \mathbb{Z} | ![]() | \mathbf{Z} | ![]() | \mathcal{Z} | ![]() | \mathfrak{Z} |
![]() | \mathbb{Q} | ![]() | \mathbf{Q} | ![]() | \mathcal{Q} | ![]() | \mathfrak{Q} |
If you're persistent, you can dig a few more out of this certificate.
If you lot want to drop a little bit of text in the eye of math mode, you tin use the \text command. The \text command is most useful in $$...$$ or $...$ mode, where breaking up the math way would forcefulness the output on to a new line entirely. So
$$n^2 + v = 30\text{ so we have }n=\pm5$$
gives
How to Build Your Own Commands
The command \newcommand is used to create your own commands. We'll starting time with an example:
\documentclass[11pt]{article} \usepackage{amsmath} \pdfpagewidth viii.5in \pdfpageheight 11in \newcommand{\reci}[one]{\frac{1}{#1}} \newcommand{\hypot}[2]{\sqrt{#1^2+#2^ii}} \newcommand{\cbrt}[1]{\sqrt[3]{#ane}} \brainstorm{document} The reciprocal of 2 is $\reci{2}$. The hypotenuse has length $\hypot{3}{4}$. I'm sick of writing `$\backslash$sqrt[3]{2}$' all the time, just to get $\cbrt{2}$. \cease{certificate}
The \newcommand declarations are in the preamble. Each is of the grade
\newcommand{name of new command}[number of arguments]{definition}
The name of the new command, which must begin with a \, is the name yous'll apply in the document to use the command. The number of arguments is how many inputs will be sent to the control. The definition is but normal LaTeX lawmaking, with #1, #2, #iii, etc., placed where you desire the inputs to go when the new command is chosen.
New commands can exist used for all sorts of purposes, not just for making math commands you'll use a lot easier to telephone call. For instance, try this:
\documentclass[11pt]{article} \usepackage{amsmath} \pdfpagewidth 8.5in \pdfpageheight 11in \newcounter{prob_num} \setcounter{prob_num}{one} \newcommand{\prob}[5]{\bigskip \bigskip\arabic{prob_num}.\stepcounter{prob_num} #1 \par\nopagebreak[four]\medskip A.\ #2\hfill B.\ #3\hfill C.\ #4\hfill D.\ #five\hfill Due east.\ NOTA} \begin{document} \prob{What is $2+2$?}{iv}{5}{6}{vii} \prob{What is $\sqrt{100}$?}{81}{ten}{9}{i} \prob{Evaluate $\sum_{north=1}^\infty \frac{i}{north^2}$.} {$\frac{i}{e}$} {$\frac{2}{\pi}$} {$\frac{\pi^3}{viii}$} {$\frac{\pi^two}{half dozen}$} \end{document}
In the example above, we create a new control called \prob. Each time we call \prob, nosotros supply 5 arguments, one for the question and one for each of the multiple choices.
In the preamble and the definition of \prob, yous'll see a few new LaTeX commands:
\newcounter{prob_num} creates a counter variable chosen prob_num
\setcounter{prob_num}{i} setsprob_num to equal one.
In the definition of \prob, the \bigskip and \medskip commands create vertical space.
\arabic{prob_num} prints out the current value of the counter prob_num every bit an arabic numeral.
\stepcounter{prob_num} increments the counter prob_num by i.
\nopagebreak[4] tells LaTeX not to break the page between the problem and the choices unless information technology actually, really, really has to.
The \hfill commands put roughly equal infinite between the choices.
Once you build a body of custom commands that you will be using in many LaTeX documents, yous should learn about creating your own package and so you don't have to copy all your custom commands from document to certificate.
Come across Besides
- Next: Packages
- Previous: Symbols
Source: https://artofproblemsolving.com/wiki/index.php/LaTeX:Commands
0 Response to "What Does a Superscript 1 Mean in an Art"
Postar um comentário