Linear transformation in 3D graphics can be tricky, here is as “Matrix Cycle” that should help to better understand transition between spaces. The tricky part is actual numerical representation (or direction) in the transformation matrix. Some info about also here (nice notation of actual numerical matrix direction) nice online demo here

following picture is from :http://antongerdelan.net/opengl/raycasting.html

other references:

from Model to Screen: https://stackoverflow.com/questions/46008171/transform-the-modelmatrix/46008573#46008573)