This question asked about test the collinearity of 3 points in 3D space, and the answer suggested a cross product of the pair of vectors connecting them. I am basically wondering how can one extend this solution to a set of N points?
The naive solution is to test points pairwise. However, computationally this seems slow. I feel like there must be a way to do this leveraging linear (in)dependence in an Nx3 matrix composed of the points. I also think there may be a solution using a covariance matrix of the data. However, I am stumped.
Ideally, I don't just want to test for collinearity, but rather find a metric that defines how close to collinear the points are (sort of an extension to this question). My purpose is to find if there exists 3 non-collinear points in a set of N 3D points. Is there an algorithm that can do this?
If it helps, my use case is that I am determining a 3D affine transformation between point sets, and to recover the rotation I need my data to span the entire 3D space. I would like to test the points first before undertaking the transformation estimation.