# How to "flip" and change the sign of one particular row of this matrix?

I would like to transform the following matrix : $\mathbf A$ =$\ \begin{bmatrix} a&b\\ c&d\\ e&f\\ g&h \end{bmatrix}\$ into this one : $\mathbf B$ = $\ \begin{bmatrix} g&-h\\ e&-f\\ c&-d\\ a&-b \end{bmatrix}\$.

I can easily transform each column separately by doing these operations :

$\left\{ \begin{array}{rcl} \begin{bmatrix} 0&0&0&1\\ 0&0&1&0\\ 0&1&0&0\\ 1&0&0&0 \end{bmatrix} \ \begin{bmatrix} a\\ c\\ e\\ g \end{bmatrix} = \begin{bmatrix} g\\ e\\ c\\ a \end{bmatrix}\\ \begin{bmatrix} 0&0&0&-1\\ 0&0&-1&0\\ 0&-1&0&0\\ -1&0&0&0 \end{bmatrix} \ \begin{bmatrix} b\\ d\\ f\\ h \end{bmatrix} = \begin{bmatrix} -h\\ -f\\ -d\\ -b \end{bmatrix} \end{array} \right.$

But doing this wont provide with the matrix $\mathbf B$. Sure I can concatenate the two matrices after doing two separate operations. But I would like to do this in only one operation...

Does anyone know how to do this?

• Is finding matrices $X,Y$ such that $XAY=B$ good enough for you? Commented Feb 16, 2013 at 23:36
• Well, in fact it would be good enough... I just did not think about that... Anyways, I tried the answer proposed by Jonathan, but it wasn't enough... any clues? Commented Feb 16, 2013 at 23:39
• Jonathan updated his answer. It works as it is now. Commented Feb 16, 2013 at 23:40
• You're right, I didn't see it in time... Commented Feb 16, 2013 at 23:42
• Please consider accepting the answer if you feel like it's good enough for you and you don't want any other answer. Commented Feb 16, 2013 at 23:43

Multiply on the right by $$\begin{pmatrix}1&0\\0&-1\end{pmatrix}$$ and on the left by $$\begin{pmatrix}0&0&0&1\\0&0&1&0\\0&1&0&0\\1&0&0&0\end{pmatrix}.$$