These two scenarios help us appreciate that a Camera matrix is the exact opposite of the Model-View matrix. In linear algebra, this property is known as the inverse of a matrix.
The inverse of a matrix is such that when multiplying it by the original matrix, we obtain the Identity matrix. In other words, if M is the Model-View matrix and C is the Camera matrix, we get the following:
We can create the Camera matrix using glMatrix by writing something like the following:
const cameraMatrix = mat4.create();
mat4.invert(cameraMatrix, modelViewMatrix);