TenEig — Tensor Eigenpairs Solver

zeig

Tensor Real Z-Eigenvalues and Z-Eigenvectors

Syntax

  • [lambda,V] = zeig(___) example
  • [lambda,V,res,cnd] = zeig(___) example

Description

example

lambda = zeig(A) returns a row vector containing the Z-Eigenvalues, that satisfy the equation Av m-1 = λ v, where A is an n-dimensional real tensor of order m, v is a row vector of length n, and λ is a scalar. The values of λ that satisfy the equation are the Z-Eigenvalues. The corresponding values of v that satisfy the equation are the Z-Eigenvectors.

example

lambda = zeig(A,'symmetric') specifies that A is a symmetric real tensor. If it is not, convert it to a symmetric tensor.

example

lambda = zeig(P) specifies that a real tensor A implicitly given by P = Av m.

example

[lambda, V] = zeig(___) returns two optional outputs for any of the previous input syntaxes. lambda row vector containing the Z-Eigenvalues. V is a matrix whose columns are the corresponding Z-Eigenvectors.

example

[lambda, V,res, cnd] = zeig(___) also returns two row vectors containing the residue and reciprocal of the condition number of each eigenpair.

Examples

expand all

Z-Eigenvalues of a real tensor

A(1,1,1) = 1; A(1,2,1) = 2; A(2,1,1) = 3; A(2,2,1) = 4;
A(1,1,2) = 5; A(1,2,2) = 6; A(2,1,2) = 7; A(2,2,2) = 0
A(:,:,1) =

     1     2
     3     4


A(:,:,2) =

     5     6
     7     0

Calculate the Z-Eigenvalues of A. The result is a row vector.

lambda = zeig(A)
lambda =

   -9.8995   -4.3820   -0.4105    0.4105    4.3820    9.8995

Z-Eigenvalues and Z-Eigenvectors of a symmetric real tensor

A = zeros(3,3,3,3);
A(1,1,1,1) =  0.2883; A(1,1,1,2) = -0.0031; A(1,1,1,3) =  0.1973;
A(1,1,2,2) = -0.2485; A(1,1,2,3) = -0.2939; A(1,1,3,3) =  0.3847;
A(1,2,2,2) =  0.2972; A(1,2,2,3) =  0.1862; A(1,2,3,3) =  0.0919;
A(1,3,3,3) = -0.3619; A(2,2,2,2) =  0.1241; A(2,2,2,3) = -0.3420;
A(2,2,3,3) =  0.2127; A(2,3,3,3) =  0.2727; A(3,3,3,3) = -0.3054;

Note that the above real tensor A is nonsymmetric. Convert it to a symmetric tensor and calculate the Z-Eigenvalues and Z-Eigenvectors.

[lambda,V] = zeig(A,'symmetric')
lambda =

  Columns 1 through 13

   -1.0954   -1.0954   -0.5629   -0.5629   -0.0451   -0.0451    0.1735    0.1735    0.2433    0.2433    0.2628    0.2628    0.2682

  Columns 14 through 22

    0.2682    0.3633    0.3633    0.5105    0.5105    0.8169    0.8169    0.8893    0.8893


V =

  Columns 1 through 13

   -0.5915    0.5915   -0.1762    0.1762   -0.7797    0.7797   -0.3357    0.3357   -0.9895    0.9895   -0.1318    0.1318   -0.6099
    0.7467   -0.7467    0.1796   -0.1796   -0.6135    0.6135   -0.9073    0.9073   -0.0947    0.0947    0.4425   -0.4425   -0.4362
    0.3043   -0.3043   -0.9678    0.9678   -0.1250    0.1250   -0.2531    0.2531    0.1088   -0.1088    0.8870   -0.8870   -0.6616

  Columns 14 through 22

    0.6099   -0.2676    0.2676   -0.3598    0.3598   -0.8412    0.8412   -0.6672    0.6672
    0.4362   -0.6447    0.6447    0.7780   -0.7780    0.2635   -0.2635   -0.2471    0.2471
    0.6616   -0.7160    0.7160   -0.5150    0.5150   -0.4722    0.4722    0.7027   -0.7027

Z-Eigenvalues and Z-Eigenvectors of a symmetric real tensor implicitly given in a polynomial

Create a cell of string P which equals Av m.

 P = {'3*x1^4+x2^4+3*x1^2*x2^2'};

Calculate the Z-Eigenvalues, lambda and the Z-Eigenvectors, V.

[lambda, V] = zeig(P)
lambda =

     1     1     3     3


V =

     0     0    -1     1
    -1     1     0     0

Residue and reciprocal of the condition number of eigenpairs

Create a cell of string P which equals Av m.

 P = {'3*x1^4+x2^4'};

Calculate the Z-Eigenvalues, lambda, the Z-Eigenvectors, V, the residule, res and the reciprocal of the condition number, cnd.

[lambda, V, res, cnd] = zeig(P)
lambda =

    0.7500    0.7500    0.7500    0.7500    1.0000    1.0000    3.0000    3.0000


V =

   -0.5000   -0.5000    0.5000    0.5000         0         0   -1.0000    1.0000
   -0.8660    0.8660   -0.8660    0.8660   -1.0000    1.0000         0         0


res =

   1.0e-16 *

    0.5551    0.5551    0.5551    0.5551         0         0         0         0


cnd =

    0.2159    0.2401    0.2342    0.2342    0.1667    0.1667    0.0357    0.0357

Input Arguments

expand all

A — Input real tensor n-dimensional real tensor of order m

Input real tensor, specified as a real tensor.

Data Types: double | single
Complex Number Support: No

P — Z-Eigenvalue problem input polynomial cell

Specifies the real tensor implicitly defined by the polynomial P = Av m.

Data Types: cell of one string

Output Arguments

expand all

lambda — Z-Eigenvaluesrow vector

Z-Eigenvalues, returned as a row vector containing the Z-Eigenvalues.

V — Z-Eigenvectors matrix

Z-Eigenvectors, returned as a square matrix whose columns are the Z-Eigenvectors of A.

res — Residue row vector

Residue, returned as a row vector containing the residue of each eigenpair.

cnd — reciprocal of the condition numberrow vector

reciprocal of the condition number, returned as a row vector containing the reciprocal of the condition number of each eigenpair.

More About

expand all

Tips

  • The zeig function returns all Z-Eigenvalues of a real tensor for the syntax, lambda = zeig(A). Use the eeig function if all Eigenvalues including complex are interested.