This is a guide for those who want to learn use $\LaTeX$ or simple formatting. If you want to contribute on brilliant, then you should use $\LaTeX$ in many cases. This makes your posts more readable.

When you don't know how to write a symbol, then use the Google. I will post there only the important symbols.

There are lots of $\LaTeX$ guides, but I think my guide is the most readale and complete. Let's start the learning.

$\LaTeX$ is a formatting(or markdown) language to format documents or write formulas. In this web page we can't format documents, therefore lots of commands isn't working.

This paragraph will help you to format your posts without $\LaTeX$. This is a markdown language, like HTML.

$$

What you type What you get `*italics*`

or`_italics_`

italics`**bold**`

or`__bold__`

boldYou can combine the two styles like these:

`***Hello!***`

`*__Hello!__*`

`___Hello!___`

All possible combinations are correct. Each will appear as

.Hello!

$\\[-20px]$

See this example:

`I love to do it`

I love to do this

Now try it with two or more spaces at the end of the lines:

`I love to do it`

I

love

to

do

thisNow try to take empty spaces:

`I love to do it`

I

love

to

do

this

If you fil the empty lines with spaces you will get the same result. If you want to take more empty sapces you should use $\LaTeX$ codes. But this isn't the $\LaTeX$ section, so let's continue.

$\\[-20px]$

`> It will appear like this quote`

It will appear like this quote

Let's see some examples:

`> This is an example`

This is an example

Now try it with two or more spaces at the end of each lines:

`> This is an example`

This

is

an

exampleNow try to connect two quotes:

`> This is > an example`

This is

an exampleIf you want to separate them, then you should write something between them(this can be an empty $\LaTeX$ code too):

`> This is an > example`

This is

an

example

$\\[-20px]$

`- buletted`

or`* bulleted`

or`+ bulleted`

and`1. numbered`

Usefull things:

- You always should take an empty line before and after the list(If you don't take before it, then it will appear like a simple text, but if you don't take after it, then the simple text will be
connected to the list) - You should take a space after the - sign

I will show the examples with only bulleted lists:

`This isn't a - bulleted list - bulleted list - bulleted list continue - shifted list`

This isn't a - bulleted list

bulleted list

bulleted list

continue

- shifted list
$\\$

Let's see this one:

`* It won't * break`

It

won't

break $\\$

If you should write a date:

`1956. Doesn't work 1956\. Yeah`

- Doesn't work

1956. Yeah$\\$

$\\[-20px]$

`[<link text>](<link>)`

Link text will appear.

`[I'm happy](https://translate.google.com/?hl=hu#view=home&%3Bop=translate&%3Bsl=en&%3Btl=hu&%3Btext=I'm%20happy.&op=translate&sl=en&tl=hu&text=I'm%20happy)`

There is the empty link

`[I'm empty](#)`

If you should use a link many times you can define links:

`[link][id1] [id1]: https://brilliant.org/discussions/thread/math-prove-marathon/ "Title"`

You can use links in $\LaTeX$ too, but this is unnecessary.

$\\[-20px]$

When you upload a picture, then you will get a code. You should only insert it, if you placed to the wrong place(or if you want to insert it to the comment section). But when you want to use a

picture from the internet, then you should only copy the link of the picture:

`![text under the picture](<link or uploaded link>){: .<position>}`

The position can be:

`left`

,`center`

,`right`

. If you delete the {} brackets, then it will be left aligned.Let's see an example for the three positions and how to combine links and pictures:

`![](https://www.shutterstock.com/blog/wp-content/uploads/sites/5/2019/07/Man-Silhouette.jpg){: .left} [![](https://www.shutterstock.com/blog/wp-content/uploads/sites/5/2019/07/Man-Silhouette.jpg){: .center}](https://d.newsweek.com/en/full/520858/supermoon-moon-smartphone-photo-picture.jpg) Click to the picture! ![](https://www.shutterstock.com/blog/wp-content/uploads/sites/5/2019/07/Man-Silhouette.jpg){: .right}`

As you can see if the picture isn't center aligned, then the text after the picture's link will appear next to the picture.

The code of the gif files are the same.

You can give a title to your picture. It won't appear:

`![<text under the picture>](<link> "<Title>"){: .<position>}`

. You can define links to pictures too.

$\\[-20px]$

When we are talking about commands, then we use these:

``readln()``

`readln()`

We can take lots of

```

before it, but then we should take the same amount of this signs after it.If we want line breaks without break the code block:

````python print "This is the best sentence" ````

1`print "This is the best sentence"`

Sometimes the text after the code block doesn't appear. You should only place a title after the code and it will be good.

If you don't give the name of the programming language:

1`print "This is the best sentence"`

You should take an empty line before it. If the text after the code block doesn't appear, then take a

`#`

after the block.

$\\[-20px]$

$\\$

`If you take 4 spaces, then it will appear like you typed similar to the quote this will be if you take more than 4 spaces`

$\\[-20px]$

$\\$

`||1||2||3|| ||4||wide column|| ||||||same|| ||other||table||:)|| ||longer||row||than||the first||`

1 2 3 4 wide column same

other table :) longer row than the first

$\\[-20px]$

We can create 6 different titles(we can close them, but this is unnecessary):

`# I'm your ego ## This is sometimes underlined ## ### I'm your IQ #### Interesting ##### Nothing ##### ###### Thin-king`

## I'm your ego

## This is sometimes underlined

## I'm your IQ

## Interesting

## Nothing

