null_space(A, rcond=None)
Input array
Relative condition number. Singular values s
smaller than rcond * max(s)
are considered zero. Default: floating point eps * max(M,N).
Orthonormal basis for the null space of A. K = dimension of effective null space, as determined by rcond
Construct an orthonormal basis for the null space of A using SVD
orth
Matrix range
svd
Singular value decomposition of a matrix
1-D null space:
>>> from scipy.linalg import null_space
... A = np.array([[1, 1], [1, 1]])
... ns = null_space(A)
... ns * np.sign(ns[0,0]) # Remove the sign ambiguity of the vector array([[ 0.70710678], [-0.70710678]])
2-D null space:
>>> from numpy.random import default_rng
... rng = default_rng()
... B = rng.random((3, 5))
... Z = null_space(B)
... Z.shape (5, 2)
>>> np.allclose(B.dot(Z), 0) True
The basis vectors are orthonormal (up to rounding error):
>>> Z.T.dot(Z) array([[ 1.00000000e+00, 6.92087741e-17], [ 6.92087741e-17, 1.00000000e+00]])See :
The following pages refer to to this document either explicitly or contain code examples using this.
scipy.linalg._decomp_svd.null_space
scipy.linalg._decomp_svd.orth
Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.
Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)
SVG is more flexible but power hungry; and does not scale well to 50 + nodes.
All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them