Generate a 3x3 orthogonal matrix using the Gram-Schmidt algorithm.

1 | ```
GramSchmidt(v1, v2, v3, order = 1:3)
``` |

`v1, v2, v3` |
Three length 3 vectors (taken as row vectors). |

`order` |
The precedence order for the vectors; see Details. |

This function orthogonalizes the matrix `rbind(v1, v2, v3)`

using the Gram-Schmidt algorithm. It can handle rank 2 matrices
(returning a rank 3 matrix). If the original is rank 1, it is likely
to fail.

The `order`

vector determines the precedence of the original
vectors. For example, if it is `c(i, j, k)`

, then row `i`

will be unchanged (other than normalization); row `j`

will
normally be transformed within the span of rows `i`

and `j`

.
Row `k`

will be transformed orthogonally to the span of
the others.

A 3x3 matrix whose rows are the orthogonalization of the original row vectors.

Duncan Murdoch

1 2 3 4 5 6 7 |

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.