added answers for week 3 for matrix