**A[][]**is obtained by changing

**A[i][j]**to

**A[j][i].**

### For example if a matrix is

1 2

3 4

5 6

### then transpose of above matrix will be

1 3 5

2 4 6

When we transpose a matrix then the order of matrix changes, but for a square matrix order remains same.

### Algorithm :

Matrix Transpose means changing the order or arrangement of a matrix. If**A**be the given matrix, then the matrix formed by interchanging the columns and rows of the matrix

**A**without changing the value of elements is called as transpose of a matrix. If

**A**=

*m×n***[aij]**, then

**AT**=

*(n×m)***[aji]**

i.e. the

**(i,j)**th element of

**A**is the

**(j,i)**th element of

**AT**. So, in

**A**and

**AT**,

**i**th column of

**AT**=

**i**th row of

**A**

**j**th row of

**AT**=

**j**th column of

**A**

In

**A**and

**AT**, the diagonal elements are equal.

### Example: C++ program to find transpose of a matrix

Output

Enter the number of Rows of Matrix 1 : 1

Enter the number of Columns of Matrix 1 : 2

Enter the Element a[0][0] : 8

Enter the Element a[0][1] : 6

Matrix elements is :

8 6

Transpose Matrix elements is :

8

6

Date - 1/26/2013-@author Y.ACHCHUTHAN -cpp.achchuthan.org

Press Enter to return to Quincy...

### Example: C++ program to find transpose of a matrix

#### Output

Enter rows and columns of matrix: 2

3

Enter elements of matrix:

Enter elements a11: 1

Enter elements a12: 2

Enter elements a13: 3

Enter elements a21: 4

Enter elements a22: 5

Enter elements a23: 6

Entered Matrix:

1 2 3

4 5 6

Transpose of Matrix:

1 4

2 5

3 6

easy program..

ReplyDeletebasic is easy....

ReplyDelete## Post a Comment