Seol mar théacs é seo: Factorization of matrix and operator functions