I have a 3×3 matrix, E, and I’m trying to solve this optimization problem:
|| E * t || = minimum
where t is the solution I’m looking for and it MUST be a unit vector (represented as a 3×1 matrix). || x || denotes the euclidean distance of x.
Is there a library that can help me solve this problem? I’ve found a couple of solve functions in various libraries, but I can’t seem to find one that’ll let me put on the additional constraint that t must be a unit vector. Can I solve this programmatically without a library then?
Looks like an eigenvector-type problem to me — your
minimumshould be the smallest absolute value among the eigenvalues ofE.Do a singular value decomposition (SVD) of the matrix E (this operation should be available as part of any good linear algebra library). This will give you a factorization of E as:
where
diagis a diagonal matrix with nonnegative diagonal values, andUandVare orthonormal.Find the smallest diagonal element of
diag; the corresponding row ofV*(or column ofV) is your solution fort.This value for
twill be a unit vector becauseVis orthonormal, and the resulting vectorE twill be smallest becauseUandVpreserve vector length.