Added the matrix form with D and b computed with submatrix