Difference between revisions of "UnitPerpendicularVector Command"

From GeoGebra Manual
Jump to: navigation, search
(added v.4)
Line 2: Line 2:
 
{{command|vector-matrix}}
 
{{command|vector-matrix}}
 
; UnitPerpendicularVector[Line]: Returns the perpendicular vector with length 1 of the given line.  
 
; UnitPerpendicularVector[Line]: Returns the perpendicular vector with length 1 of the given line.  
 +
: {{Example|1=<code>UnitPerpendicularVector[3x + 4y = 5]</code> returns ''<math>\begin{pmatrix}0.6\\0.8\end{pmatrix}</math>''.}}
 
; UnitPerpendicularVector[Segment]: Returns the perpendicular vector with length 1 of the given segment.  
 
; 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.
+
; UnitPerpendicularVector[Vector]: Returns the perpendicular vector with length 1 of the given vector. The vector must be befined first.
 +
: {{Example|1=Let ''v=<math>\begin{pmatrix}3\\4\end{pmatrix}</math>. <code>UnitPerpendicularVector[v]</code> returns ''<math>\begin{pmatrix}-0.8\\0.6\end{pmatrix}</math>''.}}
 +
 
 +
==CAS Syntax==
 +
In [[CAS View]] only one syntax is allowed:
 +
; UnitPerpendicularVector[Vector]: Yields a perpendicular vector with length 1 of the given vector.
 +
: {{Example|1=<code>UnitPerpendicularVector[{a,b}]</code> returns ''{<math>\frac{-b}{\sqrt{a²+b²&#125;}</math>,<math>\frac{a}{\sqrt{a²+b²&#125;}</math>}''.}}
 +
: {{Example|1=&nbsp;<code>UnitPerpendicularVector[{2, 4, 4}]</code> returns ''{- 2/3, 1/3, 0}''.}}

Revision as of 10:13, 23 August 2011


UnitPerpendicularVector[Line]
Returns the perpendicular vector with length 1 of the given line.
Example: UnitPerpendicularVector[3x + 4y = 5] returns \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] returns \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}] returns {\frac{-b}{\sqrt{a²+b²}},\frac{a}{\sqrt{a²+b²}}}.
Example:  UnitPerpendicularVector[{2, 4, 4}] returns {- 2/3, 1/3, 0}.
© 2024 International GeoGebra Institute