When you create your matrix(ces), keep track of the x and z size as well as the tile size in an array or variables.
You can reference the matrix position with the MATRIX POSITION X() Y, and Z commands. Once you have the position, you use your x and z size to determine the offset. Once you have the offsets in the x and z directions in relation to the size, you can determine the bounds of the matrix in wrold space. If your character moves beyond those bounds, they are off of the matrix.
For example, if you created a 1000x1000 25x25 tile matrix, you know that minX=0 maxX=1000 and minZ=0 maxZ=1000. If you changed the position of the matrix and then you use MATRIX POSITION X(matrix number) and you get back 500, you know the x direction is offset by 500 units so minX=500 and maxX becomes 1500. If your character's x position was beyond those boundaries, they would be off of the matrix. If they are within those boundaries, they are on the matrix.
Enjoy your day.