## Thin-king

$\\[-20px]$

`_ =Shift and `-``

If under a text we take a`-`

or`=`

these will make a title. If we take an empty line, then these won't:`_ title 1 = title 2 - -- * * * * - -`

## title 1

## title 2

$\\[-20px]$

`@<name>`

When you start the typing to mention somebody, then the web page will give you options. If you don't choose one, then it won't work. You should choose the correct option. If the web page don't give you the required name, then continue the typing or try to type the name another way(for example without space).

$\\[-20px]$

Idea from Percy Jackson

`[[show-hide-button|<Button text>]] [[start-hidden]] <Content> [[end-hidden]]`

You can use buttons only in notes, but you can't use nested buttons.

The interpreter should distinct the $\LaTeX$ codes, so we should mark them. We can mark two types of $\LaTeX$ placement:

- \$$(<code>\)
- \$$[<code>\]
The first type of $\LaTeX$ placement will appear like this $1+2=3$, but the second will like this $1+2=3$. Both codes are placed into the sentence, but the second makes a break line before and after itself and the second is center aligned.

$\\[-20px]$

Spaces sometimes are allowed, sometimes they are necessary but sometimes they are unallowed. Let's see the rules:

Rule Example code How will ppear Between the brackets the spaces are unallowed \ ( 1+3\ ) \ ( 1+3\ ) In a command the spaces don't allowed \$$(\ta n(x)\) $\ta n(x)$ After a command if the next character is a letter, then the space is necessary \$$(\tanx\) $\tanx$ In other cases the spaces are allowed \$$(3$\;\;$+$\;\;$4 = 7\) $3 + 4 = 7$ Line breaks are allowed when spaces are allowed \$$(1 + $\\$ 3 = 4\) $1 + 3 = 4$ But these spaces won't appear. There you can see how to take a space:

Code Appearance Note `\,`

$te\,xt$ `\:`

$te\:xt$ `\;`

$te\;xt$ `\!`

$te\!xt$ If you take more `\!`

: $te\!\!\!\!xt$`~`

$te~xt$ Or you can insert a text or outside the brackets you can take one space. With these $\LaTeX$ codes you can take longer spaces.

You can make special spaces:

`|{\kern 1pt} |{\kern 10pt} |{\kern 100pt}|\\ |\hspace{1pt} |\hspace{10pt} |\hspace{100pt}|`

$|{\kern 1pt} |{\kern 10pt} |{\kern 100pt}|\\ |\hspace{1pt} |\hspace{10pt} |\hspace{100pt}|$

$pt$ is a given length like $cm$ and $mm$. In$\LaTeX$ (and in web building) there are other units, but the main units are: $\text{pt, px, em}$

Let's see how to make line breakes with special length:

`4\\[30px]5`

$4\\[30px]5$

You can give not integer numbers and negative numbers also.

`54 5\hspace{0.7px}4 5\hspace{-4px}4`

$54$

$5\hspace{0.7px}4$

$5\hspace{-4px}4$$0.7=.7$

Here is some information about other length:

$\rule{5in}{10px}$ 5 in

$\rule{5cm}{10px}$ 5 cm

$\rule{5cc}{10px}$ 5 cc

$\rule{5nc}{10px}$ 5 nc

$\rule{5pc}{10px}$ 5 pc

$\rule{5em}{10px}$ 5 em

$\rule{5ex}{10px}$ 5 ex

$\rule{5mm}{10px}$ 5 mm

$\rule{5dd}{10px}$ 5 dd

$\rule{5nd}{10px}$ 5 nd

$\rule{5px}{10px}$ 5 px

$\rule{5bp}{10px}$ 5 bp

$\rule{5pt}{10px}$ 5 pt

$\rule{5sp}{10px}$ 5 sp

$\\[-20px]$

What you type What you get Note `2=2`

$2=2$ `1+2`

$1+2$ `4*6`

$4*6$ If you use other commands, then it will appear better `4\times6`

$4\times6$ If you are on mobile, then maybe you can find it at the symbols `4\cdot6`

$4\cdot6$ `8/4`

$8/4$ you can use other commands too `8\div4`

$8\div4$ On mobile you can write it without code `\frac{8}{4}`

$\frac{8}{4}$ You can use modificators. `\frac 123`

will be $\frac 123$`{3\choose2}`

${3\choose2}$ `\binom{3}{2}`

$\binom{3}{2}$ `2^3`

$2^3$ If you want to write $2^{33}$, than you should write `2^{33}`

, without the { and } brackets it will appear like this $2^33$`2^{3^3}`

$2^{3^3}$ If you don't write brackets: 2^3^3 `A_1`

$A_1$ Same way as `^`

if you want to write more characters you should use { and } brackets`A_{1_2}`

$A_{1_2}$ `\sqrt{3}`

$\sqrt{3}$ `\sqrt[4]{5}`

$\sqrt[4]{5}$ `\parallel`

$\parallel$ `\perp`

$\perp$ After the basic operators let's see some often used commands. There are some built in functions like

`\tan`

,`\log`

,`\gcd`

,`\mod`

.... We can avoid them, but using them is easier. Let's see anexample:

`\tan(x)=1`

and`tan(x)`

will appear like $\tan(x)$ and $tan(x)$.

$\\[-20px]$

`\left ( \right )`

$\left ( \right )$ `\left \| \right \|`

$\left \| \right \|$ `\left [ \right ]`

$\left [ \right ]$ `\left \langle \right \rangle`

