Try to search on geek for geek, I am not good with matrix and math, since I'm only in 11th grade, but I was able to find a documentation that I believe that it could help you link to help you Hope you can finish you're work !! goodluck