Skip to content

right_null for a simple matrix #166

@Yue-Zhengyuan

Description

@Yue-Zhengyuan

MWE (using the latest main branch):

using MatrixAlgebraKit, LinearAlgebra
# a very simple rank-1 2x2 matrix
A = [1. 0.; 1. 0.]
# it has a 1D (right) nullspace, spanned by [0, 1]
N = nullspace(A)
#= output
2×1 Matrix{Float64}:
 0.0
 1.0
=#

# MAK fails to find it, with either alg = :svd or :qr
right_null(A)
#= output
0×2 Matrix{Float64}
=#

For this simple case, the behavior does not match the docstring:

Compute an orthonormal basis N = adjoint(Nᴴ) for the kernel of the matrix A, 
i.e. the nullspace of A, such that A * Nᴴ' ≈ 0 and Nᴴ * Nᴴ' ≈ I.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions