more autodiff paper writing -- finished matrices