Matrix product test