document matrix diffs