A former Ph.D. student of my supervisor(s) in grad school designed his linear algebra code in such a way that he was able to separate it out and create a business from it. I've seen the rest of the code and it's a bit of a tangled C++ code, but the linear algebra classes were really well designed.