Difference between revisions of "UnitPerpendicularVector Command"
From GeoGebra Manual
m (Text replace - "<div class="box info"> 48px|left This page is part of the official manual for print and pdf. For structural reasons normal users can't edit this page. If you found any errors on this page please contact ) |
|||
Line 6: | Line 6: | ||
;UnitPerpendicularVector[ <Segment> ] | ;UnitPerpendicularVector[ <Segment> ] | ||
:Returns the perpendicular vector with length 1 of the given segment. | :Returns the perpendicular vector with length 1 of the given segment. | ||
+ | :{{example|1=<div>Let <code><nowiki>s = Segment[(1,1), (4,5)]</nowiki></code>.<div><code><nowiki>UnitPerpendicularVector[s]</nowiki></code> yields ''<math>\begin{pmatrix}-0.8\\0.6\end{pmatrix}</math>''.</div></div>}} | ||
;UnitPerpendicularVector[ <Vector> ] | ;UnitPerpendicularVector[ <Vector> ] | ||
− | :Returns the perpendicular vector with length 1 of the given vector. The vector must be | + | :Returns the perpendicular vector with length 1 of the given vector. The vector must be defined first. |
:{{example|1=<div>Let v=<math>\begin{pmatrix}3\\4\end{pmatrix}</math>. <code><nowiki>UnitPerpendicularVector[v]</nowiki></code> yields ''<math>\begin{pmatrix}-0.8\\0.6\end{pmatrix}</math>''.</div>}} | :{{example|1=<div>Let v=<math>\begin{pmatrix}3\\4\end{pmatrix}</math>. <code><nowiki>UnitPerpendicularVector[v]</nowiki></code> yields ''<math>\begin{pmatrix}-0.8\\0.6\end{pmatrix}</math>''.</div>}} | ||
==CAS Syntax== | ==CAS Syntax== | ||
;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 | + | :{{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 09:30, 21 May 2013
- 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.
- Example:Let
s = Segment[(1,1), (4,5)]
.UnitPerpendicularVector[s]
yields \begin{pmatrix}-0.8\\0.6\end{pmatrix}.
- UnitPerpendicularVector[ <Vector> ]
- Returns the perpendicular vector with length 1 of the given vector. The vector must be defined first.
- Example:Let v=\begin{pmatrix}3\\4\end{pmatrix}.
UnitPerpendicularVector[v]
yields \begin{pmatrix}-0.8\\0.6\end{pmatrix}.
CAS Syntax
- 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}}}).