Title: Invariant Subspaces Of Matrices With Applications