Javatpoint Logo
Javatpoint Logo

Python Program to Transpose a Matrix

Transpose Matrix:

If you change the rows of a matrix with the column of the same matrix, it is known as transpose of a matrix. It is denoted as X'. For example: The element at ith row and jth column in X will be placed at jth row and ith column in X'.

Let's take a matrix X, having the following elements:

See this example:

Output:

Python Nativ Data Programs4



Please Share

facebook twitter google plus pinterest

Learn Latest Tutorials


B.Tech / MCA