# Concerting signs in a matrix

1. Feb 27, 2014

### Phong

Hi!

I have two sets of matrices where only the sign of each field might differ. I'm trying to calculate a generally applicable matrix that transforms the signs of the source matrix so it has the same signs like the target matrix. I tried calculating the inverse of the target matrix and multiply that with the source, but I'm missing a step. Maybe you guys can help!

Thanks a lot!!

Nhat

TARGET
-1.05529 -0.707107 0.707107 0
-6.18172 -0.707107 -0.707107 0
1 -1.18331 -3.09086 0
-5 5.91657 -14.1421 1

SOURCE
1.05529 -0.707107 -0.707107 0
6.18172 -0.707107 0.707107 0
-1 -1.18331 -3.09086 0
-5 -5.91657 -14.1421 1

2. Mar 1, 2014

### Fredrik

Staff Emeritus
Seems odd to use matrix multiplication for this, when you can just flip the sign of the relevant entries. (The numbers make me think that this is for a computer program. It would be easier both for you and the program to work with the components directly). If you insist on using matrix multiplication, you would have to do something like this:
$$T=(TS^{-1})S$$