To be clear about what -fsl_matvec does, if the input matrix is
a b c d
e f g h
i j l m
0 0 0 1
Then the matrix is converted to
a b -c -d
e f -g -h
-i -j l m
0 0 0 1
before begin used on the dataset in 3dWarp (which operates in RAI coordinates). That is, the first two rows (x,y) are negated, then the first two columns are negated (leaving the upper-left and lower-right 2x2 corners with no net change).
Call the matrix that negates the first 2 rows N -- this is the matrix that converts LPI coordinates to RAI coordinates. So if v_LPI is a vector expressed in LPI coordinates, then v_RAI = N v_LPI. N is the 4x4 matrix below:
-1 0 0 0
0 -1 0 0
0 0 1 0
0 0 0 1
Of course, this matrix is self-inverse (idempotent for those who like fancy words).
If the spatial transformation matrix from FSL is A_FSL, then the warped vector is w_LPI = A_FSL v_LPI. OK so far? Then by this construction,
w_RAI = N w_LPI = N A_FSL v_LPI = N A_FSL N v_RAI
So it makes sense to say A_RAI = N A_FSL N -- which is the construction described at the top of this post.