Matrix hw0 task 4