Work@Microsoft    Live@Seattle

Transpose of a Matrix

Transpose of a Matrix
5 (100%) 1 vote

The transpose of a matrix A is another matrix image.   The general formula for a matrix transposition is

For example,

A square matrix whose transpose is equal to itself is called a symmetric matrix; that is, A is symmetric if

Here is the C++ implementation of matrix transposition.  The complete source code of CMatrix can be downloaded from here.

CMatrix::transpose() const
    CMatrix mat(_columns, _rows);
    for (int i = 0; i < _rows; i++)
        for (int j = 0; j < _columns; j++)
            mat.get(j, i) = get(i, j);

    return mat;

Leave a Comment

Your email address will not be published. Required fields are marked *