C_Programs icon indicating copy to clipboard operation
C_Programs copied to clipboard

Program to find the transpose of a matrix in C

Open go4krishanu opened this issue 5 years ago • 0 comments
trafficstars

Program to find the transpose of a matrix is discussed here. Transpose of a matrix can be performed by exchanging the elements of row by column and the elements of a column by row.

Consider the matrix:

m[0][0] = 10

m[0][1] = 20

m[1][0] = 30

m[1][1] = 40

m[2][0] = 50

m[2][1]= 60

The transpose of the above matrix can be done by this way:

r_m[0][0] = m[0][0] = 10

r_m[0][1] = m[1][0] = 30

r_m[0][2] = m[2][0] = 50

r_m[1][0] = m[0][1] = 20

r_m[1][1] = m[1][1] = 40

r_m[1][2] = m[2][1] = 60

go4krishanu avatar Oct 17 '20 16:10 go4krishanu