Difference between revisions of "Points and Vectors"

From GeoGebra Manual
Jump to: navigation, search
(Nicer formatting for ί, examples and code)
Line 8: Line 8:
 
{{example|1=<br/>
 
{{example|1=<br/>
 
* To enter a point P or a vector v in Cartesian coordinates you may use <code><nowiki>P = (1, 0) or v = (0, 5)</nowiki></code>.
 
* To enter a point P or a vector v in Cartesian coordinates you may use <code><nowiki>P = (1, 0) or v = (0, 5)</nowiki></code>.
* In order to use polar coordinates type in <code><nowiki>P = (1; 0°) or v = (5; 90°)</nowiki></code>.
+
* In order to use polar coordinates type in <code><nowiki>P = (1; 0°)</nowiki></code> or <code><nowiki>v = (5; 90°)</nowiki></code>.
 
}}
 
}}
 
{{note|You need to use a semicolon to separate polar coordinates. If you don’t type the degree symbol, GeoGebra will treat the angle as if entered in radians.}}
 
{{note|You need to use a semicolon to separate polar coordinates. If you don’t type the degree symbol, GeoGebra will treat the angle as if entered in radians.}}
Line 17: Line 17:
 
{{example|1=<br/>
 
{{example|1=<br/>
 
* You can create the midpoint M of two points A and B by entering <code><nowiki>M = (A + B) / 2</nowiki></code> into the Input Bar.
 
* You can create the midpoint M of two points A and B by entering <code><nowiki>M = (A + B) / 2</nowiki></code> into the Input Bar.
* You may calculate the length of a vector v using <code><nowiki>length = sqrt(v * v)</nowiki></code>
+
* You may calculate the length of a vector ''v'' using <code><nowiki>length = sqrt(v * v)</nowiki></code>
* If ''A = (a,b)'', then A+1 returns ''(a+1,b+1)''. If ''A'' is a [[Complex Numbers|complex number]] ''a+bi'', then ''A+1'' returns ''a+1+bi''.
+
* If ''A = (a, b)'', then <code><nowiki>A + 1</nowiki></code> returns ''(a + 1, b + 1)''. If ''A'' is a [[Complex Numbers|complex number]] ''a+'', then <code><nowiki>A+1</nowiki></code> returns ''a + 1 + ''.
 
}}
 
}}
 
==Vector Product==
 
==Vector Product==
For two points or vectors (a,b)⊗(c,d) returns the z-coordinate of vector product (a,b,0)⊗(c,d,0) as single number. Similar syntax is valid for lists, but the result in such case is a list &ndash; e.g. {1,2}⊗{4,5} returns {0,0,-3}. Usual vector product works with lists: {1,2,3}⊗{4,5,6} returns {3,6,-3}.
+
For two points or vectors <code><nowiki>(a, b) ⊗ (c, d)</nowiki></code> returns the z-coordinate of vector product ''(a, b, 0) ⊗ (c, d, 0)'' as single number. Similar syntax is valid for lists, but the result in such case is a list.
 +
{{example|1=<br/>
 +
* <code><nowiki>{1, 2} ⊗ {4, 5}</nowiki></code> returns ''{0, 0, -3}''
 +
* <code><nowiki>{1, 2, 3} ⊗ {4, 5, 6}</nowiki></code> returns ''{3, 6, -3}''.}}

Revision as of 11:57, 14 September 2011



Points and vectors may be entered via Input Bar in Cartesian or polar coordinates (see Numbers and Angles). Points can also be created using Tool New Point.gif Point tools, Tool Vector from Point.gif Vector from Point Tool, Tool Vector between Two Points.gif Vector between Two Points Tool and a variety of commands.

Note: Upper case labels denote points, whereas lower case labels refer to vectors. This convention is not mandatory.
Example:
  • To enter a point P or a vector v in Cartesian coordinates you may use P = (1, 0) or v = (0, 5).
  • In order to use polar coordinates type in P = (1; 0°) or v = (5; 90°).
Note: You need to use a semicolon to separate polar coordinates. If you don’t type the degree symbol, GeoGebra will treat the angle as if entered in radians.

Calculations

In GeoGebra, you can also do calculations with points and vectors.

Example:
  • You can create the midpoint M of two points A and B by entering M = (A + B) / 2 into the Input Bar.
  • You may calculate the length of a vector v using length = sqrt(v * v)
  • If A = (a, b), then A + 1 returns (a + 1, b + 1). If A is a complex number a+bί, then A+1 returns a + 1 + bί.

Vector Product

For two points or vectors (a, b) ⊗ (c, d) returns the z-coordinate of vector product (a, b, 0) ⊗ (c, d, 0) as single number. Similar syntax is valid for lists, but the result in such case is a list.

Example:
  • {1, 2} ⊗ {4, 5} returns {0, 0, -3}
  • {1, 2, 3} ⊗ {4, 5, 6} returns {3, 6, -3}.
© 2024 International GeoGebra Institute