I have a set of $K\gg1$ vectors, each belonging to $\mathbb{R}^N$, where $N\in\mathbb{N}, N> 2$.
My goal is to select a subset of $M < K$ vectors from this set of $K$ vectors in order to form a matrix $A\in\mathbb{R}^{N \times M}$, where the columns are the $M$ chosen vectors. The objective is to choose these $M$ vectors in a way that minimizes the condition number $\kappa(A)$ of the resulting matrix.
Are there any common numerical algorithms for this problem? An approximate solution is sufficient.
What I have now implemented as a naive iterative solver works as follows:
Iteration Rule:
Initialization:
Choose a predetermined starting vector from the given set.
Iteration Loop (Continue until M iterations are reached):
For each vector not present in the set of fixed vectors:
a. Augment the set by introducing an additional vector that has not been included previously.
b. Compute the condition number of the resultant matrix that arises from this augmentation.
Selection:
Elect the additional vector that minimizes the condition number of the overall resultant matrix.
Repeat these steps until the desired number of iterations, denoted as M, is achieved.
For small problems it will work but when $K$ gets larger I run into computational problems. So I am still looking for a more efficient way to solve this.
The 2-norm condition number of a general matrix $A \in \mathbb{R}^{m \times n}$ is given by ratio of the singular values, specifically $$\kappa(A) = \frac{\sigma_{1}}{\sigma_{k}}$$ where $k = \min\{m,n\}$ and $\sigma_k$ is the smallest singular value $k$. We shall consider the case of $m \ge n$ where the matrix $A$ is tall. If $m < n$, then the matrix is wide and the smallest singular value is automatically $0$ and the condition number is either undefined ($0/0$) or $\infty$.
The suggestion by @whpowell96 is closely related to computing a QR factorization of the matrix $X$ given by $$ X = \begin{bmatrix} x_1 & x_2 & \dotsc & x_K \end{bmatrix} \in \mathbb{R}^{N \times K} $$ Here the columns of $X$ are simply the vectors that are given in advance. Specifically, we compute a QR factorization with column pivoting such that $$X \Pi = QR $$ where $\Pi \in \mathbb{R}^{K \times K}$ is a permutation matrix, $Q \in \mathbb{R}^{N \times N}$ is an orthogonal matrix, and $R \in \mathbb{R}^{N \times K}$ is an upper triangular matrix. Moreover, the permutation matrix is constructed to ensure that the diagonal entries of $R$ form a nonincreasing sequence. This precisely ensures the greedy property that @whpowell96 is pursuing. The next vector is automatically chosen to ensure that its projection of the orthogonal complement of the vector space spanned by the previously chosen vectors is maximal. This particular variant of the QR algorithm is discussed in detail in Golub and van Loan's text book: "Matrix computations". It is primarily used as rank revealing algorithm which is why it is also known as the rank revealing QR algorithm. When the algorithm completes, then you choose the first $M$ columns of $X\Pi$. They get selected because they where as a far a possible from being linearly dependent on one another.
A MATLAB implementation of QR algorithm with column pivoting follows below along with its dependencies
The Givens rotation is computed as follows:
A minimal working example that highlights some features of the algorithms is given here: