computing with matrix factorizations of different lengths