VOOZH about

URL: https://www.geeksforgeeks.org/dsa/c-program-check-whether-matrix-skew-symmetric-not/

⇱ C Program To Check whether Matrix is Skew Symmetric or not - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

C Program To Check whether Matrix is Skew Symmetric or not

Last Updated : 21 Jun, 2022

A Skew Symmetric Matrix or Anti-Symmetric Matrix is a square matrix whose transpose is negative to that of the original matrix. If the entry in the ith row and jth column of a matrix is a[i][j], i.e. if A = (a[i][j]) then the skew symmetric condition is -A = -a[j][i].
Examples : 

Input : matrix: 0 5 -4 
 -5 0 1 
 4 -1 0 

Output:  
Transpose matrix: 0 -5 4
 5 0 -1
 -4 1 0
Skew Symmetric matrix

Approach:

  1. Find the transpose of the input matrix.
  2. If the input matrix is equal to the negative of its transpose matrix, then the matrix is Skew Symmetrical. 

Below is the implementation of the above approach:


Output
Transpose matrix: 
0 -5 4 
5 0 -1 
-4 1 0 
Skew Symmetric Matrix

Time complexity: O(ROW x COL).
Auxiliary Space: O(ROW x COL).


References : Wikipedia

Comment
Article Tags:
Article Tags: