VOOZH about

URL: https://www.geeksforgeeks.org/dsa/program-check-involutory-matrix/

⇱ Program to check Involutory Matrix - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

Program to check Involutory Matrix

Last Updated : 19 Aug, 2022

Given a matrix and the task is to check matrix is involutory matrix or not. 

Involutory Matrix: A matrix is said to be involutory matrix if matrix multiply by itself return the identity matrix. Involutory matrix is the matrix that is its own inverse. The matrix A is said to be involutory matrix if A * A = I. Where I is the identity matrix. 

👁 Involutory-Matrix

Examples: 

Input : mat[N][N] = {{1, 0, 0},
 {0, -1, 0},
 {0, 0, -1}}
Output : Involutory Matrix

Input : mat[N][N] = {{1, 0, 0},
 {0, 1, 0},
 {0, 0, 1}} 
Output : Involutory Matrix

Implementation:


Output
Involutory Matrix

Time Complexity: O(n3)
Auxiliary Space: O(n2), since n2 extra space has been taken.

Comment
Article Tags: