Everything is done 3D, even things that seem to be 2D transformations they are done in 3D. There is no point in writing a matrix library/interface, since there are so many well written and free to use ones out there. Also, unless you know exactly what you are doing, chances are you are gonna end up with half assed matrix class that works not even half as well as other matrix operation classes out there.
Same goes for vector, quaternion and other misc maths functionality. OpenGL already provides a standardazied method for performing 2D rendering in a 3D scene.