Skip to content

qr factorisation method for nullspace #855

Open
@gszep

Description

@gszep

I've opened this feature request based off the back of a thread on slack with @andreasnoack . Since QR is not as reliable as SVD in determining the rank, we could have an additional kwarg where the user provides an expected dimension of the nullspace. Roughly

function nullspace(A::AbstractMatrix; nullity::Int=0, kwargs...)

    if iszero(nullity) # default to SVD
        return nullspace(A;kwargs...)
   
    else 
        return qr(A').Q[:,end+1-nullity:end]
    end
end

A small test

A = randn(3)randn(3)'
nullity = 2 # expected nullity

A*nullspace(A)
A*qr(A').Q[:,end+1-nullity:end]

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureIndicates new feature / enhancement requests

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions