Answer:
[tex]k=-2[/tex]
Step-by-step explanation:
Given matrix
[tex]A=\left[\begin{array}{ccc}4&2\\-1&2\end{array}\right][/tex]
And
[tex]B=\left[\begin{array}{ccc}2&4\\-2&k\end{array}\right][/tex]
We need to find the value of [tex]k[/tex], that will make [tex]AB=BA[/tex].
Let us find [tex]AB[/tex]
[tex]AB=\left[\begin{array}{ccc}4&2\\-1&2\end{array}\right]\times \left[\begin{array}{ccc}2&4\\-2&k\end{array}\right][/tex]
[tex]AB=\left[\begin{array}{ccc}4&16+2k\\-6&-4+2k\end{array}\right][/tex]
Now, let us find [tex]BA[/tex]
[tex]BA=\left[\begin{array}{ccc}2&4\\-2&k\end{array}\right]\times \left[\begin{array}{ccc}4&2\\-1&2\end{array}\right][/tex]
[tex]BA=\left[\begin{array}{ccc}4&12\\-8-k&-4+2k\end{array}\right][/tex]
Put [tex]AB=BA[/tex]
[tex]\left[\begin{array}{ccc}4&16+2k\\-6&-4+2k\end{array}\right]=\left[\begin{array}{ccc}4&12\\-8-k&-4+2k\end{array}\right][/tex]
In order to make [tex]AB=BA[/tex], the [tex]16+2k=12\ and\ -6=-8-k[/tex] should be equal. As other two values are equal that are [tex]4\ and -4+2k[/tex]
By solving each equation
[tex]16+2k=12\\2k=-4\\k=-2[/tex]
And
[tex]-6=-8-k\\-k=-6+8\\k=-2[/tex]
We can see if the value [tex]k=-2[/tex] then [tex]AB=BA[/tex]