Difference between revisions of "UnitPerpendicularVector Command"
From GeoGebra Manual
Line 13: | Line 13: | ||
;UnitPerpendicularVector[ <Vector> ] | ;UnitPerpendicularVector[ <Vector> ] | ||
:Yields a perpendicular vector with length 1 of the given vector. | :Yields a perpendicular vector with length 1 of the given vector. | ||
− | :{{example|1=<div><code><nowiki>UnitPerpendicularVector[{a, b}]</nowiki></code> yields ''{<math>\frac{-b}{\sqrt{a^{2}+b^{2}}}</math>, <math>\frac{a}{\sqrt{a^{2}+b^{2}}}</math>}''.</div>}} | + | :{{example|1=<div><code><nowiki>UnitPerpendicularVector[{a, b}]</nowiki></code> yields ''{<math>\frac{-b}{\sqrt{a^{2} + b^{2}}}</math>, <math>\frac{a}{\sqrt{a^{2} + b^{2}}}</math>}''.</div>}} |
Revision as of 13:07, 6 September 2011
- UnitPerpendicularVector[ <Line>]
- Returns the perpendicular vector with length 1 of the given line.
- Example:
UnitPerpendicularVector[3x + 4y = 5]
yields \begin{pmatrix}0.6\\0.8\end{pmatrix}.
- UnitPerpendicularVector[ <Segment> ]
- Returns the perpendicular vector with length 1 of the given segment.
- UnitPerpendicularVector[ <Vector> ]
- Returns the perpendicular vector with length 1 of the given vector. The vector must be befined first.
- Example:Let v=\begin{pmatrix}3\\4\end{pmatrix}.
UnitPerpendicularVector[v]
yields \begin{pmatrix}-0.8\\0.6\end{pmatrix}.
CAS Syntax
In CAS View only one syntax is allowed:
- UnitPerpendicularVector[ <Vector> ]
- Yields a perpendicular vector with length 1 of the given vector.
- Example:
UnitPerpendicularVector[{a, b}]
yields {\frac{-b}{\sqrt{a^{2} + b^{2}}}, \frac{a}{\sqrt{a^{2} + b^{2}}}}.