ctranspose, '

Complex conjugate transpose

Syntax

Description

example

B = A' computes the complex conjugate transpose of A.

B = ctranspose(A) is an alternate way to execute A', but is rarely used. It enables operator overloading for classes.

Examples

expand all

Conjugate Transpose of Real Matrix

Create a 4-by-2 matrix.

A = [2 1; 9 7; 2 8; 3 5]
A =

     2     1
     9     7
     2     8
     3     5

Find the conjugate transpose of A.

B = A'
B =

     2     9     2     3
     1     7     8     5

The result is a 2-by-4 matrix. B has the same elements as A, but the row and column index for each element are interchanged. When no complex elements are present, A' produces the same result as A.'.

Conjugate Transpose of Complex Matrix

Create a 2-by-2 matrix with complex elements.

A = [0-1i 2+1i;4+2i 0-2i]
A =

   0.0000 - 1.0000i   2.0000 + 1.0000i
   4.0000 + 2.0000i   0.0000 - 2.0000i

Find the conjugate transpose of A.

B = A'
B =

   0.0000 + 1.0000i   4.0000 - 2.0000i
   2.0000 - 1.0000i   0.0000 + 2.0000i

The result, B, contains the elements of A with the row and column indices interchanged. The sign of the imaginary part of each number is also switched.

Input Arguments

expand all

A — Input arrayvector | matrix | cell array | categorical array | datetime array | duration array | calendarDuration array | structure field

Input array, specified as a vector or matrix of any numeric, logical, or char data type, or as a cell array, categorical array, datetime array, duration array, calendarDuration array, or structure field.

Complex Number Support: Yes

More About

expand all

Complex Conjugate Transpose

The complex conjugate transpose of a matrix interchanges the row and column index for each element, reflecting the elements across the main diagonal. The operation also negates the imaginary part of any complex numbers.

For example, if B = A' and A(1,2) is 1+1i, then the element B(2,1) is 1-1i.

Tips

  • The nonconjugate transpose operator, A.', performs a transpose without conjugation. That is, it does not change the sign of the imaginary parts of the elements.

  • For logical or non-numeric inputs, ctranspose and transpose produce the same result.

See Also

| |

Was this topic helpful?