## Keyboard shortcuts

Press `←` or `→` to navigate between chapters

Press `S` or `/` to search in the book

Press `?` to show this help

Press `Esc` to hide this help

# Invert 3x3 matrix

Invert a 3x3 matrix.

    template <typename T>
    inline __host__ __device__ double invert_3x3(T* mat, T* mat_inv)

## Parameters

#### `mat`

- Input: 9-component 1D (3x3 matrix) in column major order

#### `mat_inv`

- Output: 9-component 1D (3x3 matrix) inverted matrix in column major order

## Returns

Determinate of the input matrix.