#include <stdio.h>
#include<conio.h>void main()
{
int a[10][10],rows,cols:");
clrscr();
printf("enter the rows and cols:");
scanf("%d%d",&rows,&cols")
printf("enter the elements into the array:");
for(i=0;i<rows;i++)
for(j=0;j<cols;j++)
scanf("%d",&a[i][j]);
printf("the transpose is:");
for("i=0;i<rows;i++)
{
for(j=o;j<cols;j++)
{
printf("%d",a[j][i]);
}
printf("\n");
}getch();
}
Chat with our AI personalities
yes, it is true that the transpose of the transpose of a matrix is the original matrix
Another sparse matrix.
Hermitian matrix (please note spelling): a square matrix with complex elements that is equal to its conjugate transpose.
transpose(Matrix mat,int rows, int cols ){ //construction step Matrix tmat; for(int i=0;i<rows;i++){ for(int j=0;j<cols;j++){ tmat[j][i] = mat[i][j]; } } }
It is the conjugate transpose of the matrix. Of course the conjugate parts only matters with complex entries. So here is a definition:A unitary matrix is a square matrix U whose entries are complex numbers and whose inverse is equal to its conjugate transpose U*. This means thatU*U = UU* = I. Where I is the identity matrix.