Equation matrix working