![]()  | 
  
    Stan Math Library
    5.1.0
    
   Automatic Differentiation 
   | 
   
      
  | 
  inline | 
Returns the trace of the specified matrix.
The trace is defined as the sum of the elements on the diagonal. The matrix is not required to be square. Returns 0 if matrix is empty.
| T | type of the elements in the matrix | 
| [in] | m | Specified matrix. |