Fully generic Matrix 2 thanks to some type casting blasphemy