Learn R Programming

SteinIV (version 0.1-1)

tr: Trace of a matrix.

Description

Compute the trace of a square matrix.

Usage

tr(X)

Arguments

X
Numeric: A square matrix.

Value

numeric
A real number.

Details

This computes the sum of the diagonal elements of a square matrix.