# Documentation

### This is machine translation

Translated by
Mouseover text to see original. Click the button below to return to the English verison of the page.

# `_invert`

Reciprocal of an expression

MATLAB live scripts support most MuPAD functionality, though there are some differences. For more information, see Convert MuPAD Notebooks to MATLAB Live Scripts.

## Syntax

```1/ x
_invert(`x`)
```

## Description

`_invert(x)` computes the reciprocal `1/x` of `x`.

`1/x` is equivalent to the function call `_invert(x)`. It represents the inverse of the element `x` with respect to multiplication, i.e., `x * (1/x) = 1`.

The reciprocal of a number of type `Type::Numeric` is returned as a number.

`1/x` is overloaded for matrix domains (`matrix`) and returns the inverse of the matrix `x`.

If `x` is not an element of a library domain with an `"_invert"` method, `1/x` is internally represented as `x^(-1)` = ```_power(x, -1)```.

If `x` is an element of a domain with a slot`"_invert"`, then this method is used to compute `1/x`. Many library domains overload the `/` operator by an appropriate `"_invert"` slot. Note that `a/x` calls the overloading slot `x::dom::_invert(x)` only for `a = 1`.

If neither `x` nor `y` overload the binary operator `/` by a `"_divide"` method, the quotient `x/y` is equivalent to ```x * y^(-1)``` = `_mult(x, _power(y, -1))`.

For finite sets, `1/X` is the set .

## Examples

### Example 1

The reciprocal of an expression is the inverse with respect to `*`:

`_invert(x), x * (1/x) = x * _invert(x)`

`3 * y * x^2 / 27 / x`

Internally, a symbolic expression `1/x` is represented as `x^(-1)` = `_power(x, -1)`:

`type(1/x), op(1/x, 0), op(1/x, 1), op(1/x, 2)`

### Example 2

For finite sets, `1/X` is the set :

`1/{a, b, c}`

### Example 3

Various library domains such as matrix domains or residue class domains overload `_invert`:

```x := Dom::Matrix(Dom::IntegerMod(7))([[2, 3], [3, 4]]): x, 1/x, x * (1/x)```

`delete x:`

## Parameters

 `x`

## Return Values

Arithmetical expression or a set.

`x`