serve/vendor/markbaker/matrix/classes/src/Functionsidentity.php

Function code for the matrix identity() function

Functions

identity()

identity(\Matrix\Matrix|array  $matrix) : \Matrix\Matrix

Returns the identity of a matrix or an array.

Parameters

\Matrix\Matrix|array $matrix

Matrix or an array to treat as a matrix.

Throws

\Matrix\Exception

If argument isn't a valid matrix or array.

Returns

\Matrix\Matrix —

The identity matrix