I am teaching a class about the SVD (Singular Value Decomposition) of a matrix this week. I was inspired by a nice article of Carla Martin and Mason Porter, "The extraordinary SVD", to compute the SVD of the voting record of the 112th Congress (House of Representatives) to show to my class.
If you're interested in how this is done, here is the Sage code I used as a Sage worksheet.
Here is the projection onto the first two singular vectors:
If you're interested in how this is done, here is the Sage code I used as a Sage worksheet.
Here is the projection onto the first two singular vectors:
