mxmt_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 mxmt_c ( ConstSpiceDouble    m1  ,
ConstSpiceDouble    m2  ,
SpiceDouble         mout )

```

#### Abstract

```    Multiply a 3x3 matrix and the transpose of another 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 product m1 times m2 transpose .
```

#### Detailed_Input

```   m1         is an arbitrary 3x3 double precision matrix.

m2         is an arbitrary 3x3 double precision matrix.
Typically, m2 will be a rotation matrix since
then its transpose is its inverse (but this is
NOT a requirement).
```

#### 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[i][k] * m2[j][k]
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 = |  0.0  1.0  0.0 |
|                |
| -1.0  0.0  0.0 |
|                |
|  0.0  0.0  1.0 |

m2 = |  0.0  1.0  0.0 |
|                |
| -1.0  0.0  0.0 |
|                |
|  0.0  0.0  1.0 |

then the call

mxmt_c ( m1, m2, mout );

produces the matrix

mout = | 1.0  0.0  0.0 |
|               |
| 0.0  1.0  0.0 |
|               |
| 0.0  0.0  1.0 |
```

#### 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 times matrix_transpose 3x3_case
```
`Wed Apr  5 17:54:39 2017`