An identity Matrix is a square matrix in which all the elements of the principal diagonal are ones and all other elements are zeros.
Given a matrix, we have to check whether it is identity matrix or not.
Example:
Input:
matrix:
[1, 0, 0]
[0, 1, 0]
[0, 0, 1]
Output:
Identity Matrix !!
Program to check Identity Matrix in Kotlin
Output
need an explanation for this answer? contact us directly to get an explanation for this answer