# StridedMatrix? Hermitian and SymTridiagonal for LinAlg

**URL:** <https://discourse.julialang.org/t/stridedmatrix-hermitian-and-symtridiagonal-for-linalg/10698>\
**Category:** General Usage\
**Tags:** linearalgebra\
**Created:** [May 4, 2018, 12:50pm UTC](https://discourse.julialang.org/t/stridedmatrix-hermitian-and-symtridiagonal-for-linalg/10698 "2018-05-04T12:50:24Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Iagoba\_Apellaniz](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/iagoba_apellaniz/32/34406_2.png) [@Iagoba\_Apellaniz](https://discourse.julialang.org/u/Iagoba_Apellaniz)\
**Post date:** [May 4, 2018, 12:50pm UTC](https://discourse.julialang.org/t/stridedmatrix-hermitian-and-symtridiagonal-for-linalg/10698/1 "2018-05-04T12:50:25Z")

</div>

Julia V0.6.2

Is this a bug? Am I using these type wrappers properly?

```julia
julia> A = Hermitian(SymTridiagonal([1, 2, 3], [1im, 2im]));

julia> eigfact(A)
ERROR: MethodError: no method matching eigfact!(::Hermitian{Complex{Float64},Sym
Tridiagonal{Complex{Float64}}})
...

```

The fact is that `SymTridiagonal` is not an `StridedMatrix`, and hence there is no method for such case. The same would happen with many more types such as Diagonal, …

Maybe complex hermitian tridiagonal type should be considered and add a method for them. Or don’t allow for `SymTridiagonal` as a container for the data of the `Hermitian` type.

---

<div class="post-metadata">

**Author:** ![fredrikekre](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fredrikekre/32/1688_2.png) [@fredrikekre](https://discourse.julialang.org/u/fredrikekre)\
**Post date:** [May 4, 2018, 1:23pm UTC](https://discourse.julialang.org/t/stridedmatrix-hermitian-and-symtridiagonal-for-linalg/10698/2 "2018-05-04T13:23:05Z")

</div>

> Is this a bug? Am I using these type wrappers properly?

This is not really a problem with the `Hermitian` wrapper, there are no specialized `eig*` version for complex `SymTridiagonal`, at least not that is wrapped by julia.

---

<div class="post-metadata">

**Author:** ![Ralph\_Smith](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ralph_smith/32/10344_2.png) [@Ralph\_Smith](https://discourse.julialang.org/u/Ralph_Smith)\
**Post date:** [May 4, 2018, 2:26pm UTC](https://discourse.julialang.org/t/stridedmatrix-hermitian-and-symtridiagonal-for-linalg/10698/3 "2018-05-04T14:26:52Z")

</div>

There is a diagonal similarity transformation which reduces a Hermitian tridiagonal to a real symmetric tridiagonal. IINM this constructs it:

```julia
function simx(A)
  d=diag(A,1)
  Diagonal(vcat([one(eltype(A))+0im],cumprod(d.*(1./(abs.(d))))))
end

```

Perhaps this could be used to build the requested methods.
