Determinant of matrix A \[\begin{bmatrix} a &b \\ c &d \\ \end{bmatrix}\] is giben by det(A)=ad-bc
Some properties of iota \[ i^3=-i\]
\[ i^4=-1\]
\[i^2=-1\]
\[\begin{vmatrix} (1+i)^2 &b \\d &(1+i+i^2) \\ \end{vmatrix}=(1+i)^2(1+i+i^2)-bd\]=(1+i^2+2i)(1+i-i)-bd=2i(1)-bd\]
Matrix Y can be written as \[ \begin{vmatrix}a & i^4-5 \\d &i^{2019}-5i \\ \end{vmatrix}\]
Using the properties of iota \[ i^{2019}=i^{2016}i^3=-i\]
hence matrix Y can be further simplified as =\[ a(-i-5i)-di^4+5d\]