$\left \langle \right \rangle$ `\left \{ \right \}`

$\left \{ \right \}$ `\left \lfloor \right \rfloor`

$\left \lfloor \right \rfloor$ `\left | \right |`

$\left | \right |$ `\left \lceil \right \rceil`

$\left \lceil \right \rceil$

$\\[-20px]$

Sometimes we should use modificators. Let's see an example: $\frac{\frac{2}{\frac{5}{6}+7}+3}{4^8}$. As you can see this is too small. The modificators help us to set the size of the operators.

If we use the

`\displaystyle`

modificator before each fraction, then it will set the size automatically:

`\displaystyle\frac{\displaystyle\frac{2}{\displaystyle\frac{5}{6}+7}+3}{4^8}`

$\displaystyle\frac{\displaystyle\frac{2}{\displaystyle\frac{5}{6}+7}+3}{4^8}$ This is a long way to solve this problem, so we can use

`\dfrac{}{}`

. We will get the same result. With fractions there are some more modificators. Let's see all of them in one table:

Code Appearance `\frac{2+\frac{1}{5}}{\frac{7}{6}+4}`

$\frac{2+\frac{1}{5}}{\frac{7}{6}+4}$ `\displaystyle\frac{2+\displaystyle\frac{1}{5}}{\displaystyle\frac{7}{6}+4}`

$\displaystyle\frac{2+\displaystyle\frac{1}{5}}{\displaystyle\frac{7}{6}+4}$ `\dfrac{2+\dfrac{1}{5}}{\dfrac{7}{6}+4}`

$\dfrac{2+\dfrac{1}{5}}{\dfrac{7}{6}+4}$ `\cfrac{2+\cfrac{1}{5}}{\cfrac{7}{6}+4}`

$\cfrac{2+\cfrac{1}{5}}{\cfrac{7}{6}+4}$ `\tfrac{2+\tfrac{1}{5}}{\tfrac{7}{6}+4}`

$\tfrac{2+\tfrac{1}{5}}{\tfrac{7}{6}+4}$ Here is two examples with $\!\!\!\!\mod\!$:

Code Appearance `2\mod4`

$2\mod4$ `2\bmod4`

$2\bmod4$ `2\pmod4`

$2\pmod4$ The

`\displaystyle`

won't do anything.In some cases the

`\displaystyle`

works only. Let's see some examples(I wrote the modificators before the operators):

Original Modificated $2^{3^{4^{5^6}}}$ $2\displaystyle^{3\displaystyle^{4\displaystyle^{5\displaystyle^6}}}$ $A_{B_{C_{D_E}}}$ $A\displaystyle_{B\displaystyle_{C\displaystyle_{D\displaystyle_E}}}$ $\sum_a^b$ $\displaystyle\sum_a^b$ Sometimes modificators cause some problem:

$(\dfrac{\dfrac{4}{6}+2}{1})$

You can try the

`\displaystyle`

won't help. When we use brackets we use the`\left`

and the`\right`

modificators:

`\left ( \dfrac{\dfrac{4}{6}+2}{1} \right )`

$\left ( \dfrac{\dfrac{4}{6}+2}{1} \right )$ But sometimes we use only one bracket(usually when we are working with a matrix). Let's see an example:

`\left | \dfrac{\dfrac{4}{6}+2}{1}`

\left | \dfrac{\dfrac{4}{6}+2}{1} As you can see it's not working perfectly. When we start a bracket with a modificator then we should mark the pair of it and same way we can't end a bracket if we didn't marked the pair of it. The solution is easy:

`\left | \dfrac{\dfrac{4}{6}+2}{1} \right.`

$\left | \dfrac{\dfrac{4}{6}+2}{1}\right.$

$\\[-20px]$

You can make left and center aligned equations already. But sometimes we make lots of modifications on only one side of the equation. Let's see that:

`\begin{align} A&=(4x+5)^2-8\\ &=16x^2+40x+25-8\\ &=16x^2+40x+17 \end{align}`

$\begin{aligned} A&=(4x+5)^2-8\\ &=16x^2+40x+25-8\\ &=16x^2+40x+17 \end{aligned}$

& means that where will the lines aligned. So the next characters after the & signs will make a straight vertical line. The \ signs means the line break. We should not take a line break after these signs, when we write the code, but if we take we can modificate easier it. We can use

`align*`

too, but it doesn't make anything. Let's see an interesting example:`\begin{align} 1&=333&=333&=22&=22&333&=22&=1\\ 1&=22&22&=333&=22&1&=1&=22&=5&=1\\ 4444&=1&=1&=1&=333&333&=4444&=1&=22&=55555\\ &&&&4444\\ 22 \end{align}`

$\begin{aligned} 1&=333&=333&=22&=22&333&=22&=1\\ 1&=22&22&=333&=22&1&=1&=22&=5&=1\\ 4444&=1&=1&=1&=333&333&=4444&=1&=22&=55555\\ &&&&4444\\ 22 \end{aligned}$

- Only each second & will be aligned into a line
- We can skip lines with more & signs
- Not only the = can make a straight line

$\\[-20px]$

Only the often used special characters:

`\rightarrow`

$\rightarrow$ `\Rightarrow`

$\Rightarrow$ `\leftarrow`

$\leftarrow$ `\Leftarrow`

$\Leftarrow$ `\uparrow`

$\uparrow$ `\Uparrow`

$\Uparrow$ `\downarrow`

$\downarrow$ `\Downarrow`

$\Downarrow$ `\pm`

