In matrix multiplication we have to take the last element because it comes out to be c1f(i-1) + c2f(i-2) and so on…