Algorithm and Flowchart to Find transpose of a matrix


Algorithm to find transpose of a matrix

Transpose of a matrix is obtained by changing rows to columns and columns to rows. It is denoted by AT

Algorithm to find transpose of a matrix

Flowchart to find transpose of a matrix

Flowchart to find transpose of a matrix
Remove WaterMark from Above Flowchart

Pseudocode to find transpose of a matrix

Step 1: Start Step 2: Declare matrix a[m][n] of order mxn Step 3: Read matrix a[m][n] from User Step 4: Declare matrix b[m][n] of order mxn Step 5: // Transposing the Matrix 5.1: Declare variables i, j 5.2: Set i=0, j=0 5.3: Repeat until i < n 5.3.1: Repeat until j < m b[i][j] = a[j][i] j=j+1 // Increment j by 1 5.3.2: i=i+1 // Increment i by 1 5.4: Print matrix b // The matrix b is the transpose of a and can be printed now Step 6: Stop

In the above algorithm,

  1. We first declare two matrices a and b of order mxn
  2. Then we read matrix a from the user. We will use matrix b to store transpose of the matrix.
  3. Now, we declare two variables i, j and initialize them to 0
  4. After this we start a loop of i, till it reaches n which gave us the column indexes and inside it a loop of j which gives us the elements of the row.
The statement b[i][j] = a[j][i] gives the value of a by changing the row to column and column to row and stores in b. for e.g. i=1, j=2 then b[1][2]=a[2][1], thus assigning the matrix b to the transpose of a.



Want to Learn How to write own Algorithm and Flowcharts

Want to test your logical skills in Algorithms?


1 comment
  • C.kokilavani

    I want program in c programs books in gmail please send the book

Best Search Engine:

Sponsored Deals ends in

Thinking of Buying Products Online??

Use Below Search to get Best Discounts Online

Interesting Technical Quizzes:

Online Browser Games:

Search Tags

    Pseudocode for transpose of a matrix

    Transpose of matrix Algorithm

    Matrix Transpose algorithm