Fix singularity check in MatrixMath.cpp

Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
More work on phase envelope, can pass max pressure, dying at critical point.  Almost there... Summing Ki*zi rather than yi-xi was the important change

Signed-off-by: Ian Bell <ian.h.bell@gmail.com>