mtxm_c

 Procedure Abstract Required_Reading Keywords Brief_I/O Detailed_Input Detailed_Output Parameters Exceptions Files Particulars Examples Restrictions Literature_References Author_and_Institution Version Index_Entries

#### Procedure

```   void mtxm_c ( ConstSpiceDouble    m1  ,
ConstSpiceDouble    m2  ,
SpiceDouble         mout )

```

#### Abstract

```   Multiply the transpose of a 3x3 matrix and a 3x3 matrix.
```

```   None.
```

#### Keywords

```   MATRIX

```

#### Brief_I/O

```   VARIABLE  I/O  DESCRIPTION
--------  ---  --------------------------------------------------
m1         I   3x3 double precision matrix.
m2         I   3x3 double precision matrix.
mout       O   The produce m1 transpose times m2.
```

#### Detailed_Input

```   m1         is any 3x3 double precision matrix. Typically,
m1 will be a rotation matrix since then its
transpose is its inverse (but this is not a
requirement).

m2         is any 3x3 double precision matrix.
```

#### Detailed_Output

```   mout       is a 3x3 double precision matrix. mout is the
product

t
mout = m1  m2

mout may overwrite either m1 or m2.
```

#### Parameters

```   None.
```

#### Exceptions

```   Error free.
```

#### Files

```   None
```

#### Particulars

```   The code reflects precisely the following mathematical expression

For each value of the subscripts i and j from 0 to 2:

2
__
\
mout[i][j] =  /_  m1[k][i] * m2[k][j]
k=0

Note that the reversal of the k and i subscripts in the left-hand
matrix m1 is what makes mout the product of the TRANSPOSE of M1
and not simply of m1 itself.  Also, the intermediate results of
the operation above are buffered in a temporary matrix which is
later moved to the output matrix.  Thus mout can be actually be
m1 or m2 if desired without interfering with the computations.
```

#### Examples

```   Let m1 = | 1.  2.  3. |
|            |
| 4.  5.  6. |
|            |
| 7.  8.  9. |

m2 = |  1.   1.  0. |
|              |
| -1.   1.  0. |
|              |
|  0.   0.  1. |

then the call

mtxm_c ( m1, m2, mout );

produces the matrix

mout = | -3.   5.  7. |
|              |
| -3.   7.  8. |
|              |
| -3.   9.  9. |
```

#### Restrictions

```   The user is responsible for checking the magnitudes of the
elements of m1 and m2 so that a floating point overflow does
not occur.  (In the typical use where m1 and m2 are rotation
matrices, this not a risk at all.)
```

#### Literature_References

```   None.
```

#### Author_and_Institution

```   W.M. Owen       (JPL)
E.D  Wright     (JPL)
```

#### Version

```   -CSPICE Version 1.0.0, 16-APR-1999 (EDW)
```

#### Index_Entries

```   matrix_transpose times matrix 3x3_case
```
`Wed Apr  5 17:54:39 2017`