Answer:
a) The main idea to solve this exercise is to use the identity [tex]\det(AB)=\det(A)\det(B)[/tex], where [tex]A[/tex] and [tex]B[/tex] are two square matrices.
Then, [tex] \det(A) = \det(PDP^{-1}) =\det(P)\det(D)\det(P^{-1})[/tex]. Now, recall that [\det(Id) = \det(P)\det(P^{-1})[/tex], where [tex]Id[/tex] stands for the identity matrix. But [tex]\det(Id)=1[/tex], thus [tex]\det(P)[/tex] and [tex]\det(P^{-1})[/tex] are reciprocal to each other.
Hence,
[tex] \det(A) =det(P)\det(D)\det(P^{-1}) = det(P)\det(P^{-1})\det(D) = \det(D).[/tex]
b) Let us write [tex]A = PD_AP^{-1}[/tex] and [tex]B = PD_BP^{-1}[/tex]. Then
[tex]AB = (PD_AP^{-1})(PD_BP^{-1}) = PD_AD_BP^{-1}[/tex]
[tex]BA = (PD_BP^{-1})(PD_AP^{-1}) = PD_BD_AP^{-1}[/tex]
But the product of two diagonal matrices is commutative, so [tex]D_AD_B = D_BD_A [/tex], from where the statement readily follows.
Step-by-step explanation: