DistanceFromColumnSpace
Computes the distance between a vector and the column space of a matrix.
Syntax

DistanceFromColumnSpace(A, v)

A
is a matrix 
v
is a vector

Description
If A
is a matrix of size n
×m
and v
a vector of dimension n
, then DistanceFromColumnSpace(A, v)
returns the distance between v
and the column space of A
.
Examples
A ≔ ❨❨2, 2, −5, 0, −1❩, ❨1, 5, −2, 1, 5❩, ❨0, 1, 3, 2, 6❩, ❨−2, 1, 4, 6, 9❩, ❨3, −2, 7, −2, 6❩❩
⎛ 2 2 −5 0 −1⎞ ⎜ 1 5 −2 1 5⎟ ⎜ 0 1 3 2 6⎟ ⎜−2 1 4 6 9⎟ ⎝ 3 −2 7 −2 6⎠
DistanceFromColumnSpace(A, ❨1, 2, 1, 0, 1❩)
0.32423183275