1

The answer to the question asked here Why is complex conjugate transpose the default in Matlab

says that for complex numbers we can use ' symbol to denote the transpose operation that is used for real numbers. Mathematically, the transpose operation that is done for real valued numbers is denoted by the symbol (.)^T . For the transpose of complex numbers the equivalent symbol is (.)^H. The way it is done is -- First we take the conjugate of the complex number and then take its transpose. This is the operation (.)^H.

I want to implement the operation (.)^{*T} = (.)^H for complex number. I have used the symbol apostrophe for this. Please correct me where wrong.

I wanted to confirm if my implementation of the concept is correct or not using Matlab. For example, for real valued vector A_r, I want to multiply it with its transpose multiply_r = A_r*A_r'

Replicating the same for complex valued vector A_c, this operation would become multiply_c = A_c * A_c'

A_r =[1,2,3]; %real valued vector
B_r = A_r'; %transpose of real valued vector
multiply_r =A_r*B_r;

A_c = [1 + sqrt(-1)*1, 2+sqrt(-1)*2, 3+sqrt(-1)*3]; %complex valued vector
B_c = A_c'; %transpose of complex valued vector
multiply_c = A_c*B_c;

Is this okay?

UPDATE : I am trying to take the normal transpose of this complex valued array, so that it is arranged in 3 rows and 1 column intead of 1 row and 3 columns. Using the operator .' I am getting weird values because the array is now increased in size !! What is the proper way?

h = [ -5.1053 + 3.6797i  1.3327 + 5.7339i  4.1302 -10.7521i].'

h =

  -5.1053 + 3.6797i
   1.3327 + 5.7339i
   4.1302          
        0 -10.7521i
Community
  • 1
  • 1
SKM
  • 959
  • 2
  • 19
  • 45
  • 1
    Looks godd. But it depends on what you want to do. If for complex numbers you want transpose (without conjugate) use `.'`. If you want conjugate transpose use `'` – Luis Mendo Nov 26 '16 at 10:53
  • @Luis Mendo: I want to do the operation equivalent to $(.)^{*T} = (.)^H$ . Then what should I use? Is this conjugate transpose? – SKM Nov 26 '16 at 16:56
  • BTW, you don;t need to write `sqrt(-1)` you have `i` and `j` symbols for this in Matlab. – Shai Nov 27 '16 at 06:48

1 Answers1

2

As you noted, Matlab has both matrix "transpose" ((.)^T) and "conjugate transpose" ((.)^H) defined.
For real-valued transpose, you have transpose, that can be expressed as an operator .' (note the '.' before the '):

aT = transpose(a);
isequal( aT, a.' );  % transpose() and .' are the same

For complex conjugate transpose you have ctranspose, that can be expressed as an operator ' (note there is no . before the '):

aH = ctranspose(a);
isequal( aH, a' );  % ctranspose and ' are the same

You can verify using conj:

isequal( a', conj(a).' );
Shai
  • 111,146
  • 38
  • 238
  • 371
  • Could you please see the update in my question? I am having a weird situation when uing the operator for a particular case – SKM Nov 28 '16 at 04:35
  • @SKM use commas to separate values – Shai Nov 28 '16 at 05:41
  • These values are generated by the program during run-time using an equation, I cannot put comma. Is there a way by which once the equation computes these values, I can put a comma? – SKM Nov 28 '16 at 06:46
  • @SKM can you eliminate spaces? – Shai Nov 28 '16 at 18:28
  • No, I am afraid no modification can be done because these are generated from an estimator :( – SKM Nov 28 '16 at 20:20
  • 1
    I did a hack and solved the problem by initialiizing the vector as row order. – SKM Nov 28 '16 at 20:44