Solving MaxSAT with Matrix Multiplication