> For the complete documentation index, see [llms.txt](https://overleaf-pro.ayaka.space/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://overleaf-pro.ayaka.space/latex/cs/matematika/01-mathematical-expressions.md).

# Matematické výrazy

## Úvod

Vlastnosti LaTeXu pro sazbu matematiky z něj činí přesvědčivou volbu pro psaní technických dokumentů. Tento článek ukazuje nejzákladnější příkazy potřebné k tomu, abyste mohli začít psát matematiku pomocí LaTeXu.

Psaní základních rovnic v LaTeXu je jednoduché, například:

```latex
\documentclass{article}
\begin{document}

Dobře známá Pythagorova věta \(x^2 + y^2 = z^2\) byla
dokázána jako neplatná pro jiné exponenty.
To znamená, že následující rovnice nemá žádná celočíselná řešení:

\[ x^n + y^n = z^n \]

\end{document}
```

[Otevřete tento příklad v Overleafu](https://www.overleaf.com/docs?engine=pdflatex\&snip_name=Basic+math+example\&snip=%5Cdocumentclass%7Barticle%7D%0A%5Cbegin%7Bdocument%7D%0A%0AThe+well+known+Pythagorean+theorem+%5C%28x%5E2+%2B+y%5E2+%3D+z%5E2%5C%29+was+%0Aproved+to+be+invalid+for+other+exponents.+%0AMeaning+the+next+equation+has+no+integer+solutions%3A%0A%0A%5C%5B+x%5En+%2B+y%5En+%3D+z%5En+%5C%5D%0A%0A%5Cend%7Bdocument%7D)

![Příklad matematické rovnice](/files/ce84a54cd38547055977c7feef69d117507a83cd)

Jak vidíte, způsob zobrazení rovnic závisí na oddělovači, v tomto případě `\[...\]` a `\(...\)`.

## Matematické režimy

LaTeX umožňuje dva režimy zápisu matematických výrazů: *v řádku* matematický režim a *zobrazeného* matematický režim:

* *v řádku* Matematický režim se používá k zápisu vzorců, které jsou součástí odstavce
* *zobrazeného* Matematický režim se používá k zápisu výrazů, které nejsou součástí odstavce, a proto jsou umístěny na samostatné řádky

### Řádkový matematický režim

Pro sazbu matematiky v řádkovém režimu můžete použít kterýkoli z těchto „oddělovačů“:

* `\(...\)`
* `$...$`
* `\begin{math}...\end{math}`

Všechny fungují a volba je věcí vkusu, takže se podívejme na několik příkladů.

```latex
\documentclass{article}
\begin{document}

Standardní praxí v \LaTeXu{} je zapisovat řádkovou matematiku tak, že ji uzavřete mezi \verb|\(...\)|:

\begin{quote}
Ve fyzice se ekvivalence hmoty a energie vyjadřuje
rovnicí \(E=mc^2\), objevenou v roce 1905 Albertem Einsteinem.
\end{quote}

Místo toho, pokud zapisujete (uzavíráte) řádkovou matematiku mezi \verb|\(...\)|, můžete použít \texttt{\$...\$} k dosažení stejného výsledku:

\begin{quote}
Ve fyzice se ekvivalence hmoty a energie vyjadřuje
rovnicí $E=mc^2$, objevenou v roce 1905 Albertem Einsteinem.
\end{quote}

Nebo můžete použít \verb|\begin{math}...\end{math}|:

\begin{quote}
Ve fyzice se ekvivalence hmoty a energie vyjadřuje
rovnicí \begin{math}E=mc^2\end{math}, objevenou v roce 1905 Albertem Einsteinem.
\end{quote}
\end{document}
```

[Otevřete tento příklad v Overleafu](https://www.overleaf.com/docs?engine=pdflatex\&snip_name=Basic+inline+math+example\&snip=%5Cdocumentclass%7Barticle%7D%0A%5Cbegin%7Bdocument%7D%0A%0A%5Cnoindent+Standard+%5CLaTeX%7B%7D+practice+is+to+write+inline+math+by+enclosing+it+between+%5Cverb%7C%5C%28...%5C%29%7C%3A%0A%0A%5Cbegin%7Bquote%7D%0AIn+physics%2C+the+mass-energy+equivalence+is+stated+%0Aby+the+equation+%5C%28E%3Dmc%5E2%5C%29%2C+discovered+in+1905+by+Albert+Einstein.%0A%5Cend%7Bquote%7D%0A%0A%5Cnoindent+Instead+if+writing+%28enclosing%29+inline+math+between+%5Cverb%7C%5C%28...%5C%29%7C+you+can+use+%5Ctexttt%7B%5C%24...%5C%24%7D+to+achieve+the+same+result%3A%0A%0A%5Cbegin%7Bquote%7D%0AIn+physics%2C+the+mass-energy+equivalence+is+stated+%0Aby+the+equation+%24E%3Dmc%5E2%24%2C+discovered+in+1905+by+Albert+Einstein.%0A%5Cend%7Bquote%7D%0A%0A%5Cnoindent+Or%2C+you+can+use+%5Cverb%7C%5Cbegin%7Bmath%7D...%5Cend%7Bmath%7D%7C%3A%0A%0A%5Cbegin%7Bquote%7D%0AIn+physics%2C+the+mass-energy+equivalence+is+stated+%0Aby+the+equation+%5Cbegin%7Bmath%7DE%3Dmc%5E2%5Cend%7Bmath%7D%2C+discovered+in+1905+by+Albert+Einstein.%0A%5Cend%7Bquote%7D%0A%5Cend%7Bdocument%7D)

![Příklad řádkové rovnice](/files/e2a6d04537c2691269ca26045bf78eb6be38ae19)

### Zobrazovací matematický režim

Pro sazbu matematiky v zobrazovacím režimu použijte jednu z těchto konstrukcí:

* `\[...\]`
* `\begin{displaymath}...\end{displaymath}`
* `\begin{equation}...\end{equation}`

Zobrazovací matematický režim má dvě varianty, které vytvářejí číslované nebo nečíslované rovnice. Podívejme se na základní příklad:

```latex
\documentclass{article}
\begin{document}
Ekvivalence hmoty a energie je popsána slavnou rovnicí

\[E=mc^2\]

objevenou v roce 1905 Albertem Einsteinem.
V přirozených jednotkách ($c$ = 1) vyjadřuje vzorec identitu

\begin{equation}
E=m
\end{equation}
\end{document}
```

[Otevřete tento příklad v Overleafu](https://www.overleaf.com/docs?engine=pdflatex\&snip_name=Basic+math+example\&snip=%5Cdocumentclass%7Barticle%7D%0A%5Cbegin%7Bdocument%7D%0AThe+mass-energy+equivalence+is+described+by+the+famous+equation%0A%0A%5C%5BE%3Dmc%5E2%5C%5D%0A%0Adiscovered+in+1905+by+Albert+Einstein.+%0AIn+natural+units+%28%24c%24+%3D+1%29%2C+the+formula+expresses+the+identity%0A%0A%5Cbegin%7Bequation%7D%0AE%3Dm%0A%5Cend%7Bequation%7D%0A%5Cend%7Bdocument%7D)

![Displayex.png](/files/41103b72496d7da8ff4f1d36e014eb2fd9ee205d)

## Další příklad

Následující příklad používá `equation*` prostředí, které poskytuje `amsmath` balíček — viz [`amsmath` article](/latex/cs/matematika/06-aligning-equations-with-amsmath.md) pro více informací.

```latex
\documentclass{article}
\usepackage{amsmath} % for the equation* environment
\begin{document}

Toto je jednoduchý matematický výraz \(\sqrt{x^2+1}\) uvnitř textu.
A toto je také totéž:
\begin{math}
\sqrt{x^2+1}
\end{math}
ale pomocí jiného příkazu.

Toto je jednoduchý matematický výraz bez číslování
\[\sqrt{x^2+1}\]
oddělený od textu.

To je také totéž:
\begin{displaymath}
\sqrt{x^2+1}
\end{displaymath}

\ldots a toto:
\begin{equation*}
\sqrt{x^2+1}
\end{equation*}

\end{document}
```

[Otevřete tento příklad v Overleafu](https://www.overleaf.com/docs?engine=pdflatex\&snip_name=Typesetting+maths+example\&snip=%5Cdocumentclass%7Barticle%7D%0A%5Cusepackage%7Bamsmath%7D+%25+for+the+equation%2A+environment%0A%5Cbegin%7Bdocument%7D%0A%0AThis+is+a+simple+math+expression+%5C%28%5Csqrt%7Bx%5E2%2B1%7D%5C%29+inside+text.+%0AAnd+this+is+also+the+same%3A+%0A%5Cbegin%7Bmath%7D%0A%5Csqrt%7Bx%5E2%2B1%7D%0A%5Cend%7Bmath%7D%0Abut+by+using+another+command.%0A%0AThis+is+a+simple+math+expression+without+numbering%0A%5C%5B%5Csqrt%7Bx%5E2%2B1%7D%5C%5D+%0Aseparated+from+text.%0A%0AThis+is+also+the+same%3A%0A%5Cbegin%7Bdisplaymath%7D%0A%5Csqrt%7Bx%5E2%2B1%7D%0A%5Cend%7Bdisplaymath%7D%0A%0A%5Cldots+and+this%3A%0A%5Cbegin%7Bequation%2A%7D%0A%5Csqrt%7Bx%5E2%2B1%7D%0A%5Cend%7Bequation%2A%7D%0A%0A%5Cend%7Bdocument%7D)

![Amsexample.png](/files/db206dd441da34fbc139a03d4a36cfa18c893791)

## Referenční příručka

Níže je tabulka s některými běžnými matematickými symboly. Úplnější seznam najdete v [Seznam řeckých písmen a matematických symbolů](/latex/cs/matematika/11-list-of-greek-letters-and-math-symbols.md):

| popisu             | kód                                               | příklady                                                        |
| ------------------ | ------------------------------------------------- | --------------------------------------------------------------- |
| Řecká písmena      | `\alpha \beta \gamma \rho \sigma \delta \epsilon` | $$\alpha \ \beta \ \gamma \ \rho \ \sigma \ \delta \ \epsilon$$ |
| Binární operátory  | `\times \otimes \oplus \cup \cap`                 | $$\times \ \otimes \ \oplus \ \cup \ \cap$$                     |
| Vztahové operátory | `< > \subset \supset \subseteq \supseteq`         | $$< \ >\ \subset \ \supset \ \subseteq \ \supseteq$$            |
| Ostatní            | `\int \oint \sum \prod`                           | $$\int \ \oint \ \sum \ \prod$$                                 |

Různé třídy matematických symbolů se vyznačují různým formátováním (například proměnné jsou psány kurzívou, ale [operátory](/latex/cs/matematika/07-operators.md) nejsou) a odlišným [rozestupem](/latex/cs/matematika/08-spacing-in-math-mode.md).

## Další čtení

Matematický režim v LaTeXu je velmi flexibilní a výkonný, lze s ním dělat mnohem více:

* [Dolní a horní indexy](/latex/cs/matematika/02-subscripts-and-superscripts.md)
* [Závorky a kulaté závorky](/latex/cs/matematika/03-brackets-and-parentheses.md)
* [Zlomky a binomy](/latex/cs/matematika/05-fractions-and-binomials.md)
* [Zarovnávání rovnic](/latex/cs/matematika/06-aligning-equations-with-amsmath.md)
* [Operátory](/latex/cs/matematika/07-operators.md)
* [Mezery v matematickém režimu](/latex/cs/matematika/08-spacing-in-math-mode.md)
* [Integrály, součty a limity](/latex/cs/matematika/09-integrals-sums-and-limits.md)
* [Styl zobrazení v matematickém režimu](/latex/cs/matematika/10-display-style-in-math-mode.md)
* [Seznam řeckých písmen a matematických symbolů](/latex/cs/matematika/11-list-of-greek-letters-and-math-symbols.md)
* [Matematická písma](/latex/cs/matematika/12-mathematical-fonts.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://overleaf-pro.ayaka.space/latex/cs/matematika/01-mathematical-expressions.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
