Been given the matrix A=[k,k,0;k^2,2,k;0,k,k] ; indicates an new row

Need to find: a) the determinant of A using cofactor expansion, and

b) the values of k for which A is invertible...

a)

detA=kdet[2,k;k,k]-kdet[k^2,k;0,k]-0det[k^2,2;0,k]

detA=k(2k-k^2)-k(K^3-0)-0

detA=-k^4-k^3+2k^2

b)

0=-k^4-k^3+2k^2

k= -2,1,0(repeated)

Therefore A is invertable where DetA doesn't = zero, which is for values of k>1, 0<k<1, -2<k<0, and k<-2