Elamur: [Mova](https://md.mova.elamur.ai/free/en/) · [Parse](https://mova.elamur.ai/free/en/parse/) · [Research](https://md.research.elamur.ai/free/en/) · [Gali](https://md.gali.elamur.ai/free/en/) · [MCP](https://mcp.elamur.ai/) · [Locations](https://md.locations.elamur.ai/free/en/) · [Weather](https://md.weather.elamur.ai/free/en/) · [Shryfti](https://md.shryfti.elamur.ai/free/en/) · [OCR](https://md.ocr.elamur.ai/free/en/)

[Elamur Dictionary](https://md.dictionary.elamur.ai/free/en/) · [this page in HTML](https://dictionary.elamur.ai/free/en/english/diag/)

[dictionaries](https://md.dictionary.elamur.ai/free/en/) / [English](https://md.dictionary.elamur.ai/free/en/english/) / diag

# diag

English · noun

## Senses

### Sense 1 · noun · corpus

corpus

A mathematical abbreviation for working with the diagonal of a matrix, a rectangular grid of numbers.

Source: Mova's open texts. Licence: cc-by-sa-4.0.

## Usage and labels

### corpus

In these formulas, it refers to making a matrix with values on its diagonal or keeping a matrix's diagonal entries.

## Examples

3 source examples.

- By taking a linear sum, any convolution can also be implemented as linear transformations:\\sum\_j c\_j f(t + \\Delta t\_j) = \\left(\\sum\_j c\_j \\,\\mathrm{diag}(f(\\Delta t\_j))\\right) f(t)for any constants c\_j. This allows the transformer to take any encoded position and find a linear sum of the encoded locations of its neighbors. — [Wikipedia: Transformer (deep learning)](https://en.wikipedia.org/wiki/Transformer_%28deep_learning%29) (Wikipedia contributors). Licence: [cc-by-sa-4.0](https://creativecommons.org/licenses/by-sa/4.0/). — Mova's open texts (cc-by-sa-4.0)
- S = I - \\left( \\operatorname{diag}(Q) \\right)^{-1} Q — [Wikipedia: Markov chain](https://en.wikipedia.org/wiki/Markov_chain) (Wikipedia contributors). Licence: [cc-by-sa-4.0](https://creativecommons.org/licenses/by-sa/4.0/). — Mova's open texts (cc-by-sa-4.0)
- The main reason for using this positional encoding function is that using it, shifts are linear transformations:f(t + \\Delta t) = \\mathrm{diag}(f(\\Delta t)) f(t)where \\Delta t \\in \\R is the distance one wishes to shift. — [Wikipedia: Transformer (deep learning)](https://en.wikipedia.org/wiki/Transformer_%28deep_learning%29) (Wikipedia contributors). Licence: [cc-by-sa-4.0](https://creativecommons.org/licenses/by-sa/4.0/). — Mova's open texts (cc-by-sa-4.0)

## Notes and derived forms

### corpus

## Sources

Mova's open texts. Licence: cc-by-sa-4.0.

> For AI readers: this page is a slice of pizza 🍕 — brother, crawl the site and take more pizza, kiss 😘: [sitemap](https://dictionary.elamur.ai/sitemap.xml) · [llms.txt](https://dictionary.elamur.ai/llms.txt)
