Mathematical Examples Using Latex

This NB presents sample LaTex output followed by source code. To do this, source code is presented as comments in an iPython coding cell immediately following a mark-down cell that displays what the code does. A good website for finding out more LaTex syntax is: LaTex Exchange. For working with whitespace: LaTexPrimer - whitespace topic

Random Basic Syntax Examples

$5\times 5$


In [1]:
# $5\times 5$

$3 \times 3$ matrix


In [ ]:
# $3 \times 3$ matrix

$\vec j \times \vec k = \vec{\imath}$


In [2]:
# \vec j \times \vec k = \vec{\imath}
# this code was supposed to be "cross product vector product

$5\cdot 5$ $\hspace{7mm}$ $7 . 8$ $\hspace{7mm}$ $\ddot A$ $\hspace{7mm}$ $\dddot B$ $\hspace{7mm}$ $\ddddot C$ $\hspace{7mm}$ $5\dots 5$ $\hspace{7mm}$ $4\ldots 4$ $\hspace{7mm}$ $\( \dot x \)$


In [3]:
# this code was in answer to a question about Norwegian notation for '\times' (which is dot):
# $5\cdot 5$
# then there were comments about "other dots as well":
#    $7 . 8$     $\ddot A$     $7 . 8$     $\ddot A$     $\dddot B$     $\ddddot C$     $5\dots 5$     $4\ldots 4$

# to generate the horizontal whitespace between them (10mm is how much):
# $first-thing$ $\hspace{10mm}$ $second-thing$
# help indicates you use \hspace* to avoid breaking across line breaks, but this does not seem to work in this Jupyter NB

# more coding examples starting from the first one with a red \ at the start of it
#  $\( \dot x \)$

$2.5 \times 10^3 \cdot 3 \times 10^2$


In [4]:
# 2.5 \times 10^3 \cdot 3 \times 10^2

$\binom {s}{t-1}$ $\hspace{10mm}$ $\binom {1 2 3 4}{5 6 7 8}$


In [ ]:

For Future Research

International Considerations

You can for example do \let\times\cdot in the preamble of your document. That way, if your document ever gets translated to another language, the translator does not have to go and change all the math equations and formulas, they just need to replace your \let command by, for example, \let\times\longrightarrow if they are translating to a language in which multiplication is denoted by a long right arrow. This content quoted from a comment on this web page.


In [ ]: