Tait-Bryan to Rotation matrix to translating from global to local space Re-writing my entire question to be more math-oriented and hopefully make more sense.
I have two objects, each at a position defined by P1 and P2 (XYZ).
Each has a heading based on yaw/pitch/roll, which is converted into a 3x3 matrix based.
I need to find the position object2 in object1's local space, so I can determine which quadrant would be hit if object2 fired a weapon at object1.  Quadrants are Front/Back/Left/Right/Up/Down.
The 3x3 matrix is (re)created every second, based on the object's yaw/pitch/roll as follows: (Y/P/R is converted to rads for this)
cy / sy is cos/sin yaw (heading) 
cp / sp is cos/sin pitch (elevation)
cr / sr is cos/sin roll (bank)
m[0][0] = cy*cp;
m[0][1] = -sy;
m[0][2] = cy*sp;

m[1][0] = (sr*sp) + (cr*cp*sy);
m[1][1] = cr*cy;
m[1][2] = (cr*sy*sp) - (cp*sr);

m[2][0] = (cp*sr*sy) - (cr *sp);
m[2][1] = cy*sr;
m[2][2] = (cr*cp) + (sr*sy*sp);

Currently the way I do this, is to to create a unit-vector of p2-p1 (v) and do
x = v.x * m[0][0] + v.y * m[0][1] + v.z * m[0][2] 
y = v.x * m[1][0] + v.y * m[1][1] + v.z * m[1][2]
z = v.x * m[2][0] + v.y * m[2][1] + v.z * m[2][2]

Which I -thought- would give me object2's location in object1's local space, and where X is front/back, Y is left/right, and Z is up/down.
To give an example of what's not working: (Note Y/P/R is given in degrees here, but converted to rads before being used)
Obj1 XYZ: -9325.965857 221.666575 -45.093922, yaw 155.137, pitch 314.869 roll 0
Obj2 XYZ: -9325.967846 221.667497 -45.096124, yaw 0, pitch 0, roll 0
Obj1 3x3: 
F/B: -0.640103       0.420449               0.643033
L/R: -0.296622       -0.907316               0.29798
U/D: 0.70872         -0                      0.70549
x: 0.079, y: -0.290, z: -0.954

Object1 /should/ be pointing directly at Object2, but according to our matrix and such, it's not. It's showing that it's mostly below object1.
Should be noted that this is for a text-based space simulation (Star trek!) with 6 degrees of freedom, and that I am not the original author, just trying to fix an old bug.
If there is a better way to do this, please, enlighten me. I'm kind of lost with the math here.
 A: There are two particularly useful $3\times 3$ matrices you can use for simulating
a ship with six degrees of freedom (like your spaceships).
One matrix converts coordinates of any object relative to the ship (distance "up", "down", "left", "right", "ahead", "behind" the ship as viewed from the ship itself) to the world
coordinates of that object (the $(x,y,z)$ with which you record the ship's location).
The other matrix converts world coordinates into ship coordinates.
You seem to have one of these two matrices. 
I'm not sure exactly how you're interpreting it,
so I don't know if it's the ship-to-world-coordinates matrix 
or the world-to-ship-coordinates matrix.
But each matrix is the transpose of the other, so you can easily obtain the matrix
you want, which is the one that converts world coordinates to ship coordinates.
If ship number 1 is at $(x_1, y_1, z_1)$ and ship number 2 is at $(x_2, y_2, z_2),$
in order to figure out which "quadrant" of ship number 1 is facing ship number 2
(that is, where ship number 1 is likely to be hit),
find the matrix that converts world coordinates to the ship coordinates of ship number 1.
Use that matrix to convert the vector $(x_2 - x_1, y_2 - y_1, z_2 - z_1)$
to a new vector, $(x', y', z').$
Now $(x', y', z')$ is the position of ship number 2
in the "ship coordinates" of ship number 1.
I'll assume the $x$-axis in ship coordinates points straight ahead, the $y$-axis points
to the right, and the $z$-axis points down.
Then the quadrant of ship number 1 facing ship number 2 is a "forward" quadrant
if and only if $x' > 0;$
it is a "right" quadrant if and only if $y' > 0;$
and it is a "top" quadrant if and only if $z' < 0.$
If you orient the axes of the ship differently in your model, then
you may need to shuffle these equations around and possibly reverse some inequalities
in order to correspond the correct end of the correct axis with each of those
three directions relative to the ship.
You don't need to compute any "arcs" or angles. Just a single vector.
