Sponsored links: Algebra eBooks
 

Related

ctranspose-load-matrix-true

load(eigen);

P: matrix([0,1,0],[0,...

Pdag: ctranspose(P);

Calculate

ctranspose-dim-do-mod

dim: 3;

Z: zeromatrix(dim, dim);

for i: 0 thru (dim-1)...

Calculate

ctranspose-eigenvectors-matrix

P: matrix([0,1,0],[0,...

Pdag: ctranspose(P);

A: P+Pdag;

Calculate

ctranspose-load-matrix-true

load(eigen);

P: matrix([0,1,0],[0,...

Pdag: ctranspose(P);

Calculate

ctranspose-length-load-matrix-true

load(eigen);

P: matrix([0,1,0],[0,...

Pdag: ctranspose(P);

Calculate

ctranspose-length-load-matrix-true

load(eigen);

P: matrix([0,1,0],[0,...

Pdag: ctranspose(P);

Calculate

ctranspose-length-load-matrix-true

load(eigen);

P: matrix([0,1,0],[0,...

Pdag: ctranspose(P);

Calculate

ctranspose-length-load-matrix-true

load(eigen);

P: matrix([0,1,0],[0,...

Pdag: ctranspose(P);

Calculate

ctranspose-eigenvectors-matrix

P: matrix([0,1,0],[0,...

Pdag: ctranspose(P);

A: P+Pdag;

Calculate

ctranspose-eigenvectors-load-matrix

load(eigen);

P: matrix([0,1,0],[0,...

Pdag: ctranspose(P);

Calculate

ctranspose

Run Example
(%i1)load(eigen);
(%o1)           /usr/share/maxima/5.21.1/share/matrix/eigen.mac
(%i2) P: matrix([0,1,0],[0,0,1],[1,0,0]);
                                  [ 0  1  0 ]
                                  [         ]
(%o2)                             [ 0  0  1 ]
                                  [         ]
                                  [ 1  0  0 ]
(%i3) Pdag: ctranspose(P);
                                  [ 0  0  1 ]
                                  [         ]
(%o3)                             [ 1  0  0 ]
                                  [         ]
                                  [ 0  1  0 ]
(%i4) A: P+Pdag;
                                  [ 0  1  1 ]
                                  [         ]
(%o4)                             [ 1  0  1 ]
                                  [         ]
                                  [ 1  1  0 ]
(%i5) hermitianmatrix: false;
(%o5)                                false
(%i6) [L, V]: eigenvectors(A);
(%o6)   [[[2, - 1], [1, 2]], [[[1, 1, 1]], [[1, 0, - 1], [0, 1, - 1]]]]
(%i7) Ltmp: [];
(%o7)                                 []
(%i8) Vtmp: [];
(%o8)                                 []
(%i9) for i:1 thru length(L[1]) do    for j:1 thru L[2][i] do      (        Ltmp: append(Ltmp, [L[1][i]]),     Vtmp: append(Vtmp, V[i][j])  );
(%o9)                                done
(%i10) Ltmp;
(%o10)                           [2, - 1, - 1]
(%i11) Vtmp;
(%o11)                  [1, 1, 1, 1, 0, - 1, 0, 1, - 1]
(%i12) U: tranpose(matrix(Vtmp));
(%o12)            tranpose([ 1  1  1  1  0  - 1  0  1  - 1 ])
(%i13) D: apply(diag_matrix, Ltmp);
                                [ 2   0    0  ]
                                [             ]
(%o13)                          [ 0  - 1   0  ]
                                [             ]
                                [ 0   0   - 1 ]
(%i14) 
Run Example
load(eigen);
(%o1)           /usr/share/maxima/5.21.1/share/matrix/eigen.mac
(%i2) P: matrix([0,1,0,0,0,0,0,0,0,0],[0,0,1,0,0,0,0,0,0,0],[0,0,0,1,0,0,0,0,0,0],[0,0,0,0,1,0,0,0,0,0],[0,0,0,0,0,1,0,0,0,0],[0,0,0,0,0,0,1,0,0,0],[0,0,0,0,0,0,0,1,0,0],[0,0,0,0,0,0,0,0,1,0],[0,0,0,0,0,0,0,0,0,1],[1,0,0,0,0,0,0,0,0,0]);
                       [ 0  1  0  0  0  0  0  0  0  0 ]
                       [                              ]
                       [ 0  0  1  0  0  0  0  0  0  0 ]
                       [                              ]
                       [ 0  0  0  1  0  0  0  0  0  0 ]
                       [                              ]
                       [ 0  0  0  0  1  0  0  0  0  0 ]
                       [                              ]
                       [ 0  0  0  0  0  1  0  0  0  0 ]
(%o2)                  [                              ]
                       [ 0  0  0  0  0  0  1  0  0  0 ]
                       [                              ]
                       [ 0  0  0  0  0  0  0  1  0  0 ]
                       [                              ]
                       [ 0  0  0  0  0  0  0  0  1  0 ]
                       [                              ]
                       [ 0  0  0  0  0  0  0  0  0  1 ]
                       [                              ]
                       [ 1  0  0  0  0  0  0  0  0  0 ]
(%i3) Pdag: ctranspose(P);
                       [ 0  0  0  0  0  0  0  0  0  1 ]
                       [                              ]
                       [ 1  0  0  0  0  0  0  0  0  0 ]
                       [                              ]
                       [ 0  1  0  0  0  0  0  0  0  0 ]
                       [                              ]
                       [ 0  0  1  0  0  0  0  0  0  0 ]
                       [                              ]
                       [ 0  0  0  1  0  0  0  0  0  0 ]
(%o3)                  [                              ]
                       [ 0  0  0  0  1  0  0  0  0  0 ]
                       [                              ]
                       [ 0  0  0  0  0  1  0  0  0  0 ]
                       [                              ]
                       [ 0  0  0  0  0  0  1  0  0  0 ]
                       [                              ]
                       [ 0  0  0  0  0  0  0  1  0  0 ]
                       [                              ]
                       [ 0  0  0  0  0  0  0  0  1  0 ]
(%i4) A: P+Pdag;
                       [ 0  1  0  0  0  0  0  0  0  1 ]
                       [                              ]
                       [ 1  0  1  0  0  0  0  0  0  0 ]
                       [                              ]
                       [ 0  1  0  1  0  0  0  0  0  0 ]
                       [                              ]
                       [ 0  0  1  0  1  0  0  0  0  0 ]
                       [                              ]
                       [ 0  0  0  1  0  1  0  0  0  0 ]
(%o4)                  [                              ]
                       [ 0  0  0  0  1  0  1  0  0  0 ]
                       [                              ]
                       [ 0  0  0  0  0  1  0  1  0  0 ]
                       [                              ]
                       [ 0  0  0  0  0  0  1  0  1  0 ]
                       [                              ]
                       [ 0  0  0  0  0  0  0  1  0  1 ]
                       [                              ]
                       [ 1  0  0  0  0  0  0  0  1  0 ]
(%i5) hermitianmatrix: false;
(%o5)                                false
(%i6) L: eigenvalues(A);
          sqrt(sqrt(5) + 3)  sqrt(sqrt(5) + 3)    sqrt(3 - sqrt(5))
(%o6) [[- -----------------, -----------------, - -----------------, 
               sqrt(2)            sqrt(2)              sqrt(2)
                                sqrt(3 - sqrt(5))
                                -----------------, - 2, 2], [2, 2, 2, 2, 1, 1]]
                                     sqrt(2)
(%i7) L[1];
         sqrt(sqrt(5) + 3)  sqrt(sqrt(5) + 3)    sqrt(3 - sqrt(5))
(%o7) [- -----------------, -----------------, - -----------------, 
              sqrt(2)            sqrt(2)              sqrt(2)
                                                     sqrt(3 - sqrt(5))
                                                     -----------------, - 2, 2]
                                                          sqrt(2)
(%i8) 
Run Example
load(eigen);
(%o1)           /usr/share/maxima/5.21.1/share/matrix/eigen.mac
(%i2) P: matrix([0,1,0,0,0,0,0,0,0,0],[0,0,1,0,0,0,0,0,0,0],[0,0,0,1,0,0,0,0,0,0],[0,0,0,0,1,0,0,0,0,0],[0,0,0,0,0,1,0,0,0,0],[0,0,0,0,0,0,1,0,0,0],[0,0,0,0,0,0,0,1,0,0],[0,0,0,0,0,0,0,0,1,0],[0,0,0,0,0,0,0,0,0,1],[1,0,0,0,0,0,0,0,0,0]);
                       [ 0  1  0  0  0  0  0  0  0  0 ]
                       [                              ]
                       [ 0  0  1  0  0  0  0  0  0  0 ]
                       [                              ]
                       [ 0  0  0  1  0  0  0  0  0  0 ]
                       [                              ]
                       [ 0  0  0  0  1  0  0  0  0  0 ]
                       [                              ]
                       [ 0  0  0  0  0  1  0  0  0  0 ]
(%o2)                  [                              ]
                       [ 0  0  0  0  0  0  1  0  0  0 ]
                       [                              ]
                       [ 0  0  0  0  0  0  0  1  0  0 ]
                       [                              ]
                       [ 0  0  0  0  0  0  0  0  1  0 ]
                       [                              ]
                       [ 0  0  0  0  0  0  0  0  0  1 ]
                       [                              ]
                       [ 1  0  0  0  0  0  0  0  0  0 ]
(%i3) Pdag: ctranspose(P);
                       [ 0  0  0  0  0  0  0  0  0  1 ]
                       [                              ]
                       [ 1  0  0  0  0  0  0  0  0  0 ]
                       [                              ]
                       [ 0  1  0  0  0  0  0  0  0  0 ]
                       [                              ]
                       [ 0  0  1  0  0  0  0  0  0  0 ]
                       [                              ]
                       [ 0  0  0  1  0  0  0  0  0  0 ]
(%o3)                  [                              ]
                       [ 0  0  0  0  1  0  0  0  0  0 ]
                       [                              ]
                       [ 0  0  0  0  0  1  0  0  0  0 ]
                       [                              ]
                       [ 0  0  0  0  0  0  1  0  0  0 ]
                       [                              ]
                       [ 0  0  0  0  0  0  0  1  0  0 ]
                       [                              ]
                       [ 0  0  0  0  0  0  0  0  1  0 ]
(%i4) A: P+Pdag;
                       [ 0  1  0  0  0  0  0  0  0  1 ]
                       [                              ]
                       [ 1  0  1  0  0  0  0  0  0  0 ]
                       [                              ]
                       [ 0  1  0  1  0  0  0  0  0  0 ]
                       [                              ]
                       [ 0  0  1  0  1  0  0  0  0  0 ]
                       [                              ]
                       [ 0  0  0  1  0  1  0  0  0  0 ]
(%o4)                  [                              ]
                       [ 0  0  0  0  1  0  1  0  0  0 ]
                       [                              ]
                       [ 0  0  0  0  0  1  0  1  0  0 ]
                       [                              ]
                       [ 0  0  0  0  0  0  1  0  1  0 ]
                       [                              ]
                       [ 0  0  0  0  0  0  0  1  0  1 ]
                       [                              ]
                       [ 1  0  0  0  0  0  0  0  1  0 ]
(%i5) hermitianmatrix: false;
(%o5)                                false
(%i6) [vals, vecs]: eigenvectors(A);
           sqrt(sqrt(5) + 3)  sqrt(sqrt(5) + 3)    sqrt(3 - sqrt(5))
(%o6) [[[- -----------------, -----------------, - -----------------, 
                sqrt(2)            sqrt(2)              sqrt(2)
sqrt(3 - sqrt(5))
-----------------, - 2, 2], [2, 2, 2, 2, 1, 1]], 
     sqrt(2)
              sqrt(sqrt(5) + 3)    2 sqrt(5) + 2
[[[1, 0, - 1, -----------------, - -------------, 
                   sqrt(2)               4
sqrt(sqrt(5) + 3) (sqrt(2) sqrt(5) - sqrt(2))
---------------------------------------------, 0, 
                      4
  sqrt(sqrt(5) + 3) (sqrt(2) sqrt(5) - sqrt(2))  sqrt(5) + 1
- ---------------------------------------------, -----------, 
                        4                             2
  sqrt(sqrt(5) + 3)            sqrt(sqrt(5) + 3)  sqrt(5) + 1
- -----------------], [0, 1, - -----------------, -----------, 
       sqrt(2)                      sqrt(2)            2
  sqrt(sqrt(5) + 3) (sqrt(2) sqrt(5) - sqrt(2))
- ---------------------------------------------, 0, 
                        4
sqrt(sqrt(5) + 3) (sqrt(2) sqrt(5) - sqrt(2))    2 sqrt(5) + 2
---------------------------------------------, - -------------, 
                      4                                4
sqrt(sqrt(5) + 3)                        sqrt(sqrt(5) + 3)  - 2 sqrt(5) - 2
-----------------, - 1]], [[1, 0, - 1, - -----------------, ---------------, 
     sqrt(2)                                  sqrt(2)              4
  sqrt(sqrt(5) + 3) (sqrt(2) sqrt(5) - sqrt(2))
- ---------------------------------------------, 0, 
                        4
  sqrt(sqrt(5) + 3) (sqrt(2) - sqrt(2) sqrt(5))    - sqrt(5) - 1
- ---------------------------------------------, - -------------, 
                        4                                2
sqrt(sqrt(5) + 3)          sqrt(sqrt(5) + 3)  sqrt(5) + 1
-----------------], [0, 1, -----------------, -----------, 
     sqrt(2)                    sqrt(2)            2
sqrt(sqrt(5) + 3) (sqrt(2) sqrt(5) - sqrt(2))
---------------------------------------------, 0, 
                      4
  sqrt(sqrt(5) + 3) (sqrt(2) sqrt(5) - sqrt(2))    2 sqrt(5) + 2
- ---------------------------------------------, - -------------, 
                        4                                4
  sqrt(sqrt(5) + 3)                      sqrt(3 - sqrt(5))  2 sqrt(5) - 2
- -----------------, - 1]], [[1, 0, - 1, -----------------, -------------, 
       sqrt(2)                                sqrt(2)             4
  sqrt(2) sqrt(3 - sqrt(5)) sqrt(5) + sqrt(2) sqrt(3 - sqrt(5))
- -------------------------------------------------------------, 0, 
                                4
sqrt(2) sqrt(3 - sqrt(5)) sqrt(5) + sqrt(2) sqrt(3 - sqrt(5))  1 - sqrt(5)
-------------------------------------------------------------, -----------, 
                              4                                     2
  sqrt(3 - sqrt(5))            sqrt(3 - sqrt(5))    sqrt(5) - 1
- -----------------], [0, 1, - -----------------, - -----------, 
       sqrt(2)                      sqrt(2)              2
sqrt(2) sqrt(3 - sqrt(5)) sqrt(5) + sqrt(2) sqrt(3 - sqrt(5))
-------------------------------------------------------------, 0, 
                              4
  sqrt(2) sqrt(3 - sqrt(5)) sqrt(5) + sqrt(2) sqrt(3 - sqrt(5))
- -------------------------------------------------------------, 
                                4
2 sqrt(5) - 2  sqrt(3 - sqrt(5))
-------------, -----------------, - 1]], 
      4             sqrt(2)
               sqrt(3 - sqrt(5))    2 - 2 sqrt(5)
[[1, 0, - 1, - -----------------, - -------------, 
                    sqrt(2)               4
sqrt(2) sqrt(3 - sqrt(5)) sqrt(5) + sqrt(2) sqrt(3 - sqrt(5))
-------------------------------------------------------------, 0, 
                              4
- sqrt(2) sqrt(3 - sqrt(5)) sqrt(5) - sqrt(2) sqrt(3 - sqrt(5))
---------------------------------------------------------------, 
                               4
  sqrt(5) - 1  sqrt(3 - sqrt(5))          sqrt(3 - sqrt(5))    sqrt(5) - 1
- -----------, -----------------], [0, 1, -----------------, - -----------, 
       2            sqrt(2)                    sqrt(2)              2
  sqrt(2) sqrt(3 - sqrt(5)) sqrt(5) + sqrt(2) sqrt(3 - sqrt(5))
- -------------------------------------------------------------, 0, 
                                4
sqrt(2) sqrt(3 - sqrt(5)) sqrt(5) + sqrt(2) sqrt(3 - sqrt(5))  2 sqrt(5) - 2
-------------------------------------------------------------, -------------, 
                              4                                      4
  sqrt(3 - sqrt(5))
- -----------------, - 1]], [[1, - 1, 1, - 1, 1, - 1, 1, - 1, 1, - 1]], 
       sqrt(2)
[[1, 1, 1, 1, 1, 1, 1, 1, 1, 1]]]]
(%i7) 

Related Help

Help for Ctranspose