matrices

how do matrix work in opengl

Simply. See the OpenGl specification or concretize your question.