Modify camera matrix so that it renders a "chunk" of the frustum Given a perspective projection matrix. How can one from it derive a set of matrices representing "chunks" of the viewport? So that the rendered chunks can be "stiched" 
to form an image "chunk times higher" resolution than the viewport. 

Here's an image (drawn in ms paint, ik) describing what a chunk of the frustum would look like: 


I'm planning on using this for a camera mod library to take images in "super-resolution", in reality the chunks should overlap a little, to allow for exposure compensation and the blending of effects like lens flare. Most linear algebra in this project is done with a header-only library called linalg , so it'd be nice if any examples shown used that library. Thanks!
It depends a little how you construct the matrix. I assume that you use the function perspective_matrix from your library, which actually works pretty much like good old gluPerspective). But what this actually does is nothing else than use the more general function frustum_matrix, which in turn creates a common arbitrary view frustum matrix, like good old glFrustum did (from the (simplified) linalg source code):

mat4 perspective_matrix(T fovy, T aspect, T n, T f)
{
    T y = n*std::tan(fovy / 2), x = y*aspect;
    return frustum_matrix(-x, x, -y, y, n, f);
}


And this general frustum matrix function is actually all you need for creating arbitrary assymmetrical frustum matrices, like the ones you want. The paramters it takes are exactly the left, right, bottom, and top boundaries of the near plane, i.e. the x and y boundaries of the frustum on the z = near (or -near) plane. So all you actually need to do is take these left/right/bottom/top parameters and cut those ranges into whatever sub-intervals you need.

It depends a little on what information you actually have. If you have the parameters you construct your perspective matrix from (i.e. the fovY and the aspect) you can just replace the above procedure with something more elaborate that computes the frustum parameters from these two and then scale-biases them into the corresponding intervals.

If all you have is an already constructed perspective matrix, you might have to retrieve the parameters from that matrix first, which shouldn't be too difficult when looking at how the matrix is constructed. If you already have a general assymmetric frustum matrix, it might get a little more elaborate. But it always really all just comes down to tweaking the $M_{11}, M_{13}, M_{22}, M_{23}$ elements of the matrix a little with some scaling and offseting that I'm sure you can figure out when looking at how these matrices are constructed. The rest can stay as they are (provided you don't need chunking in the z-direction either, which would be used for different techniques than what you are trying to do).