ভূমিকা
একটি স্কোয়ার ম্যাট্রিক্স A দেওয়া থাকলে: - সিমেট্রিক (Symmetric) হলে: Aᵀ = A - স্কিউ-সিমেট্রিক (Skew-symmetric) হলে: Aᵀ = -A - স্কিউ-সিমেট্রিক ম্যাট্রিক্সের ডায়াগোনাল উপাদানগুলো সবসময় ০ হয়।
C++ প্রোগ্রাম উদাহরণ
#includeusing namespace std; int main() { int A[10][10], m, n, i, j, x = 0, y = 0; cout << "Rows and columns: "; cin >> m >> n; cout << "Matrix elements: "; for (i = 0; i < m; i++) for (j = 0; j < n; j++) cin >> A[i][j]; for (i = 0; i < m; i++) for (j = 0; j < n; j++) { if (A[i][j] != A[j][i]) x = 1; else if (A[i][j] == -A[j][i]) y = 1; } if (x == 0) cout << "Symmetric"; else if (y == 1) cout << "Skew-symmetric"; else cout << "Neither"; return 0; }
আউটপুট (উদাহরণ)
Input: 2 2 10 20 20 10 Output: The matrix is symmetric.