matrix problem solver with equation