Skip to contents

Matrix Trace

Usage

matrix_trace(mat)

Arguments

mat

A 4x4 numeric matrix.

Value

A number

Examples

matrix_trace(diag(4))
#> [1] 4