Document matrices library