# acos

Inverse cosine in radians

## Description

example

````y = acos(x)` returns the Inverse Cosine (cos-1) of the elements of `x`. The `acos` function operates element-wise on arrays. For real elements of `x` in the interval `[-1,1]`, `acos(x)` returns real values in the interval `[0,pi]`. For real values of `x` outside the interval `[-1,1]` and for complex values of `x`, `acos(x)` returns complex values. All angles are in radians.```

## Examples

collapse all

### Inverse Cosine of a Value

`acos(0.3)`
```ans = 1.2661```

### Inverse Cosine of a Vector of Complex Values

Find the inverse cosine of the elements of vector `x`. The `acos` function acts on `x` element-wise.

```x = [0.5i 1+3i -2.2+i]; y = acos(x)```
```y = 1.5708 - 0.4812i 1.2632 - 1.8642i 2.6799 - 1.5480i```

### Plot the Inverse Cosine Function

Plot the inverse cosine function over the domain .

```x = -1:.05:1; plot(x,acos(x)) grid on ```

## Input Arguments

collapse all

### `x` — Numeric inputnumber | vector | matrix | multidimensional array

Numeric input, specified as a number, vector, matrix, or multidimensional array.

Data Types: `single` | `double`
Complex Number Support: Yes

## More About

collapse all

### Inverse Cosine

The inverse cosine is defined as

${\mathrm{cos}}^{-1}\left(z\right)=-i\mathrm{log}\left[z+i{\left(1-{z}^{2}\right)}^{1/2}\right].$

## See Also

#### Introduced before R2006a

Was this topic helpful?

Get trial now