How to escape the matrix and how matrix works