JuliaLang / julia

The Julia Programming Language
https://julialang.org/
MIT License
45.46k stars 5.46k forks source link

Add methods for matrix multiplication involving Hessenberg orthogonality matrix #38472

Open RJDennis opened 3 years ago

RJDennis commented 3 years ago

Some matrix multiplications involving the Hessenberg orthogonality matrix are not currently possible, i.e., the last line in the following code-segment errors:

g =complex(randn(2,2))
h = randn(2,2)
(v,s) = hessenberg(h)
k = v*g

With g a complex matrix and v the Hessenberg orthogonality matrix, the proposal is to add methods to allow:

v*g
v'g
g*v
g*v'
stevengj commented 3 years ago

As mentioned in https://github.com/JuliaLang/julia/issues/38441#issuecomment-729084495, this involves supplementing the LAPACK calls here: https://github.com/JuliaLang/julia/blob/3365b4e903d61b628e2070e25c643cdfcf03c600/stdlib/LinearAlgebra/src/hessenberg.jl#L488-L509 with fallback replacements written in pure Julia. i.e. re-implementing the ormhr function.

We may already have most of the the necessary pieces in our QR code?