Rotating Matrix by $180$ degrees through another matrix To rotate a $2\times2$ matrix by $180$ degrees around the center point, I have the following formula:
$PAP$ = Rotated Matrix, where
$$P =\begin{bmatrix}
0 & 1\\ 
1 & 0
\end{bmatrix}$$
$$A= \begin{bmatrix}
a & b\\ 
c & d
\end{bmatrix}$$
And the resulting matrix will equal
\begin{bmatrix}
d & c\\ 
b & a
\end{bmatrix}
I need to have this in the form of:
$AP$ = Rotated matrix.
How would I get it to this form?

There is no such $2 \times 2$ matrix $P$ which will do what you want for a general $A$.  This is because you need to rearrange both the rows and columns and so need a matrix action on the left and on the right.  To see this explicitly, define $$P = \left[\begin{array}{cc} p_1 & p_2 \\ p_3 & p_4 \end{array} \right] $$
Compute $AP$ and notice there is never an $a$ term which appears on the bottom row.
Edit for the case where $a,b,c,d$ are fixed variables and we can write $P$ in terms of them:
If $A$ is invertible, $$P = A^{-1}B$$ where $B$ is the rotated form of $A$.  If you don't care about singular matrices (since most matrices are non-singular), then just use this.  Otherwise expand out $AP$ as I mentioned before and find values for $P$ which will make it work, if possible.
