#32 - Identity Matrix
An identity matrix is a square matrix in which all the elements of the principal diagonal are ones and all other elements are zeros.
Your task is to implement a function to check if a given square matrix is an identity matrix.
Example 1
Input
Output
Example 2
Input
Output
Last updated