Transpose of QR factorization

Hello,

It seems that I am not able to call the transpose function to a QR factorization object. In version 1.9.1:

julia> using LinearAlgebra

julia> A = rand(3,3);

julia> F = qr(A);

julia> typeof(F)
LinearAlgebra.QRCompactWY{Float64, Matrix{Float64}, Matrix{Float64}}

julia> typeof(F) <: LinearAlgebra.QRCompactWY{<:Real}
true

julia> transpose(F)
ERROR: MethodError: no method matching transpose(::LinearAlgebra.QRCompactWY{Float64, Matrix{Float64}, Matrix{Float64}})

Closest candidates are:
  transpose(::Union{BitVector, BitMatrix})
   @ LinearAlgebra /Applications/Julia-1.9.app/Contents/Resources/julia/share/julia/stdlib/v1.9/LinearAlgebra/src/bitarray.jl:238
  transpose(::Number)
   @ Base number.jl:224
  transpose(::Tridiagonal{var"#s971", V} where {var"#s971"<:Number, V<:AbstractVector{var"#s971"}})
   @ LinearAlgebra /Applications/Julia-1.9.app/Contents/Resources/julia/share/julia/stdlib/v1.9/LinearAlgebra/src/tridiag.jl:621
  ...

Stacktrace:
 [1] top-level scope
   @ REPL[6]:1

However, it seems that a transpose function for such objects exists: https://github.com/JuliaLang/julia/blob/02272f0cbda8d4c7f92583c4229659790c7c089f/stdlib/LinearAlgebra/src/qr.jl#L509

What am I missing?

Thanks in advance.

shce

It seems you’re looking at a different Julia branch. Make sure to browse the 1.9-release branch (or v1.9.1 tag):

Note that you can still use F' to find the adjoint of QR.

1 Like