Difference between revisions of "UnitPerpendicularVector Command"

From GeoGebra Manual
Jump to: navigation, search
m (command syntax: changed [ ] into ( ))
 
(19 intermediate revisions by 9 users not shown)
Line 1: Line 1:
<noinclude>{{Manual Page|version=4.0}}[[Category:Manual (official)|{{PAGENAME}}]]</noinclude>
+
<noinclude>{{Manual Page|version=5.0}}</noinclude>{{command|cas=true|vector-matrix}}
{{command|vector-matrix}}
+
;UnitPerpendicularVector( <Line>)
; UnitPerpendicularVector[Line]: Returns the perpendicular vector with length 1 of the given 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>''.}}
+
:{{example|1=<div><code><nowiki>UnitPerpendicularVector(3x + 4y = 5)</nowiki></code> yields ''<math>\begin{pmatrix}0.6\\0.8\end{pmatrix}</math>''.</div>}}
; UnitPerpendicularVector[Segment]: Returns the perpendicular vector with length 1 of the given segment.  
+
;UnitPerpendicularVector( <Segment> )
; UnitPerpendicularVector[Vector]: Returns the perpendicular vector with length 1 of the given vector. The vector must be befined first.  
+
:Returns the perpendicular vector with length 1 of the given segment.  
: {{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>''.}}
+
:{{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> )
 +
: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>}}
 +
{{note|In the [[File:Menu view cas.svg|link=|16px]] [[CAS View]] vectors with undefined variables are also valid input.
 +
:{{example|<div><code><nowiki>UnitPerpendicularVector((a, b))</nowiki></code> yields ''(<math>\frac{-b}{\sqrt{a^{2} + b^{2}&#125;}</math>,<math>\frac{a}{\sqrt{a^{2} + b^{2}&#125;}</math>)''.</div>}}
 +
}}
  
 
==CAS Syntax==
 
==CAS Syntax==
In [[CAS View]] only one syntax is allowed:
+
;UnitPerpendicularVector( <Plane> )
; UnitPerpendicularVector[Vector]: Yields a perpendicular vector with length 1 of the given vector.
+
:Creates a unit vector orthogonal to the plane.
: {{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}''.}}
+
{{note| 1=<div>See also [[PerpendicularVector Command]].</div>}}

Latest revision as of 17:46, 29 September 2017


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}.
Note: In the Menu view cas.svg CAS View vectors with undefined variables are also valid input.
Example:
UnitPerpendicularVector((a, b)) yields (\frac{-b}{\sqrt{a^{2} + b^{2}}},\frac{a}{\sqrt{a^{2} + b^{2}}}).

CAS Syntax

UnitPerpendicularVector( <Plane> )
Creates a unit vector orthogonal to the plane.
© 2024 International GeoGebra Institute