• Courses
  • Tutorials
  • Jobs
  • Practice
  • Contests
July 11, 2022 |690 Views
C++ Program to Check if a Matrix is Skew Symmetric
Description
Discussion

In this video, we will see a C++ Program to check if a matrix is skew symmetric.

What is a Skew Symmetric Matrix?
Basically, 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].

Let's see 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
Input : 
Matrix:
1 5 -4
-5 0 1
4 -1 0

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

Not a Skew Symmetric matrix

We will be using 3 different methods for checking skew matrix:

1. Brute approach
2. Better approach
3. Optimal approach

Apart from that, we will see the time and space complexity of all methods.

Check if a matrix is skew symmetric or not:

Read More