$\pm$ `\mp`

$\mp$ `\leq`

$\leq$ `\geq`

$\geq$ `\lfloor`

$\lfloor$ `\rfloor`

$\rfloor$ `\lceil`

$\lceil$ `\rceil`

$\rceil$ `\therefore`

$\therefore$ `\because`

$\because$ `\angle`

$\angle$ `\triangle`

$\triangle$ `\equiv`

$\equiv$ `\approx`

$\approx$ `\in`

$\in$ `\ni`

$\ni$ `\ll`

$\ll$ `\gg`

$\gg$ `\neq`

$\neq$ `|x|`

,`|=AltGr+W`

$|x|$ `\infty`

$\infty$ As you can see there are modifications of the arrows. If you start with a big letter you will get a double arrow. You can use modificators too:

`long`

,`leftright`

,`updown`

There are lots of characters. I won't write all of them. Here you can see more characters.

Let's see the big operators:

`\int`

$\int$ `\iint`

$\iint$ `\oint`

$\oint$ `\sum`

$\sum$ `\prod`

$\prod$ `\bigcap`

$\bigcap$ `\bigcup`

$\bigcup$

$\\[-20px]$

`\Alpha`

and`\alpha`

$\Alpha$ and $\alpha$ `\Nu`

and`\nu`

$\Nu$ and $\nu$ `\Beta`

and`\beta`

$\Beta$ and $\beta$ `\Xi`

and`\xi`

$\Xi$ and $\xi$ `\Gamma`

and`\gamma`

$\Gamma$ and $\gamma$ `\Omicron`

and`\omicron`

$\Omicron$ and $\omicron$ `\Delta`

and`\delta`

$\Delta$ and $\delta$ `\Pi`

,`\pi`

and`\varpi`

$\Pi$, $\pi$ and $\varpi$ `\Epsilon`

,`\epsilon`

and`\varepsilon`

$\Epsilon$, $\epsilon$ and $\varepsilon$ `\Rho`

,`\rho`

and`\varrho`

$\Rho$, $\rho$ and $\varrho$ `\Zeta`

and`\zeta`

$\Zeta$ and $\zeta$ `\Sigma`

,`\sigma`

and`\varsigma`

$\Sigma$, $\sigma$ and $\varsigma$ `\Eta`

and`\eta`

$\Eta$ and $\eta$ `\Tau`

and`\tau`

$\Tau$ and $\tau$ `\Theta`

,`\theta`

and`\vartheta`

$\Theta$, $\theta$ and $\vartheta$ `\Upsilon`

and`\upsilon`

$\Upsilon$ and $\upsilon$ `\Iota`

and`\iota`

$\Iota$ and $\iota$ `\Phi`

,`\phi`

and`\varphi`

$\Phi$, $\phi$ and $\varphi$ `\Kappa`

,`\kappa`

and`\varkappa`

$\Kappa$, $\kappa$ and $\varkappa$ `\Chi`

and`\chi`

$\Chi$ and $\chi$ `\Lambda`

and`\lambda`

$\Lambda$ and $\lambda$ `\Psi`

and`\psi`

$\Psi$ and $\psi$ `\Mu`

and`\mu`

$\Mu$ and $\mu$ `\Omega`

and`\omega`

$\Omega$ and $\omega$

$\\[-20px]$

`{}'`

${a}'$ `{}''`

${a}''$ `\dot{}`

$\dot{a}$ `\ddot{}`

$\ddot{a}$ `\hat{}`

$\hat{a}$ `\check{}`

$\check{a}$ `\grave{}`

$\grave{a}$ `\acute{}`

$\acute{a}$ `\tilde{}`

$\tilde{a}$ `\breve{}`

$\breve{a}$ `\bar{}`

$\bar{a}$ `\vec{}`

$\vec{a}$ `\not{}`

$\not{a}$ `^{\circ}`

$a^{\circ}$

`\widetilde{}`

$\widetilde{abc}$ `\widehat{}`

$\widehat{abc}$ `\overleftarrow{}`

$\overleftarrow{abc}$ `\overrightarrow{}`

$\overrightarrow{abc}$ `\overline{}`

$\overline{abc}$ `\underline{}`

$\underline{abc}$ `\overbrace{}`

$\overbrace{abc}$ `\underbrace{}`

$\underbrace{abc}$ `\overset{}{}`

$\overset{123}{abc}$ `\underset{}{}`

$\underset{123}{abc}$ `\xrightarrow[]{}`

$\xrightarrow[123]{abc}$ `\xleftarrow[]{}`

$\xleftarrow[123]{abc}$ In every case the first brackets contain the

`123`

. You can see we can't use`overset`

and`underset`

at the same time. Instead we can use arrays and matrices. The brackets can contain arrows also: $\overset{\Delta t}{\rightarrow}$And there is one interesting thing:

`\boxed{12.5}=\fbox{12.5}`

$\boxed{12.5}=\fbox{12.5}$

And we can do this:

`\cancel{123456789}`

$\cancel{123456789}$

$\\[-20px]$

`\text{}`

between the brackets everything will appear.

`\text{I'm happy...}`

