> 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/pl/matematyka/07-operators.md).

# Operatory

Znaki w trybie matematycznym są zwykle wyświetlane kursywą, ale czasem niektóre nazwy funkcji wymagają innego formatowania, co można osiągnąć, używając operatorów zdefiniowanych w LaTeX-u.

## Wstęp

Funkcje trygonometryczne, logarytmy i inne można zapisać w dokumencie za pomocą kilku specjalnych poleceń, jak pokazano w poniższym przykładzie:

```latex
Przykłady operatorów matematycznych:
\[
    \sin(a + b) = \sin a \cos b + \cos a \sin b
.\]
```

[Otwórz ten przykład w Overleaf](https://www.overleaf.com/docs?engine=pdflatex\&snip_name=Mathematical+operators+example\&snip=%5Cdocumentclass%7Barticle%7D%0A%5Cbegin%7Bdocument%7D%0AExamples+of+mathematical+operators%3A%0A%5C%5B%0A++++%5Csin%28a+%2B+b%29+%3D+%5Csin+a+%5Ccos+b+%2B+%5Ccos+a+%5Csin+b%0A.%5C%5D%0A%5Cend%7Bdocument%7D)

Ten przykład generuje następujący wynik:

![Newsincos.png](/files/230560b91a050f49890239c24e872163d4f9b6bf)

Polecenia wyświetlą nazwę funkcji w tekstie pionowym (rzymskim) zamiast kursywy.

## Operatory w różnych kontekstach

Niektóre operatory mogą przyjmować parametry, które są obsługiwane w specjalny sposób, na przykład granice.

```latex
\documentclass{article}
\usepackage{amsmath}
\begin{document}
Testowanie zapisu granic
\[
    \lim_{h \to 0 } \frac{f(x+h)-f(x)}{h}
.\]
Ten operator zmienia się, gdy jest używany razem z
tekstem \( \lim_{h \to 0} (x-h) \).
\end{document}
```

[Otwórz ten przykład w Overleaf](https://www.overleaf.com/docs?engine=pdflatex\&snip_name=Mathematical+operators+example\&snip=%5Cdocumentclass%7Barticle%7D%0A%5Cusepackage%7Bamsmath%7D%0A%5Cbegin%7Bdocument%7D%0ATesting+notation+for+limits%0A%5C%5B%0A++++%5Clim_%7Bh+%5Cto+0+%7D+%5Cfrac%7Bf%28x%2Bh%29-f%28x%29%7D%7Bh%7D%0A.%5C%5D%0AThis+operator+changes+when+used+alongside+%0Atext+%5C%28+%5Clim_%7Bh+%5Cto+0%7D+%28x-h%29+%5C%29.%0A%5Cend%7Bdocument%7D)

Ten przykład generuje następujący wynik:

![OperatorsEx2.png](/files/f6b2d32189bec183621ad602f9104805e7165961)

Pakiet `amsmath` jest potrzebne dla makra `\to`; bez tego pakietu, `\rightarrow` trzeba użyć.

Zwróć uwagę, że deklaracja granicy może zawierać indeks dolny. Zobacz [przewodnik referencyjny](#reference-guide) pełną listę dostępnych operatorów.

Niektóre języki mogą dodawać lub zmieniać niektóre polecenia, sprawdź [stronę główną](/latex/pl/readme.md) w celu znalezienia artykułów specyficznych dla danego języka.

## Definiowanie własnych operatorów

Jeśli chcesz dodać spersonalizowany operator wyświetlany krojem rzymskim zamiast kursywy, użyj `\DeclareMathOperator`

```latex
\documentclass{article}
\usepackage{amsmath}
\DeclareMathOperator{\arctg}{arctg}
\begin{document}
Operator arctangensa zdefiniowany przez użytkownika:
\[
    \arctg \frac{\pi}{3} = \sqrt{3}
.\]
\end{document}
```

[Otwórz ten przykład w Overleaf](https://www.overleaf.com/docs?engine=pdflatex\&snip_name=Example+defining+an+operator\&snip=%5Cdocumentclass%7Barticle%7D%0A%5Cusepackage%7Bamsmath%7D%0A%5CDeclareMathOperator%7B%5Carctg%7D%7Barctg%7D%0A%5Cbegin%7Bdocument%7D%0AUser-defined+operator+for+arctangent%3A%0A%5C%5B%0A++++%5Carctg+%5Cfrac%7B%5Cpi%7D%7B3%7D+%3D+%5Csqrt%7B3%7D%0A.%5C%5D%0A%5Cend%7Bdocument%7D)

Ten przykład generuje następujący wynik:

![OperatorsEx3.png](/files/c6d0026f2301ce3b43689c7d3e1653ec2b32f5d5)

Polecenie `\DeclareMathOperator` przyjmuje dwa parametry: pierwszy to nazwa nowego operatora, a drugi to tekst, który ma być wyświetlony. Aby to polecenie działało, musisz zaimportować pakiet **amsmath** w preambule za pomocą

```latex
\usepackage{amsmath}
```

Polecenie można nieco zmodyfikować, jeśli chcesz, aby zdefiniowany operator używał indeksów dolnych, tak jak `\lim` operator; w takim przypadku użyj `\DeclareMathOperator*`.

## Przewodnik referencyjny

**Pełna lista operatorów matematycznych**

| Operator  | Wyświetla się jako |
| --------- | ------------------ |
| `\cos`    | $$\cos$$           |
| `\csc`    | $$\csc$$           |
| `\exp`    | $$\exp$$           |
| `\ker`    | $$\ker$$           |
| `\limsup` | $$\limsup$$        |
| `\min`    | $$\min$$           |
| `\sinh`   | $$\sinh$$          |
| `\arcsin` | $$\arcsin$$        |
| `\cosh`   | $$\cosh$$          |
| `\deg`    | $$\deg$$           |
| `\gcd`    | $$\gcd$$           |
| `\lg`     | $$\lg$$            |
| `\ln`     | $$\ln$$            |
| `\Pr`     | $$\Pr$$            |
| `\sup`    | $$\sup$$           |
| `\arctan` | $$\arctan$$        |
| `\cot`    | $$\cot$$           |
| `\det`    | $$\det$$           |
| `\hom`    | $$\hom$$           |
| `\lim`    | $$\lim$$           |
| `\log`    | $$\log$$           |
| `\sec`    | $$\sec$$           |
| `\tan`    | $$\tan$$           |
| `\arg`    | $$\arg$$           |
| `\coth`   | $$\coth$$          |
| `\dim`    | $$\dim$$           |
| `\liminf` | $$\liminf$$        |
| `\max`    | $$\max$$           |
| `\sin`    | $$\sin$$           |
| `\tanh`   | $$\tanh$$          |

## Dalsza lektura

Więcej informacji znajdziesz w

* [Wyrażenia matematyczne](/latex/pl/matematyka/01-mathematical-expressions.md)
* [Indeksy dolne i górne](/latex/pl/matematyka/02-subscripts-and-superscripts.md)
* [Ułamki i dwumiany](/latex/pl/matematyka/05-fractions-and-binomials.md)
* [Odstępy w trybie matematycznym](/latex/pl/matematyka/08-spacing-in-math-mode.md)
* [Całki, sumy i granice](/latex/pl/matematyka/09-integrals-sums-and-limits.md)
* [Styl wyświetlania w trybie matematycznym](/latex/pl/matematyka/10-display-style-in-math-mode.md)
* [Niezbyt krótki wstęp do LaTeX2ε](http://www.ctan.org/tex-archive/info/lshort/)


---

# 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/pl/matematyka/07-operators.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.
