finished matrix math for poly fit, inverse is tranposed for some reason, must fix