$\text{I'm happy...}$

Code Appearance Code Appearance `\textnormal{}`

$\textnormal{BIG small}$ `\mathnormal{}`

$\mathnormal{BIG small}$ `\textup{}`

$\textup{BIG small}$ `\boldsymbol{}`

$\boldsymbol{BIG small}$ Note: with this code we can print bold symbols: $\boldsymbol{\uparrow}$ `\textbf{}`

$\textbf{BIG small}$ `\mathbf{}`

$\mathbf{BIG small}$ `\textit{}`

$\textit{BIG small}$ `\mathit{}`

$\mathit{BIG small}$ `\textrm{}`

$\textrm{BIG small}$ `\mathrm{}`

$\mathrm{BIG small}$ `\textsf{}`

$\textsf{BIG small}$ `\mathsf{}`

$\mathsf{BIG small}$ `\textrm{}`

$\textrm{BIG small}$ `\mathrm{}`

$\mathrm{BIG small}$ `\texttt{}`

$\texttt{BIG small}$ `\mathbb{}`

$\mathbb{BIG small}$ `\textmd{}`

$\textmd{BIG small}$ `\mathcal{}`

$\mathcal{BIG small}$ `\mathfrak{}`

$\mathfrak{BIG small}$ These are unnecessary codes, you shouldn't learn them. As you can see only the text formats will display the spaces.

$\\[-20px]$

`\tiny`

$\tiny\text{tiny}$ `\scriptsize`

$\scriptsize\text{scriptsize}$ `\footnotesize`

$\footnotesize\text{footnotesize}$ `\small`

$\small\text{small}$ `\normalsize`

$\normalsize\text{normalsize}$ `\large`

$\large\text{large}$ `\Large`

$\Large\text{Large}$ `\LARGE`

$\LARGE\text{LARGE}$ `\huge`

$\huge\text{huge}$ `\Huge`

$\Huge\text{Huge}$ If we place the code in a title:

## $\Huge \text{Bubu}$

$\Huge \text{Bubu}$

$\\[-20px]$

There are built in colores:

`\red{}`

,`\blue{}`

,`\green{}`

,`\orange{}`

etc.$\red{red rat}$

We can use

`\color{}`

. Between the brackets we should give the name of the color. This will be active until you don't change the color again.There are two ways to give the color:

`\color{red}`

,`\color{blue}`

,`\color{black}`

- With hexadecimal code:
`\color{#<code>}`

Let's see an example to the second: If our color is the basic red, then with RGB($\color{#ff0000}\text{Red}\color{#00ff00}\text{Green}\color{#0000ff}\text{Blue}$)

coloring:

$\color{#ff0000}\text{Red}=100\%$ $100\%=(256)_{10}$ $(256)_{10}=(FF)_{16}$ $\color{#00ff00}\text{Green}=0\%$ $0\%=(0)_{10}$ $(0)_{10}=(00)_{16}$ $\color{#0000ff}\text{Blue}=0\%$ $0\%=(0)_{10}$ $(0)_{10}=(00)_{16}$ So the code will be

`\color{#FF0000}`

: $\color{#ff0000}\text{red}$Let's see a complex color:

`#4DA3EC`

$\color{#4da3ec} color$Here you can set the color and get the code of it.

If we use the

`color`

command between two`{ }`

brackets, then the text after the brackets won't be colored:`{\color{green}green}black`

${\color{#20A900}green}black$

Let's see an interesting example:

`\color{red}red{\color{green}green}unknown`

$\color{#D61F06}red{\color{#20A900}green}unknown$

We can use

`\textcolor{}`

also:`\textcolor{red}{red}`

$\textcolor{#D61F06}{red}$

`\textcolor{red}red`

$\textcolor{#D61F06}red$

But we can make color boxes:

`\colorbox{blue}{black\color{#FFFFFF}white}`

$\colorbox{#3D99F6}{black\color{#ffffff}white}$

And we can make color boxes with border:

`\fcolorbox{red}{blue}{\text{The text command include the whole text, but the brackets are necessary}}`

$\fcolorbox{#D61F06}{#3D99F6}{\text{The text command include the whole text, but the brackets are necessary}}$

Matrices are similar to tables and to the aligned equations. & means the next column an \ means the next row(If \ is annoying, then you can use

`\cr`

):`\begin{matrix} 1 & 2 & 3\\ 4 & 5 & 6 \end{matrix}`

$\begin{matrix} 1 & 2 & 3\\ 4 & 5 & 6 \end{matrix}$

Like with tables, there you can skip columns and you can make longer rows than the first:

`\begin{matrix} 1 & 2 & 3\\ 1 & 2 & 3 & 4 & 5\\ &&3&&5 \end{matrix}`

$\begin{matrix} 1 & 2 & 3\\ 1 & 2 & 3 & 4 & 5\\ &&3&&5 \end{matrix}$

You can see if we won't write a whole line we can skip the & symbols. And you can see also that I taked a line break, but it doesn't displayed.

Let's see the types of the matrices:

`pmatrix`

`\begin{pmatrix} 1 & 2 & 3\\ 4 & 5 & 6 \end{pmatrix}`

$\begin{pmatrix} 1 & 2 & 3\\ 4 & 5 & 6 \end{pmatrix}$

`bmatrix`

`\begin{bmatrix} 1 & 2 & 3\\ 4 & 5 & 6 \end{bmatrix}`

$\begin{bmatrix} 1 & 2 & 3\\ 4 & 5 & 6 \end{bmatrix}$

`Bmatrix`

`\begin{Bmatrix} 1 & 2 & 3\\ 4 & 5 & 6 \end{Bmatrix}`

$\begin{pmatrix} 1 & 2 & 3\\ 4 & 5 & 6 \end{pmatrix}$

`vmatrix`

`\begin{vmatrix} 1 & 2 & 3\\ 4 & 5 & 6 \end{vmatrix}`

$\begin{vmatrix} 1 & 2 & 3\\ 4 & 5 & 6 \end{vmatrix}$

`Vmatrix`

`\begin{Vmatrix} 1 & 2 & 3\\ 4 & 5 & 6 \end{Vmatrix}`

$\begin{Vmatrix} 1 & 2 & 3\\ 4 & 5 & 6 \end{Vmatrix}$

But we can use special matrices too:

`\left\{\left. \begin{matrix} 1 & 3 & 5\\ 7 & 4 & 9 \end{matrix}\right |\right.`

$\left\{\left. \begin{matrix} 1 & 3 & 5\\ 7 & 4 & 9 \end{matrix}\right |\right.$

But we can place a matrix into another matrix:

`\begin{matrix} 1 & \begin{matrix} 2 & 3\\ 4 & 5 \end{matrix}\\ 6 & 7 \end{matrix}`

$\begin{matrix} 1 & \begin{matrix} 2 & 3\\ 4 & 5 \end{matrix}\\ 6 & 7 \end{matrix}$

We can insert horizontal lines into the matrix with

`\hline`

:`\begin{matrix} 2 & 4\\ \hline 5 & 6 \end{matrix}`

$\begin{matrix} 2 & 4\\ \hline 5 & 6 \end{matrix}$

If we need a vertical line, then we should use two matrices or use an array. Let's see the arrays.

$\\[-20px]$

The arrays are similar to matrices, but when we begin an array, then we should give the align of each colummn:

`\begin{array}{<align>} <array> \end{array}`

`<align>`

can be:

- c - center
- l - left
- r - right
If we have more columns than that we have declared we will get an error message. But we can skip the empty columns. Let's see an example:

`\begin{array}{lcr} 7777777 & 4444 & 666666\\ 4444 & 1\\ 22&&999999999 \end{array}`

$\begin{array}{lcr} 7777777 & 4444 & 666666\\ 4444 & 1\\ 22&&999999999 \end{array}$

Now let's see how to insert a vertical line:

`\begin{array}{c|c} 1 & 2\\ 3 & 4\\ 5 & 6\\ \end{array}`

$\begin{array}{c|c} 1 & 2\\ 3 & 4\\ 5 & 6\\ \end{array}$

$\\[-20px]$

`\begin{cases} y=1 & x=5 \\ y=2 & x=4 \\ y=3 & x=3 \\ y=4 & x=2 \\ y=5 & x=1 \end{cases}`

$\begin{cases} y=1 & x=5 \\ y=2 & x=4 \\ y=3 & x=3 \\ y=4 & x=2 \\ y=5 & x=1 \end{cases}$ You can't add new columns. But if you insert a matrix, then you can solve it.

$\\[-20px]$

There are lots of dots. Here you can see the main codes(from wikibooks):

`\dots`

$\dots$ Generic dots (ellipsis), to be used in text (outside formulae as well). It automatically manages whitespaces before and after itself according to the context, it's a higher level command. `\ldots`

$\ldots$ The output is similar to the previous one, but there is no automatic whitespace management; it works at a lower level. `\cdots`

$\cdots$ These dots are centered relative to the height of a letter. There is also the binary multiplication operator, \cdot, mentioned below. `\vdots`

$\vdots$ vertical dots `\ddots`

$\ddots$ diagonal dots

This web page doesn't support all $\LaTeX$ codes. Therefore we can't use lots of not mathematical codes. I think only basic formatting, chemical equations and square drawing are supported. Let's see the chemical equations:

You can already write chemical equations:

`\text{CH}_4+2\text{O}_2\rightarrow2\text{H}_2\text{O}+\text{CO}_2`

$\text{CH}_4+2\text{O}_2\rightarrow2\text{H}_2\text{O}+\text{CO}_2$

But this can be easier:

`\ce{CH4 + 2O2 -> 2H2O + CO2}`

$\ce{CH4 + 2O2 -> 2H2O + CO2}$

Here you can see the main things(these are the examples from there):

`\ce{H2O}`

$\ce{H2O}$ `\ce{CrO4^2-}`

$\ce{CrO4^2-}$ `\ce{A <--> B}`

$\ce{A <--> B}$ `\ce{A ->[x_i] B}`

$\ce{A ->[x_i] B}$ `\ce{CO2 + C -> 2 CO}`

$\ce{CO2 + C -> 2 CO}$ `\ce{A\bond{~--}B\bond{~=}C\bond{-~-}D}`

$\ce{A\bond{~--}B\bond{~=}C\bond{-~-}D}$ Spaces are necessary

And the square drawing:

`\rule[raise]{width}{height}`

`\rule{78pt}{.4cm}\color{red}\rule[.2cm]{24px}{2 mm}\hspace{-24px}\color{blue}\rule{24px}{2mm}`

$\rule{78pt}{.4cm}\color{#D61F06}\rule[.2cm]{24px}{2 mm}\hspace{-24px}\color{#3D99F6}\rule{24px}{2mm}$

For more information see:

3.2. Spaces and line breaks

- Don't write a lot of text in $\LaTeX$. This can be annoying, and in small screens others can't read your text
- Make your code always readable. If you have an error, then you can edit it quickly
- If you can't follow your brackets, then take line breaks or spaces
- Remember to check the spaces after each codes
- Always check the end of the $\LaTeX$ code. If your code doesn't end, your will face many errors.
- Use readable font size, but not too big (
`\LARGE`

is usually too big).- Use the
Previewbutton before you post something. The $\LaTeX$ sometimes doesn't displayed. Use any online editor to see your codes- If you have written a lot of code, then save it, as the web page doesn't always save your codes.
- $\color{#D61F06}\text{Don't take big line breaks. You can take 500000px long line breaks, but don't do that!}$
- Don't copy codes from others

You can make symbols with negative spaces, rectangles, characters.... There are two examples from my note about programming tasks:

$\color{#888888}\Large\bigodot \hspace{-666200sp}\rule[3px]{1.3px}{5.5px}\hspace{-289000sp}\rule[11.5px]{7.5px}{1.7px}$ $\hspace{1pt}$

$\color{#888888}\rule[4px]{14px}{2.2px}\hspace{-14px}\rule{14px}{2.2px}\hspace{-14px}\rule[-4px]{14px}{2.2px}$

## Make a special symbol and I will include it

And the big question:

**The big question:**How to write $\LaTeX$**Answer:**`\LaTeX`

Here is a cool website, where you can make equations without learning codes.

No vote yet

1 vote

Easy Math Editor

This discussion board is a place to discuss our Daily Challenges and the math and science related to those challenges. Explanations are more than just a solution — they should explain the steps and thinking strategies that you used to obtain the solution. Comments should further the discussion of math and science.

When posting on Brilliant:

`*italics*`

or`_italics_`

italics`**bold**`

or`__bold__`

boldNote: you must add a full line of space before and after lists for them to show up correctlyparagraph 1

paragraph 2

`[example link](https://brilliant.org)`

`> This is a quote`

Remember to wrap math in`\(`

...`\)`

or`\[`

...`\]`

to ensure proper formatting.`2 \times 3`

`2^{34}`

`a_{i-1}`

`\frac{2}{3}`

`\sqrt{2}`

`\sum_{i=1}^3`

`\sin \theta`

`\boxed{123}`

## Comments

Sort by:

TopNewest@Percy Jackson

What do the measurement abbreviations stand for?

Log in to reply

px = pixel :)

Log in to reply

\$$(\) - Thnx @Páll Márton (no activity)

Log in to reply

is the page itself done in Latex? if so: how do u print a backslash and opening brackets just as text?

like this "$\backslash($" . if i use \backslash it creates a thin backslash: $\backslash$ but how do i write a normal one like this: \

Log in to reply

\$$(\) without spaces \ \ ( \ ) ( \ \ )

Log in to reply

ty again. is there a similar solution for the centering brackets: []?

when i try: \ \ [ \ ] [ \ \ ] without spaces. it creates this: \$$[\]

Log in to reply

\$$(\) u are great ty

Log in to reply

On a normal QWERTY keyboard, the backslash is usually above the enter key.

Log in to reply

;-) ;-) if i write \ in a latex block, then it is not shown because it is a special symbol.

my question is how to show a "normal" backslash like this: \

in a latex block and not a thin one like this: $\backslash$

Log in to reply

You can also use \LaTeX{} $\Rightarrow$ $\LaTeX{}$.

Log in to reply

but \LaTeX is easier and shorter to type.

Log in to reply

Yeah. The \LaTeX{} is one \LaTeX command and an empty block {}

Log in to reply

Log in to reply

Really the best $\LaTeX$ formatting. My saved and bookmarked page for referring $\LaTeX$. :) @Páll Márton

Log in to reply

Thank you!

Log in to reply

@Brilliant Mathematics There is a problem with this note. I have a document with the code of it. It is working, but there isn't. Can you help me? This is a very common problem. Once at the daily chalanges and once under @Percy Jackson's note. Thank you! P.S.: Who should I mention next time if I have a similar problem?

Log in to reply

Thanks. I've fixed it for you by removing the following text.

`2.3. Quote}\\[-5px]\hspace{300px}\)]]`

Yes, this is a common problem. Our engineers are on it. I will set-up a note to let other users notify me in 10 minutes.

Log in to reply

@ Páll Márton, here you go!

Log in to reply

`[[show,-hide-button`

Log in to reply

@Páll Márton!

Now your Guide is even betterLog in to reply

Log in to reply

Log in to reply

@Percy Jackson Should I make the whole note with buttons? I think you can use it easier if you should press only a button to see the content.

Log in to reply

Log in to reply

Yeah, it would seem easier to just click what you want to read instead of scrolling. Nice job on the buttons, and thanks for the mention! Buttons can only be used in notes and wikis, not even problems so change that last statement a bit @Páll Márton :)

Log in to reply

buttons- 2.13 :)

Log in to reply

Log in to reply

`Got it, thanks!`

@Páll Márton

Log in to reply

Yeah.

Log in to reply

You are welcome!

Log in to reply

@Páll Márton - How do you make that box, where latex doesn't work, the one where you write your syntax, and the one where you wrote the latex commands for greeks letters as an example, your guide is very long, so i didn't find it LOL

Log in to reply

2.7. and 2.8. Code blocks and Formatted box :)

Log in to reply

Ctrl+f

Log in to reply

Jeff Giff isn't annoying in a He-is-a-idiot kind of way

More like a Leo-kind-of-way, so nothing bad about it :)

facepalm isn't funy, its funny :)

The jokes were courtesy of Leo, but they were pretty non-funny, if that's even a word.

Happy 7.27 day!

Before you ask what 7.27 day is its today 7/27/2020, why you may ask, because a super complex number like pi has a day, why not 7.27 :)

Log in to reply

$\bra{1}$ \bra{1}, for qubits

Log in to reply

Wait... the mod and bmod. Wrong code.

Log in to reply

Why? If you write only

`\mod`

then it won't work, but`~\mod~`

$~\mod~$Log in to reply

No, look- $a\equiv b \mod n,a \bmod n, a\pmod n$ , mod, bmod, pmod

Log in to reply

`a\equiv b \mod n,a \bmod n, a\pmod n`

so the codes are good.Log in to reply

Log in to reply

Log in to reply

Log in to reply

Log in to reply

WHA WHAAA WHAAAAAAAAAAAAAAAA! How much time do you have? I've got 30 minutes a day to update my guide lol, this one is way better. Awesome @Páll Márton - This deserves to be turned into a Latex wiki, maybe you should ask Brilliant Mathematics, Calvin Lin, or someone else.......................

Log in to reply

Yeah, I have a lot of time. But I think the wiki page is better. I wanted to make an example, where you should search the error, but this take a lot of time

Log in to reply

Yours is better than wiki page, as you have more than what the wiki has, just ask some moderator or something dude, this is good stuff

Log in to reply

$\LaTeX$. There you can see more codes. But you are right, because some codes are missing.

The wiki page is about onlyLog in to reply

Now this is complete :) Maybe some codes are missing, but I think I finished it

Log in to reply

$\rule{20px}{20px}{\color{#FFFFFF}\rule{20px}{20px}}\rule{20px}{20px}{\color{#FFFFFF}\rule{20px}{20px}}\rule{20px}{20px}{\color{#FFFFFF}\rule{20px}{20px}}\rule{20px}{20px}{\color{#FFFFFF}\rule{20px}{20px}}\\[-3.75pt] {\color{#FFFFFF}\rule{20px}{20px}}\rule{20px}{20px}{\color{#FFFFFF}\rule{20px}{20px}}\rule{20px}{20px}{\color{#FFFFFF}\rule{20px}{20px}}\rule{20px}{20px}{\color{#FFFFFF}\rule{20px}{20px}}\rule{20px}{20px}\\[-3.75pt] \rule{20px}{20px}{\color{#FFFFFF}\rule{20px}{20px}}\rule{20px}{20px}{\color{#FFFFFF}\rule{20px}{20px}}\rule{20px}{20px}{\color{#FFFFFF}\rule{20px}{20px}}\rule{20px}{20px}{\color{#FFFFFF}\rule{20px}{20px}}\\[-3.75pt] {\color{#FFFFFF}\rule{20px}{20px}}\rule{20px}{20px}{\color{#FFFFFF}\rule{20px}{20px}}\rule{20px}{20px}{\color{#FFFFFF}\rule{20px}{20px}}\rule{20px}{20px}{\color{#FFFFFF}\rule{20px}{20px}}\rule{20px}{20px}\\[-3.75pt] \rule{20px}{20px}{\color{#FFFFFF}\rule{20px}{20px}}\rule{20px}{20px}{\color{#FFFFFF}\rule{20px}{20px}}\rule{20px}{20px}{\color{#FFFFFF}\rule{20px}{20px}}\rule{20px}{20px}{\color{#FFFFFF}\rule{20px}{20px}}\\[-3.75pt] {\color{#FFFFFF}\rule{20px}{20px}}\rule{20px}{20px}{\color{#FFFFFF}\rule{20px}{20px}}\rule{20px}{20px}{\color{#FFFFFF}\rule{20px}{20px}}\rule{20px}{20px}{\color{#FFFFFF}\rule{20px}{20px}}\rule{20px}{20px}\\[-3.75pt] \rule{20px}{20px}{\color{#FFFFFF}\rule{20px}{20px}}\rule{20px}{20px}{\color{#FFFFFF}\rule{20px}{20px}}\rule{20px}{20px}{\color{#FFFFFF}\rule{20px}{20px}}\rule{20px}{20px}{\color{#FFFFFF}\rule{20px}{20px}}\\[-3.75pt] {\color{#FFFFFF}\rule{20px}{20px}}\rule{20px}{20px}{\color{#FFFFFF}\rule{20px}{20px}}\rule{20px}{20px}{\color{#FFFFFF}\rule{20px}{20px}}\rule{20px}{20px}{\color{#FFFFFF}\rule{20px}{20px}}\rule{20px}{20px}$

Log in to reply

$\rule{100pt}{161.8pt}$

Golden ratio

Log in to reply

Great! The only one with the cases, which I once spent AN HOUR looking for :P

Log in to reply

Thank you!

Log in to reply

@Jeff Giff Here is a new formatting guide for Radmaths !

Log in to reply

Red Maths LOL :)

Log in to reply

Its RADMaths, but...

Log in to reply

Log in to reply

Log in to reply

Log in to reply

there you can understand it

I think he can use the rad word. FromLog in to reply

Log in to reply

$\color{#D61F06}\text{redmath}$ is rad. BTW this isn't important

Log in to reply

Log in to reply

@Jeff Giff See what will happen if you click to the link to this guide. Delete your link's last section from there: ?from_notification=...

Log in to reply

And thank you!

Log in to reply

Excellent LaTeX formatting guide! I am saving this one...

Log in to reply

Huhh! I extended it.

Log in to reply

I hope this is better

Log in to reply

Log in to reply

Thank you! I'm working on this yet

Log in to reply

Don't worry. I put it in my saved collection!

Log in to reply