If v \in span{v1,...,vn} then Ax = v has a solution, where A = [v1 v2 ...
vn].
An easy way to check it would bex = A\v norm(A*x - v) \approx 0.0 That's not the cheapest way, but it's short. Abel Soares Siqueira 2016-10-05 13:00 GMT-03:00 James Noeckel <[email protected]>: > You could iteratively orthogonalize v1 through vn, setting an orthogonal > distance threshold for when to consider a new vector to be in the span of > the previous vectors. > > On Wednesday, October 5, 2016 at 5:25:26 AM UTC-4, harven wrote: > >> Is there a way to check if a vector v is in the linear span of a given >> family of vectors v1,...vn? >> I don't think I saw such a function in the base library but I may have >> missed it. >> >> I can use something like >> >> rank([v;v1...vn]) == rank([v1...vn]) >> >> but that looks inefficient. >> >> Also is there any facility to compute with matrices with integer/rational >> coefficients? >> It seems that the standard library focuses on floats. >> >
