# \vu

Shorthand physics-package command for a bold unit vector with a hat accent.

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

## Metadata

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

## Syntax

### physics

Argument specification: `s m`

Shorthand physics-package command for a bold unit vector with a hat accent.

## Examples

```latex
\vu{v}
```

[Open in Playground](https://play.texform.dev/?input=%5Cvu%7Bv%7D)

```latex
\vu*{v}
```

[Open in Playground](https://play.texform.dev/?input=%5Cvu*%7Bv%7D)

## 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
\vu{#1}
```

→

```latex
\hat{\vb{#1}}
```

If the optional star is present, the template parts are joined with '*', so \vu*{#1} reparses as \hat{\vb*{#1}}.

### [physics/vu-to-hat-mathbf](https://texform.dev/rules/physics/vu-to-hat-mathbf)

Canonicalize vu to an explicit hat-wrapped mathbf form.

Level: faithful. Fidelity: render.

```latex
\vu{#1}
```

→

```latex
\hat{\mathbf{#1}}
```

```latex
\vu{n}\cdot\vb{E}=0
```

→

```latex
\hat{\mathbf{n}}\cdot\vb{E}=0
```

## Equivalent forms

```latex
\vectorunit{#1}
```

exact. 

```latex
\vectorunit*{#1}
```

exact. Starred long-form equivalent.

```latex
\hat{\vb{#1}}
```

exact. 

```latex
\hat{\vb*{#1}}
```

exact. Starred form.

## See also

- [\\va](https://texform.dev/latex/commands/va)
- [\\vectorarrow](https://texform.dev/latex/commands/vectorarrow)
- [\\vectorunit](https://texform.dev/latex/commands/vectorunit)

## Test cases

### physics

| Input | Case | MathJax | KaTeX | XeTeX |
| --- | --- | --- | --- | --- |
| \vu{a} | Positive: baseline | Pass | Fail | Pass |
| \vu*{a} | Positive: vary:s[0] | Pass | Fail | Pass |
| \vu a | Positive: bare[1] | Pass | Fail | Pass |
