Eigenvectors of a symmetric tensor and a matrix

Hi, I have a problem calculating the eigenvectors of a matrix/tensor. Maybe someone can explain why the outputs differ from each other.

using LinearAlgebra, Tensors

A = [-24.978551803697826 -51.42238499537693 0.0; -51.42238499537693 -408.35244213187974 0.0; 0.0 0.0 701.2149143452202]
B = SymmetricTensor{2,3}(A)

@show eigvecs(A)
@show eigvecs(B)

The output I get is the following:

eigvecs(A) = [0.1306710066830574 0.9914257854284588 0.0; 0.9914257854284588 -0.13067100668305742 0.0; 0.0 0.0 1.0]
eigvecs(B) = [NaN NaN NaN; NaN NaN NaN; NaN NaN NaN]

Is there some problems using eigvecs on a tensor?

This is Ferrite-FEM/Tensors.jl#166, which is fixed by Ferrite-FEM/Tensors.jl#168. This fix is available in Tensor version 1.9.0, so I guess you have an older version of Tensors.jl installed?

1 Like

That was the problem. Thank you!