# \Trace

Used for trace function in linear algebra expressions

https://texform.dev/latex/commands/Trace

## Metadata

| Field | Value |
| --- | --- |
| Topic | [Physics: functions](https://texform.dev/latex/topics/physics-functions) |
| Packages | physics |
| Allowed mode | math |
| Tags |  |
| Commonality | low |
| Kind | prefix |

## Syntax

### physics

Argument specification: ``

Used for trace function in linear algebra expressions

## Examples

```latex
\Trace(M)
```

[Open in Playground](https://play.texform.dev/?input=%5CTrace%28M%29)

## Renderer support

| Package | MathJax | KaTeX | XeTeX |
| --- | --- | --- | --- |
| physics | full | none | full |

## In TeXForm

TeXForm parses this entry as prefix syntax; the package determines its argument specification.

### Expands to (physics)

```latex
\Trace
```

→

```latex
\Tr
```

Mapped to id='Tr' via third parameter

### [physics/named-fn-to-operatorname](https://texform.dev/rules/physics/named-fn-to-operatorname)

Rewrite physics-only named functions to operatorname and expand their auto-sized arguments.

Level: faithful. Fidelity: reading.

```latex
\asin
```

→

```latex
\operatorname{asin}
```

```latex
\asin[2](x(y+z)\frac{a}{b})
```

→

```latex
\operatorname{asin}^{2}\left(x(y+z)\frac{a}{b}\right)
```

### [physics/trace-capital-to-Tr](https://texform.dev/rules/physics/trace-capital-to-Tr)

Collapse a bare Trace with no following argument group to the local Tr anchor.

Level: authoring. Fidelity: render.

```latex
\Trace
```

→

```latex
\Tr
```

```latex
\Trace\rho=1
```

→

```latex
\Tr\rho=1
```

## Equivalent forms

```latex
\Tr
```

exact. 

## See also

- [\\acos](https://texform.dev/latex/commands/acos)
- [\\acot](https://texform.dev/latex/commands/acot)
- [\\acsc](https://texform.dev/latex/commands/acsc)
- [\\arccos](https://texform.dev/latex/commands/arccos)
- [\\arccot](https://texform.dev/latex/commands/arccot)
- [\\arccsc](https://texform.dev/latex/commands/arccsc)
- [\\arcsec](https://texform.dev/latex/commands/arcsec)
- [\\arcsin](https://texform.dev/latex/commands/arcsin)
- [\\arctan](https://texform.dev/latex/commands/arctan)
- [\\asec](https://texform.dev/latex/commands/asec)
- [\\asin](https://texform.dev/latex/commands/asin)
- [\\atan](https://texform.dev/latex/commands/atan)
- [\\cos](https://texform.dev/latex/commands/cos)
- [\\cosh](https://texform.dev/latex/commands/cosh)
- [\\cot](https://texform.dev/latex/commands/cot)
- [\\coth](https://texform.dev/latex/commands/coth)
- [\\csc](https://texform.dev/latex/commands/csc)
- [\\csch](https://texform.dev/latex/commands/csch)
- [\\det](https://texform.dev/latex/commands/det)
- [\\erf](https://texform.dev/latex/commands/erf)
- [\\exp](https://texform.dev/latex/commands/exp)
- [\\ln](https://texform.dev/latex/commands/ln)
- [\\log](https://texform.dev/latex/commands/log)
- [\\Pr](https://texform.dev/latex/commands/Pr)
- [\\sec](https://texform.dev/latex/commands/sec)
- [\\sech](https://texform.dev/latex/commands/sech)
- [\\sin](https://texform.dev/latex/commands/sin)
- [\\sinh](https://texform.dev/latex/commands/sinh)
- [\\tan](https://texform.dev/latex/commands/tan)
- [\\tanh](https://texform.dev/latex/commands/tanh)
- [\\tr](https://texform.dev/latex/commands/tr)
- [\\Tr](https://texform.dev/latex/commands/Tr)
- [\\trace](https://texform.dev/latex/commands/trace)

## Test cases

### physics

| Input | Case | MathJax | KaTeX | XeTeX |
| --- | --- | --- | --- | --- |
| \Trace | Positive: baseline | Pass | Fail | Pass |
