> For the complete documentation index, see [llms.txt](https://mandober.gitbook.io/math-debrief/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mandober.gitbook.io/math-debrief/260-function-theory/topics/function-elements.md).

# Elements of a function

A function, `f`, is a *functional* and *serial* **relation** that relates two sets A and B (which may be the same set).

The *source set*, `A`, is called the **domain** and the *target set*, `B`, is called the **codomain**.

A function `f` that associates *each element* of the domain `A` to a *unique element* of the codomain B may be specified by a **type signature**: `f : A -> B` which may be read "function f (goes) from A to B".

A function's *signature* unambiguously specifies its domain and codomain, clearly indicating the domain over which the input variable ranges, as well as the codomain over which the output variable ranges (both indicate the domain of discurse).

In fact, the domain of a function may be derived from the set of a function by extracting the first components from all the ordered pairs, collecting them in a set (must be equal to the domain). The set that is obtain by gathering together all the second components of the ord pairs is called **range**.

Functions are usually modelled as unary taking and returning only one value.


---

# 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:

```
GET https://mandober.gitbook.io/math-debrief/260-function-theory/topics/function-elements.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
