<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://www.physicsbook.gatech.edu/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Zsanchez6</id>
	<title>Physics Book - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="http://www.physicsbook.gatech.edu/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Zsanchez6"/>
	<link rel="alternate" type="text/html" href="http://www.physicsbook.gatech.edu/Special:Contributions/Zsanchez6"/>
	<updated>2026-04-11T15:17:47Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.42.7</generator>
	<entry>
		<id>http://www.physicsbook.gatech.edu/index.php?title=Vectors&amp;diff=38713</id>
		<title>Vectors</title>
		<link rel="alternate" type="text/html" href="http://www.physicsbook.gatech.edu/index.php?title=Vectors&amp;diff=38713"/>
		<updated>2020-04-20T20:39:32Z</updated>

		<summary type="html">&lt;p&gt;Zsanchez6: Fixed a couple of typos&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Claimed by: Zach Sanchez (Spring 2020) ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This page defines and describes vectors.&lt;br /&gt;
&lt;br /&gt;
==The Main Idea==&lt;br /&gt;
&lt;br /&gt;
In mathematics and physics, a vector is a quantity with both a magnitude and a direction in space. The magnitude of a vector is a scalar value which can represent a variety of characteristics, depending on the situation. The magnitude of the vector (and the vector itself) has units corresponding to the characteristic it represents. The direction refers to the angle from the positive x -axis. Thus, the magnitude refers to the length and the direction refers to the angle. Note that a vector does not necessarily extend from one point in real, physical space to another; unless the magnitude is in units of length, the magnitude of the vector usually represents a property that exists at a single point in real, physical space, or at no position in particular.&lt;br /&gt;
&lt;br /&gt;
===A Mathematical Model===&lt;br /&gt;
&lt;br /&gt;
====Simple Examples of Vector Quantities====&lt;br /&gt;
&lt;br /&gt;
To understand what it means for a vector to have both a magnitude and a direction, and to understand why the magnitude and direction together are often considered a single quantity, it can be helpful to consider an example. The [[Velocity]] of an object is an example of a vector quantity. The speed of the object, often given in meters per second (m/s), is a scalar value describing how quickly the object is moving. Speed is the magnitude of the velocity vector. However, the object&#039;s movement happens in a particular spatial direction, which the speed alone does not tell us. The direction of the object&#039;s movement is also a part of the velocity vector. Together, speed and direction comprise the velocity vector and give a complete description of an object&#039;s motion at a point in time. Another example of a vector is position; the distance of a point from the origin of a coordinate system can be represented as the magnitude of a vector, and this distance together with a direction describes exactly where a point can be found.&lt;br /&gt;
&lt;br /&gt;
====Beginning Concepts====&lt;br /&gt;
&lt;br /&gt;
A  vector is typically written as a letter with an arrow over it. For example: &amp;lt;math&amp;gt;\vec{a} = \langle 1, 2, 3 \rangle&amp;lt;/math&amp;gt;. The arrow may one-sided to make it easier to write. Alternatively, a vector might simply be written as a boldface letter: &amp;lt;b&amp;gt;a&amp;lt;/b&amp;gt;. Which letter is used depends on the context; for example, &amp;lt;math&amp;gt;\vec{v}&amp;lt;/math&amp;gt; represents velocity.&lt;br /&gt;
&lt;br /&gt;
A specific component of a vector (see the section titled &amp;quot;forms&amp;quot;) is denoted by a subscript: c&amp;lt;sub&amp;gt;x&amp;lt;/sub&amp;gt;. For example, q&amp;lt;sub&amp;gt;y&amp;lt;/sub&amp;gt; represents the y component of some vector &amp;lt;math&amp;gt;\vec{q}&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Surrounding a vector by | symbols denotes its magnitude: &amp;lt;math&amp;gt;|\vec{b}|&amp;lt;/math&amp;gt;. Alternatively, there are exists the notation &amp;lt;math&amp;gt;\overline{v}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\lVert \vec{v} \rVert_2&amp;lt;/math&amp;gt;, with the latter denoting the Euclidean norm, which is the type of vector norm that you will see most often.&lt;br /&gt;
&lt;br /&gt;
The magnitude of some vector is defined to be &amp;lt;math&amp;gt;\lVert \vec{v} \rVert_2 = \sqrt{v_x^2 + v_y^2 + v_z^2}&amp;lt;/math&amp;gt;, where the axes of the 3D-map are mathematically notated as &amp;lt;math&amp;gt;\hat{x}, \hat{y}, \hat{z}&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
A unit vector is a vector whose magnitude is equal to one, and normalization is the process of setting a vector&#039;s magnitude to 1. A unit vector is denoted by a letter with a ^ symbol (called a &amp;quot;hat&amp;quot;) written over it: &amp;lt;math&amp;gt;\hat{d}&amp;lt;/math&amp;gt; (read as &amp;quot;d-hat&amp;quot;). Certain letters represent specific unit vectors. For example, &amp;lt;math&amp;gt;\hat{i}&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;\hat{j}&amp;lt;/math&amp;gt;, and &amp;lt;math&amp;gt;\hat{k}&amp;lt;/math&amp;gt; (alternatively, &amp;lt;math&amp;gt;\hat{x}&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;\hat{y}&amp;lt;/math&amp;gt;, and &amp;lt;math&amp;gt;\hat{z}&amp;lt;/math&amp;gt;) are unit vectors pointing in the +x, +y, and +z directions respectively. Non-Cartesian coordinate systems often have their own unit vectors; for example, 2D polar coordinates make use of the &amp;lt;math&amp;gt;\hat{r}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\hat{\theta}&amp;lt;/math&amp;gt; unit vectors.&lt;br /&gt;
&lt;br /&gt;
Unit vectors are defined to be for an arbitrary vector: &amp;lt;math&amp;gt;\hat{v} = \frac{\vec{v}}{\lVert \vec{v} \rVert_2}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Visually Representing Vectors====&lt;br /&gt;
&lt;br /&gt;
Vectors are visually represented by arrows. The length of the arrow represents the magnitude of the vector, while the direction the arrow points in represents the direction of the vector. If a vector exists at a particular point in space, the &amp;quot;tail&amp;quot; of the arrow (the end without the V shape) should be placed at that point.&lt;br /&gt;
&lt;br /&gt;
This example shows a visual representation of the velocity vector of a ball, which is moving to the right at a speed of 5m/s.&lt;br /&gt;
&lt;br /&gt;
[[File:Vectorvisualrepresentation.png]]&lt;br /&gt;
&lt;br /&gt;
====Important Vector Operations====&lt;br /&gt;
&lt;br /&gt;
It is possible to perform a variety of mathematical operations on vectors, both with other vectors and with scalars. These operations appear in a variety of formulas in physics. To make the operations easier to learn, they are defined below assuming all vectors to be 3-dimensional; the more general n-dimensional definitions look more confusing. If necessary, it is easy to guess how to perform each operation with n-dimensional vectors by extrapolating from the 3-dimensional case.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;Addition:&amp;lt;/u&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\vec{a} + \vec{b} = \langle (a_x + b_x), (a_y + b_y), (a_z + b_z) \rangle&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
In other words, to add two vectors, simply add their like components to form the new components. Visually, if the tail of one vector is placed at the tip of another, their sum will extend from the tail of the second vector to the tip of the first:&lt;br /&gt;
&lt;br /&gt;
[[File:Vectoraddition.png|600px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;Subtraction:&amp;lt;/u&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\vec{a} - \vec{b} =  \langle (a_x - b_x), (a_y - b_y), (a_z - b_z)&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
In other words, to subtract two vectors, simply subtract their like components to form the new components.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;Multiplication by scalar:&amp;lt;/u&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;k \vec{a} =  \langle k \cdot a_x, k \cdot a_y,  k \cdot a_z \rangle&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
In other words, multiplying a vector by a scalar multiplies each of that vector&#039;s components by that scalar. Note that this only affects a vector&#039;s magnitude, not its direction, unless the scalar is negative, in which case the direction of the vector is reversed.&lt;br /&gt;
&lt;br /&gt;
[[File:Vectorscalarmultiplication.png|400px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;Division by scalar:&amp;lt;/u&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Division by a scalar behaves exactly like scalar multiplication.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{\vec{a}}{k} = \langle \frac{a_x}{k}, \frac{a_y}{k}, \frac{a_z}{k} \rangle&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;Dot product (also called scalar product):&amp;lt;/u&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\vec{a}\cdot\vec{b} =(a_x \cdot b_x) + (a_y \cdot b_y) + (a_z \cdot b_z)&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
In other words, the dot product of two vectors is the sum of the products of their like components. Note that this is a scalar value.&lt;br /&gt;
&lt;br /&gt;
It is important to note that the dot product of two vectors has a specific value: &amp;lt;math&amp;gt;\vec{a}\cdot\vec{b} = |\vec{a}| \cdot |\vec{b}| \cdot \cos(\theta)&amp;lt;/math&amp;gt;, where &amp;lt;math&amp;gt;\theta&amp;lt;/math&amp;gt; is the angle between the vectors.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;Cross product (also called vector product):&amp;lt;/u&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The simplest definition, which is also the one found on the formula sheet, is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\vec{a} \times \vec{b} = = \langle (a_yb_z - a_zb_y), (a_zb_x - a_xb_z), (a_xb_y - a_yb_x) \rangle = (a_yb_z - a_zb_y)\hat{i} + (a_zb_x - a_xb_z)\hat{j} + (a_xb_y - a_yb_x)\hat{k}&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
This is equivalent to the following matrix determinant, which may be easier to remember:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\begin{vmatrix}&lt;br /&gt;
\hat{i} &amp;amp; \hat{j} &amp;amp; \hat{k} \\&lt;br /&gt;
a_x &amp;amp; a_y &amp;amp; a_z \\&lt;br /&gt;
b_x &amp;amp; b_y &amp;amp; b_z&lt;br /&gt;
\end{vmatrix}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that this is a vector quantity. It is important to note that the &amp;lt;i&amp;gt;magnitude&amp;lt;/i&amp;gt; of the cross product of two vectors has a specific value: &amp;lt;math&amp;gt;|\vec{a}\times\vec{b}| = |\vec{a}| \cdot |\vec{b}| \cdot \sin(\theta)&amp;lt;/math&amp;gt;, where &amp;lt;math&amp;gt;\theta&amp;lt;/math&amp;gt; is the angle between the vectors. &lt;br /&gt;
&lt;br /&gt;
The direction of the cross product of two vectors is perpendicular to the plane in which those vectors lie and is given by the [[Right Hand Rule]]. 2D vectors do not have cross products. While the other operations listed here are commutative, associative (where the associative property is defined), and distributive over addition; cross product multiplication is not associative and is anticommutative (&amp;lt;math&amp;gt;\vec{a}\times\vec{b} = -\vec{b}\times\vec{a}&amp;lt;/math&amp;gt;), meaning that if the order of the factors is reversed, their cross product will be reversed in direction.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;For more mathematically-advanced students&amp;lt;/b&amp;gt;, I will invoke some higher-level linear algebra. Recall that the null space, defined as &amp;lt;math&amp;gt;Null(A) = \{ \vec{v} \in \mathbb{R}^n \mid A\vec{v} = \vec{0} \}&amp;lt;/math&amp;gt; for an arbitrary matrix &amp;lt;math&amp;gt;A \in \mathbb{R}^{n \times n}&amp;lt;/math&amp;gt;, is orthogonal, or normal, to its row space. That is, for all &amp;lt;math&amp;gt;\vec{v} \in Null(A)&amp;lt;/math&amp;gt; and for all columns &amp;lt;math&amp;gt;a_{j:}&amp;lt;/math&amp;gt;, we have &amp;lt;math&amp;gt;\sum^n_{i=1} a_{i,j} v_i = 0&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
For two vectors &amp;lt;math&amp;gt;\vec{a},\vec{b} \in \mathbb{R}^{3 \times 1}&amp;lt;/math&amp;gt; (&amp;lt;i&amp;gt;note that this is only valid for 3x1 vectors&amp;lt;/i&amp;gt;), if we think of &amp;lt;math&amp;gt;\vec{a}&amp;lt;/math&amp;gt; as corresponding to a row in a matrix and &amp;lt;math&amp;gt;\vec{b}&amp;lt;/math&amp;gt; to another, then the null space is equivalent to their cross-product. &amp;lt;b&amp;gt;This is why the right-hand rule works.&amp;lt;/b&amp;gt; If we visualize the plane spanned by two vectors with our index and middle fingers, then their null space will be perpendicular to the intersection point of the two vectors, or rather the thumb. Likewise, if we use all of our fingers and our thumb to make an L-shape representing the span of the two vectors, upon curling our fingers, we will have the direction of the cross product, which is orthogonal to the two vectors represented by your thumb and fingers.&lt;br /&gt;
&lt;br /&gt;
====Forms====&lt;br /&gt;
&lt;br /&gt;
The information necessary to describe a specific vector can be presented in several forms.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;Magnitude and direction form&amp;lt;/u&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this form, the magnitude and the direction of the vector are explicitly stated. The statement describing direction might be a cardinal direction (ex. &amp;quot;north&amp;quot;), a direction on a graph (ex. &amp;quot;the +x direction&amp;quot;), or an angle (ex. &amp;quot;210&amp;lt;math&amp;gt;^\circ&amp;lt;/math&amp;gt; from the x axis counterclockwise&amp;quot;), depending on the situation. Magnitude and direction form is often used in word problems because it is easy for humans to understand.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;Component form&amp;lt;/u&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this form, the vector is divided into components, each representing a different coordinate direction. In 2D space, these are the x and y directions. In 3D space, these are the x, y, and z directions. Each component tells how much the vector extends in that particular direction. Often, the three components are written enclosed by angle brackets and separated by commas. For example, the vector &amp;lt;2,0,-3&amp;gt; describes a vector that extends 2 units in the +x direction, 0 units in the y direction, and 3 units in the -z direction. Most vector operations described below can only be performed if the vectors are in component form, so this form may be necessary to do math for certain problems. Furthermore, programming languages store vectors in component form.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;Unit vector form&amp;lt;/u&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this form, the vector is expressed as a sum of unit vectors, each corresponding to a different coordinate direction. The symbols &amp;lt;math&amp;gt;\hat{i}&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;\hat{j}&amp;lt;/math&amp;gt;, and &amp;lt;math&amp;gt;\hat{k}&amp;lt;/math&amp;gt; OR the symbols &amp;lt;math&amp;gt;\hat{x}&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;\hat{y}&amp;lt;/math&amp;gt;, and &amp;lt;math&amp;gt;\hat{z}&amp;lt;/math&amp;gt; are used to represent unit vectors in the x, y, and z directions respectively. Consider the vector &amp;lt;2,0,-3&amp;gt;. It can be expressed in unit vector form as &amp;lt;math&amp;gt;2\hat{i} - 3\hat{k}&amp;lt;/math&amp;gt;, meaning 2 times the x direction unit vector minus 3 times the z direction unit vector (see vector operations). While often considered its own form, unit vector form is very similar to component form, as the information describing the vector is stored in the same values. All references to component form in the rest of this page also apply to unit vector form.&lt;br /&gt;
&lt;br /&gt;
[[File:Vectorsdifferentforms.png]]&lt;br /&gt;
&lt;br /&gt;
Note that regardless of which form is used, an n-dimensional vector requires n values to mathematically describe. For example, consider a 3-dimensional vector. Describing this vector in component form requires an x value, a y value, and a z value. Describing it in magnitude and direction form requires one value to give the magnitude of the vector and two to give the its direction (the direction of a 3D vector could be described using, say, its polar angle &amp;lt;math&amp;gt;\theta&amp;lt;/math&amp;gt; and its azimuthal angle &amp;lt;math&amp;gt;\phi&amp;lt;/math&amp;gt;). A 1-dimensional vector (such as the velocity of a particle whose movement is constrained to the x axis) can be described using only 1 value whose sign indicates the vector&#039;s direction.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;Converting between forms&amp;lt;/u&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is possible to convert vectors from one form to another using simple trigonometry.&lt;br /&gt;
&lt;br /&gt;
To find the magnitude of a vector in component form, use the Pythagorean theorem: add the squares of the components and take the square root of the result. For a 2D vector, &amp;lt;math&amp;gt;|\vec{a}| = \sqrt{a_x^2 + a_y^2}&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
To find the direction of a vector in component form, use inverse trigonometric functions. For a 2D vector, &amp;lt;math&amp;gt;\theta = \tan^{-1}(\frac{a_y}{a_x})&amp;lt;/math&amp;gt;, where &amp;lt;math&amp;gt;\theta&amp;lt;/math&amp;gt; is the angle vector &amp;lt;math&amp;gt;\vec{a}&amp;lt;/math&amp;gt; makes with the x axis in the counterclockwise direction.&lt;br /&gt;
&lt;br /&gt;
To find the components of a vector in magnitude and direction form, use trigonometric functions. For a 2D vector, &amp;lt;math&amp;gt;a_x = |\vec{a}|\cos\theta&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;a_y = |\vec{a}|\sin\theta&amp;lt;/math&amp;gt;, where &amp;lt;math&amp;gt;\theta&amp;lt;/math&amp;gt; is the angle vector &amp;lt;math&amp;gt;\vec{a}&amp;lt;/math&amp;gt; makes with the x axis in the counterclockwise direction.&lt;br /&gt;
&lt;br /&gt;
===A Computational Model===&lt;br /&gt;
&lt;br /&gt;
In VPython, vector objects are in component form; each one has an x, y, and z component. Recall that in VPython, using the default camera orientation, the +x axis points to the right, the +y axis points upwards, and the +z axis points out of the plane of the screen towards the viewer. The constructor for a vector object is the word &amp;quot;vec&amp;quot; or &amp;quot;vector,&amp;quot; and it takes three arguments, which define its x, y and z components respectively. A line to create a vector called &amp;quot;velocity&amp;quot; might look like this:&lt;br /&gt;
&lt;br /&gt;
velocity = vec(3,-1,2)&lt;br /&gt;
&lt;br /&gt;
To access or modify a specific component of a vector object, its name should be followed by a period and an x, y, or z. For example, to change the x component of the above velocity vector from 3 to 5, the following line might be used:&lt;br /&gt;
&lt;br /&gt;
velocity.x = 5&lt;br /&gt;
&lt;br /&gt;
In VPython, vectors have many uses. The position of each object is defined as a vector; the position vector&#039;s tail lies at the origin and its head lies at the center of the object in question. Furthermore, the dimensions of a rectangular prism (a &amp;quot;box&amp;quot; object) are defined as a vector; the x component determines its width, the y component its height, and the z component its thickness.&lt;br /&gt;
&lt;br /&gt;
To graphically represent a vector such as an electric field, &amp;quot;arrow&amp;quot; objects should be used. In addition to taking a position vector (which determines the position of the arrow&#039;s tail), arrow objects take an &amp;quot;axis&amp;quot; vector, which determines their size and shape. To represent a vector, simply make it the axis of an arrow object.&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
===Simple===&lt;br /&gt;
&lt;br /&gt;
Vector &amp;lt;math&amp;gt;\vec{a}&amp;lt;/math&amp;gt; is &amp;lt;2,4,2&amp;gt;. Vector &amp;lt;math&amp;gt;\vec{b}&amp;lt;/math&amp;gt; is &amp;lt;-1,1,3&amp;gt;. What is the magnitude of the vector &amp;lt;math&amp;gt;\vec{a} - 2\vec{b}&amp;lt;/math&amp;gt;?&lt;br /&gt;
&lt;br /&gt;
Solution:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\vec{a} - 2\vec{b} = &amp;lt;2,4,2&amp;gt; - 2 * &amp;lt;-1,1,3&amp;gt; &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; = &amp;lt;2,4,2&amp;gt; - &amp;lt;-2,2,6&amp;gt; &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; = &amp;lt;4,2,-4&amp;gt;&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We  are asked to find the magnitude of this vector, so let us use the Pythagorean theorem with its components:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;|&amp;lt;4,2,-4&amp;gt;| = \sqrt{4^2 + 2^2 + (-4)^2}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; = \sqrt{16 + 4 + 16} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; = \sqrt{36} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; = 6 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Intermediate===&lt;br /&gt;
&lt;br /&gt;
An airplane is travelling in still air at 240m/s in the direction 35&amp;lt;math&amp;gt;^\circ&amp;lt;/math&amp;gt; south of west. A wind begins to blow; the wind has a speed of 80m/s in the direction 15&amp;lt;math&amp;gt;^\circ&amp;lt;/math&amp;gt; east of north. What should be the new velocity of the plane relative to the air around it to maintain its original trajectory? You may give your answer in component form (+x is east, +y is north).&lt;br /&gt;
&lt;br /&gt;
[[File:Vectorsplaneproblem.png]]&lt;br /&gt;
&lt;br /&gt;
Solution:&lt;br /&gt;
&lt;br /&gt;
The vector sum of the new velocity of the plane &amp;lt;math&amp;gt;\vec{v_{p,1}}&amp;lt;/math&amp;gt; and the velocity of the wind &amp;lt;math&amp;gt;\vec{v_w}&amp;lt;/math&amp;gt; should equal the original velocity of the plane &amp;lt;math&amp;gt;\vec{v_{p,0}}&amp;lt;/math&amp;gt; (see [[Relative Velocity]]):&lt;br /&gt;
&lt;br /&gt;
[[File:Vectorsplanesolution.png]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \vec{v_{p,1}} + \vec{v_w} = \vec{v_{p,0}} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \vec{v_{p,1}} = \vec{v_{p,0}} - \vec{v_w} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Let us convert the given vectors to component form for easier subtraction. The +x and +y directions will be east and north respectively.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\vec{v_{p,0}} = &amp;lt;240\cos(215^\circ), 240\sin(215^\circ)&amp;gt;&amp;lt;/math&amp;gt;m/s (35&amp;lt;math&amp;gt;^\circ&amp;lt;/math&amp;gt; south of west is 215&amp;lt;math&amp;gt;^\circ&amp;lt;/math&amp;gt; above the x axis)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\vec{v_{p,0}} = &amp;lt;-196.6, -137.7&amp;gt; &amp;lt;/math&amp;gt;m/s&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\vec{v_w} = &amp;lt;80\cos(75^\circ), 80\sin(75^\circ)&amp;gt;&amp;lt;/math&amp;gt;m/s (15&amp;lt;math&amp;gt;^\circ&amp;lt;/math&amp;gt; east of north is 75&amp;lt;math&amp;gt;^\circ&amp;lt;/math&amp;gt; above the x axis)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\vec{v_w} = &amp;lt;20.7, 77.3&amp;gt; &amp;lt;/math&amp;gt;m/s&lt;br /&gt;
&lt;br /&gt;
Now let us subtract:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \vec{v_{p,1}} = \vec{v_{p,0}} - \vec{v_w} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \vec{v_{p,1}} = &amp;lt;-196.6, -137.7&amp;gt; - &amp;lt;20.7, 77.3&amp;gt; &amp;lt;/math&amp;gt;m/s&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \vec{v_{p,1}} = &amp;lt;-217.3, -214.9&amp;gt; &amp;lt;/math&amp;gt;m/s&lt;br /&gt;
&lt;br /&gt;
===Difficult===&lt;br /&gt;
&lt;br /&gt;
What is the angle between the vectors &amp;lt;2,5,-2&amp;gt; and &amp;lt;3,-4,-1&amp;gt;?&lt;br /&gt;
&lt;br /&gt;
Solution:&lt;br /&gt;
&lt;br /&gt;
The dot product between two vectors is equal to the product of their magnitudes times the cosine of the angle between them. Let us use this property to find the angle between the given vectors.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; &amp;lt;2,5,-2&amp;gt; \cdot &amp;lt;3,-4,-1&amp;gt; = |&amp;lt;2,5,-2&amp;gt;| * |&amp;lt;3,-4,-1&amp;gt;| * \cos\theta &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Rearranging this yields&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \theta = \cos^{-1}\frac{&amp;lt;2,5,-2&amp;gt; \cdot &amp;lt;3,-4,-1&amp;gt;}{|&amp;lt;2,5,-2&amp;gt;| * |&amp;lt;3,-4,-1&amp;gt;|} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Let us evaluate the dot product and simplify:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \theta = \cos^{-1}\frac{2(3) + 5(-4) + (-2)(-1)}{\sqrt{2^2 + 5^2 + (-2)^2} * \sqrt{3^2 + (-4)^2 + (-1)^2}} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \theta = \cos^{-1}\frac{-12}{\sqrt{33 * 26}} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \theta = 114^\circ &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Connectedness==&lt;br /&gt;
&lt;br /&gt;
Vectors are used in many fields and levels of physics. Kinematics, for example, studies the relationships between the position vector and its time derivatives (velocity, acceleration). Force is also a vector quantity, as are certain system properties such as linear and angular momentum. Vector fields are commonly used in electricity and magnetism, as well as in fluid dynamics.&lt;br /&gt;
&lt;br /&gt;
==History==&lt;br /&gt;
&lt;br /&gt;
It is unknown who first developed the idea of vectors, but the oldest known reference to vectors is in the work &amp;lt;i&amp;gt;Mechanics&amp;lt;/i&amp;gt; by Hero of Alexandria (first century AD), which described their addition. At this point, however, the idea of a vector was little more than a line segment with a specific orientation; they had a length extending from one point in physical space to another but were not used to represent anything else.&lt;br /&gt;
&lt;br /&gt;
In the early 19th century, several mathematicians and physicists (including Caspar Wessel (1745-1818), Jean Robert Argand (1768-1822), Carl Friedrich Gauss (1777-1855)), and William Rowan Hamilton (1805-1865) used 2D vectors to represent complex numbers; one component would represent the real value and another would represent the imaginary value. Hamilton would also become the first to use the word &amp;quot;vector.&amp;quot; August Ferdinand Möbius (1790-1868) contributed to vector math in his 1827 book &amp;lt;i&amp;gt;The Barycentric Calculus&amp;lt;/i&amp;gt;, in which he developed the convention of labeling vectors with letters and defined the multiplication of a vector by a scalar. Hermann Grassmann (1809-1877) wrote in his 1844 book &amp;lt;i&amp;gt;Ausdehnungslehre&amp;lt;/i&amp;gt; (German for &amp;quot;The Calculus of Extension&amp;quot;) that vectors could exist in space of any number of dimensions and described much of what would become linear algebra, which makes ample use of vectors.&lt;br /&gt;
&lt;br /&gt;
The modern language and conventions surrounding vectors come largely from notes created by J. Willard Gibbs (1839--1903), a professor at Yale University.&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
===External links===&lt;br /&gt;
Mathematical Computations on Vectors: [http://ocw.mit.edu/courses/mathematics/18-02sc-multivariable-calculus-fall-2010/1.-vectors-and-matrices/part-a-vectors-determinants-and-planes/session-1-vectors/MIT18_02SC_notes_0.pdf [http://ocw.mit.edu/courses/mathematics/18-02sc-multivariable-calculus-fall-2010/1.-vectors-and-matrices/part-a-vectors-determinants-and-planes/session-1-vectors/MIT18_02SC_notes_0.pdf]&lt;br /&gt;
&lt;br /&gt;
Computational Work with Vectors: [http://vpython.org/contents/docs/vector.html http://vpython.org/contents/docs/vector.html]&lt;br /&gt;
&lt;br /&gt;
Basics of Vectors: [https://www.physics.uoguelph.ca/tutorials/vectors/vectors.html https://www.physics.uoguelph.ca/tutorials/vectors/vectors.html]&lt;br /&gt;
&lt;br /&gt;
===Further Reading===&lt;br /&gt;
&lt;br /&gt;
Vector Analysis by Josiah Willard Gibbs&lt;br /&gt;
&lt;br /&gt;
Introduction to Matrices and Vectors by Jacob T. Schwartz&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
[https://www.mathsisfun.com/algebra/vectors.html https://www.mathsisfun.com/algebra/vectors.html]&lt;br /&gt;
&lt;br /&gt;
[http://ocw.mit.edu/courses/mathematics/18-02sc-multivariable-calculus-fall-2010/1.-vectors-and-matrices/part-a-vectors-determinants-and-planes/session-1-vectors/MIT18_02SC_notes_0.pdf http://ocw.mit.edu/courses/mathematics/18-02sc-multivariable-calculus-fall-2010/1.-vectors-and-matrices/part-a-vectors-determinants-and-planes/session-1-vectors/MIT18_02SC_notes_0.pdf ]&lt;br /&gt;
&lt;br /&gt;
[http://mathinsight.org/vector_introduction http://mathinsight.org/vector_introduction]&lt;br /&gt;
&lt;br /&gt;
[http://www.math.mcgill.ca/labute/courses/133f03/VectorHistory.html http://www.math.mcgill.ca/labute/courses/133f03/VectorHistory.html]&lt;br /&gt;
&lt;br /&gt;
[[Category: Geometry]]&lt;/div&gt;</summary>
		<author><name>Zsanchez6</name></author>
	</entry>
	<entry>
		<id>http://www.physicsbook.gatech.edu/index.php?title=Vectors&amp;diff=38712</id>
		<title>Vectors</title>
		<link rel="alternate" type="text/html" href="http://www.physicsbook.gatech.edu/index.php?title=Vectors&amp;diff=38712"/>
		<updated>2020-04-20T20:34:33Z</updated>

		<summary type="html">&lt;p&gt;Zsanchez6: Cleaned up the ordering to make it more logical, added some definitions to help clarify some concepts, added in more advanced math for the cross product to explain the right-hand rule&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Claimed by: Zach Sanchez (Spring 2020) ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This page defines and describes vectors.&lt;br /&gt;
&lt;br /&gt;
==The Main Idea==&lt;br /&gt;
&lt;br /&gt;
In mathematics and physics, a vector is a quantity with both a magnitude and a direction in space. The magnitude of a vector is a scalar value which can represent a variety of characteristics, depending on the situation. The magnitude of the vector (and the vector itself) has units corresponding to the characteristic it represents. The direction refers to the angle from the positive x -axis. Thus, the magnitude refers to the length and the direction refers to the angle. Note that a vector does not necessarily extend from one point in real, physical space to another; unless the magnitude is in units of length, the magnitude of the vector usually represents a property that exists at a single point in real, physical space, or at no position in particular.&lt;br /&gt;
&lt;br /&gt;
===A Mathematical Model===&lt;br /&gt;
&lt;br /&gt;
====Simple Examples of Vector Quantities====&lt;br /&gt;
&lt;br /&gt;
To understand what it means for a vector to have both a magnitude and a direction, and to understand why the magnitude and direction together are often considered a single quantity, it can be helpful to consider an example. The [[Velocity]] of an object is an example of a vector quantity. The speed of the object, often given in meters per second (m/s), is a scalar value describing how quickly the object is moving. Speed is the magnitude of the velocity vector. However, the object&#039;s movement happens in a particular spatial direction, which the speed alone does not tell us. The direction of the object&#039;s movement is also a part of the velocity vector. Together, speed and direction comprise the velocity vector and give a complete description of an object&#039;s motion at a point in time. Another example of a vector is position; the distance of a point from the origin of a coordinate system can be represented as the magnitude of a vector, and this distance together with a direction describes exactly where a point can be found.&lt;br /&gt;
&lt;br /&gt;
====Unit Vectors====&lt;br /&gt;
&lt;br /&gt;
A unit vector is a vector whose magnitude is 1 by design.&lt;br /&gt;
&lt;br /&gt;
Some unit vectors are normalized regular vectors. For example, &amp;lt;math&amp;gt;\hat{r}&amp;lt;/math&amp;gt; is the normalized version of some vector &amp;lt;math&amp;gt;\vec{r}&amp;lt;/math&amp;gt;. Normalization is the process of setting a vector&#039;s magnitude to 1. This is done to discard information about the vector&#039;s magnitude while retaining information about its direction. To normalize a vector, the following formula can be used: &amp;lt;math&amp;gt;\hat{a} = \frac{\vec{a}}{|\vec{a}|}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Certain letters represent specific unit vectors. For example, &amp;lt;math&amp;gt;\hat{i}&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;\hat{j}&amp;lt;/math&amp;gt;, and &amp;lt;math&amp;gt;\hat{k}&amp;lt;/math&amp;gt; (alternatively, &amp;lt;math&amp;gt;\hat{x}&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;\hat{y}&amp;lt;/math&amp;gt;, and &amp;lt;math&amp;gt;\hat{z}&amp;lt;/math&amp;gt;) are unit vectors pointing in the +x, +y, and +z directions respectively. Non-Cartesian coordinate systems often have their own unit vectors; for example, 2D polar coordinates make use of the &amp;lt;math&amp;gt;\hat{r}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\hat{\theta}&amp;lt;/math&amp;gt; unit vectors.&lt;br /&gt;
&lt;br /&gt;
====Notation====&lt;br /&gt;
A  vector is typically written as a letter with an arrow over it: &amp;lt;math&amp;gt;\vec{a}&amp;lt;/math&amp;gt;. The arrow may one-sided to make it easier to write. Alternatively, a vector might simply be written as a boldface letter: &amp;lt;b&amp;gt;a&amp;lt;/b&amp;gt;. Which letter is used depends on the context; for example, &amp;lt;math&amp;gt;\vec{v}&amp;lt;/math&amp;gt; represents velocity.&lt;br /&gt;
&lt;br /&gt;
Surrounding a vector by | symbols denotes its magnitude: &amp;lt;math&amp;gt;|\vec{b}|&amp;lt;/math&amp;gt;. Alternatively, there are exists the notation &amp;lt;math&amp;gt;\overline{v}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\lVert \vec{v} \rVert_2&amp;lt;/math&amp;gt;, with the latter denoting the Euclidean norm, which is the type of vector norm that you will see most often.&lt;br /&gt;
&lt;br /&gt;
The magnitude of some vector is defined to be &amp;lt;math&amp;gt;\lVert \vec{v} \rVert_2 = \sqrt{v_x^2 + v_y^2 + v_z^2}&amp;lt;/math&amp;gt;, where the axes of the 3D-map are mathematically notated as &amp;lt;math&amp;gt;\hat{x}, \hat{y}, \hat{z}&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
A specific component of a vector (see the section titled &amp;quot;forms&amp;quot;) is denoted by a subscript: c&amp;lt;sub&amp;gt;x&amp;lt;/sub&amp;gt;. For example, q&amp;lt;sub&amp;gt;y&amp;lt;/sub&amp;gt; represents the y component of some vector &amp;lt;math&amp;gt;\vec{q}&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
A unit vector is denoted by a letter with a ^ symbol (called a &amp;quot;hat&amp;quot;) written over it: &amp;lt;math&amp;gt;\hat{d}&amp;lt;/math&amp;gt; (read as &amp;quot;d-hat&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
Unit vectors are defined to be for some vector: &amp;lt;math&amp;gt;\hat{v} = \frac{\vec{v}}{\lVert \vec{v} \rVert_2}&lt;br /&gt;
&lt;br /&gt;
====Visually Representing Vectors====&lt;br /&gt;
&lt;br /&gt;
Vectors are visually represented by arrows. The length of the arrow represents the magnitude of the vector, while the direction the arrow points in represents the direction of the vector. If a vector exists at a particular point in space, the &amp;quot;tail&amp;quot; of the arrow (the end without the V shape) should be placed at that point.&lt;br /&gt;
&lt;br /&gt;
This example shows a visual representation of the velocity vector of a ball, which is moving to the right at a speed of 5m/s.&lt;br /&gt;
&lt;br /&gt;
[[File:Vectorvisualrepresentation.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Important Vector Operations====&lt;br /&gt;
&lt;br /&gt;
It is possible to perform a variety of mathematical operations on vectors, both with other vectors and with scalars. These operations appear in a variety of formulas in physics. To make the operations easier to learn, they are defined below assuming all vectors to be 3-dimensional; the more general n-dimensional definitions look more confusing. If necessary, it is easy to guess how to perform each operation with n-dimensional vectors by extrapolating from the 3-dimensional case.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;Addition:&amp;lt;/u&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\vec{a} + \vec{b} = \langle (a_x + b_x), (a_y + b_y), (a_z + b_z) \rangle&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
In other words, to add two vectors, simply add their like components to form the new components. Visually, if the tail of one vector is placed at the tip of another, their sum will extend from the tail of the second vector to the tip of the first:&lt;br /&gt;
&lt;br /&gt;
[[File:Vectoraddition.png|600px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;Subtraction:&amp;lt;/u&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\vec{a} - \vec{b} =  \langle (a_x - b_x), (a_y - b_y), (a_z - b_z)&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
In other words, to subtract two vectors, simply subtract their like components to form the new components.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;Multiplication by scalar:&amp;lt;/u&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;k \vec{a} =  \langle k \cdot a_x, k \cdot a_y,  k \cdot a_z \rangle&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
In other words, multiplying a vector by a scalar multiplies each of that vector&#039;s components by that scalar. Note that this only affects a vector&#039;s magnitude, not its direction, unless the scalar is negative, in which case the direction of the vector is reversed.&lt;br /&gt;
&lt;br /&gt;
[[File:Vectorscalarmultiplication.png|400px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;Division by scalar:&amp;lt;/u&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Division by a scalar behaves exactly like scalar multiplication.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{\vec{a}}{k} = \langle \frac{a_x}{k}, \frac{a_y}{k}, \frac{a_z} \rangle&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;Dot product (also called scalar product):&amp;lt;/u&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\vec{a}\cdot\vec{b} =(a_x \cdot b_x) + (a_y \cdot b_y) + (a_z \cdot b_z)&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
In other words, the dot product of two vectors is the sum of the products of their like components. Note that this is a scalar value.&lt;br /&gt;
&lt;br /&gt;
It is important to note that the dot product of two vectors has a specific value: &amp;lt;math&amp;gt;\vec{a}\cdot\vec{b} = |\vec{a}| \cdot |\vec{b}| \cdot \cos(\theta)&amp;lt;/math&amp;gt;, where &amp;lt;math&amp;gt;\theta&amp;lt;/math&amp;gt; is the angle between the vectors.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;Cross product (also called vector product):&amp;lt;/u&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The simplest definition, which is also the one found on the formula sheet, is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\vec{a} \times \vec{b} = = \langle (a_yb_z - a_zb_y), (a_zb_x - a_xb_z), (a_xb_y - a_yb_x) \rangle = (a_yb_z - a_zb_y)\hat{i} + (a_zb_x - a_xb_z)\hat{j} + (a_xb_y - a_yb_x)\hat{k}&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
This is equivalent to the following matrix determinant, which may be easier to remember:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\begin{vmatrix}&lt;br /&gt;
\hat{i} &amp;amp; \hat{j} &amp;amp; \hat{k} \\&lt;br /&gt;
a_x &amp;amp; a_y &amp;amp; a_z \\&lt;br /&gt;
b_x &amp;amp; b_y &amp;amp; b_z&lt;br /&gt;
\end{vmatrix}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that this is a vector quantity. It is important to note that the &amp;lt;i&amp;gt;magnitude&amp;lt;/i&amp;gt; of the cross product of two vectors has a specific value: &amp;lt;math&amp;gt;|\vec{a}\times\vec{b}| = |\vec{a}| \cdot |\vec{b}| \cdot \sin(\theta)&amp;lt;/math&amp;gt;, where &amp;lt;math&amp;gt;\theta&amp;lt;/math&amp;gt; is the angle between the vectors. &lt;br /&gt;
&lt;br /&gt;
The direction of the cross product of two vectors is perpendicular to the plane in which those vectors lie and is given by the [[Right Hand Rule]]. 2D vectors do not have cross products. While the other operations listed here are commutative, associative (where the associative property is defined), and distributive over addition; cross product multiplication is not associative and is anticommutative (&amp;lt;math&amp;gt;\vec{a}\times\vec{b} = -\vec{b}\times\vec{a}&amp;lt;/math&amp;gt;), meaning that if the order of the factors is reversed, their cross product will be reversed in direction.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;For more mathematically-advanced students&amp;lt;/b&amp;gt;, I will invoke some higher-level linear algebra. Recall that the null space, defined as &amp;lt;math&amp;gt;Null(A) = \{ \vec{v} \in \mathbb{R}^n \mid A\vec{v} = \vec{0} \}&amp;lt;/math&amp;gt; for an arbitrary matrix &amp;lt;math&amp;gt;A \in \mathbb{R}^{n \times n}&amp;lt;/math&amp;gt;, is orthogonal, or normal, to its row space. That is, for all &amp;lt;math&amp;gt;\vec{v} \in Null(A)&amp;lt;/math&amp;gt; and for all columns &amp;lt;math&amp;gt;a_{j:}&amp;lt;/math&amp;gt;, we have &amp;lt;math&amp;gt;\sum^n_{i=1} a_{i,j} v_i = 0&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
For two vectors &amp;lt;math&amp;gt;\vec{a},\vec{b} \in \mathbb{R}^{3 \times 1}&amp;lt;/math&amp;gt; (&amp;lt;i&amp;gt;note that this is only valid for 3x1 vectors&amp;lt;/i&amp;gt;), if we think of &amp;lt;math&amp;gt;\vec{a}&amp;lt;/math&amp;gt; as corresponding to a row in a matrix and &amp;lt;math&amp;gt;\vec{b}&amp;lt;/math&amp;gt; to another, then the null space is equivalent to their cross-product. &amp;lt;b&amp;gt;This is why the right-hand rule works.&amp;lt;/b&amp;gt; If we visualize the plane spanned by two vectors with our index and middle fingers, then their null space will be perpendicular to the intersection point of the two vectors, or rather the thumb. Likewise, if we use all of our fingers and our thumb to make an L-shape representing the span of the two vectors, upon curling our fingers, we will have the direction of the cross product, which is orthogonal to the two vectors represented by your thumb and fingers.&lt;br /&gt;
&lt;br /&gt;
====Forms====&lt;br /&gt;
&lt;br /&gt;
The information necessary to describe a specific vector can be presented in several forms.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;Magnitude and direction form&amp;lt;/u&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this form, the magnitude and the direction of the vector are explicitly stated. The statement describing direction might be a cardinal direction (ex. &amp;quot;north&amp;quot;), a direction on a graph (ex. &amp;quot;the +x direction&amp;quot;), or an angle (ex. &amp;quot;210&amp;lt;math&amp;gt;^\circ&amp;lt;/math&amp;gt; from the x axis counterclockwise&amp;quot;), depending on the situation. Magnitude and direction form is often used in word problems because it is easy for humans to understand.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;Component form&amp;lt;/u&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this form, the vector is divided into components, each representing a different coordinate direction. In 2D space, these are the x and y directions. In 3D space, these are the x, y, and z directions. Each component tells how much the vector extends in that particular direction. Often, the three components are written enclosed by angle brackets and separated by commas. For example, the vector &amp;lt;2,0,-3&amp;gt; describes a vector that extends 2 units in the +x direction, 0 units in the y direction, and 3 units in the -z direction. Most vector operations described below can only be performed if the vectors are in component form, so this form may be necessary to do math for certain problems. Furthermore, programming languages store vectors in component form.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;Unit vector form&amp;lt;/u&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this form, the vector is expressed as a sum of unit vectors, each corresponding to a different coordinate direction. The symbols &amp;lt;math&amp;gt;\hat{i}&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;\hat{j}&amp;lt;/math&amp;gt;, and &amp;lt;math&amp;gt;\hat{k}&amp;lt;/math&amp;gt; OR the symbols &amp;lt;math&amp;gt;\hat{x}&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;\hat{y}&amp;lt;/math&amp;gt;, and &amp;lt;math&amp;gt;\hat{z}&amp;lt;/math&amp;gt; are used to represent unit vectors in the x, y, and z directions respectively. Consider the vector &amp;lt;2,0,-3&amp;gt;. It can be expressed in unit vector form as &amp;lt;math&amp;gt;2\hat{i} - 3\hat{k}&amp;lt;/math&amp;gt;, meaning 2 times the x direction unit vector minus 3 times the z direction unit vector (see vector operations). While often considered its own form, unit vector form is very similar to component form, as the information describing the vector is stored in the same values. All references to component form in the rest of this page also apply to unit vector form.&lt;br /&gt;
&lt;br /&gt;
[[File:Vectorsdifferentforms.png]]&lt;br /&gt;
&lt;br /&gt;
Note that regardless of which form is used, an n-dimensional vector requires n values to mathematically describe. For example, consider a 3-dimensional vector. Describing this vector in component form requires an x value, a y value, and a z value. Describing it in magnitude and direction form requires one value to give the magnitude of the vector and two to give the its direction (the direction of a 3D vector could be described using, say, its polar angle &amp;lt;math&amp;gt;\theta&amp;lt;/math&amp;gt; and its azimuthal angle &amp;lt;math&amp;gt;\phi&amp;lt;/math&amp;gt;). A 1-dimensional vector (such as the velocity of a particle whose movement is constrained to the x axis) can be described using only 1 value whose sign indicates the vector&#039;s direction.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;Converting between forms&amp;lt;/u&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is possible to convert vectors from one form to another using simple trigonometry.&lt;br /&gt;
&lt;br /&gt;
To find the magnitude of a vector in component form, use the Pythagorean theorem: add the squares of the components and take the square root of the result. For a 2D vector, &amp;lt;math&amp;gt;|\vec{a}| = \sqrt{a_x^2 + a_y^2}&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
To find the direction of a vector in component form, use inverse trigonometric functions. For a 2D vector, &amp;lt;math&amp;gt;\theta = \tan^{-1}(\frac{a_y}{a_x})&amp;lt;/math&amp;gt;, where &amp;lt;math&amp;gt;\theta&amp;lt;/math&amp;gt; is the angle vector &amp;lt;math&amp;gt;\vec{a}&amp;lt;/math&amp;gt; makes with the x axis in the counterclockwise direction.&lt;br /&gt;
&lt;br /&gt;
To find the components of a vector in magnitude and direction form, use trigonometric functions. For a 2D vector, &amp;lt;math&amp;gt;a_x = |\vec{a}|\cos\theta&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;a_y = |\vec{a}|\sin\theta&amp;lt;/math&amp;gt;, where &amp;lt;math&amp;gt;\theta&amp;lt;/math&amp;gt; is the angle vector &amp;lt;math&amp;gt;\vec{a}&amp;lt;/math&amp;gt; makes with the x axis in the counterclockwise direction.&lt;br /&gt;
&lt;br /&gt;
===A Computational Model===&lt;br /&gt;
&lt;br /&gt;
In VPython, vector objects are in component form; each one has an x, y, and z component. Recall that in VPython, using the default camera orientation, the +x axis points to the right, the +y axis points upwards, and the +z axis points out of the plane of the screen towards the viewer. The constructor for a vector object is the word &amp;quot;vec&amp;quot; or &amp;quot;vector,&amp;quot; and it takes three arguments, which define its x, y and z components respectively. A line to create a vector called &amp;quot;velocity&amp;quot; might look like this:&lt;br /&gt;
&lt;br /&gt;
velocity = vec(3,-1,2)&lt;br /&gt;
&lt;br /&gt;
To access or modify a specific component of a vector object, its name should be followed by a period and an x, y, or z. For example, to change the x component of the above velocity vector from 3 to 5, the following line might be used:&lt;br /&gt;
&lt;br /&gt;
velocity.x = 5&lt;br /&gt;
&lt;br /&gt;
In VPython, vectors have many uses. The position of each object is defined as a vector; the position vector&#039;s tail lies at the origin and its head lies at the center of the object in question. Furthermore, the dimensions of a rectangular prism (a &amp;quot;box&amp;quot; object) are defined as a vector; the x component determines its width, the y component its height, and the z component its thickness.&lt;br /&gt;
&lt;br /&gt;
To graphically represent a vector such as an electric field, &amp;quot;arrow&amp;quot; objects should be used. In addition to taking a position vector (which determines the position of the arrow&#039;s tail), arrow objects take an &amp;quot;axis&amp;quot; vector, which determines their size and shape. To represent a vector, simply make it the axis of an arrow object.&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
===Simple===&lt;br /&gt;
&lt;br /&gt;
Vector &amp;lt;math&amp;gt;\vec{a}&amp;lt;/math&amp;gt; is &amp;lt;2,4,2&amp;gt;. Vector &amp;lt;math&amp;gt;\vec{b}&amp;lt;/math&amp;gt; is &amp;lt;-1,1,3&amp;gt;. What is the magnitude of the vector &amp;lt;math&amp;gt;\vec{a} - 2\vec{b}&amp;lt;/math&amp;gt;?&lt;br /&gt;
&lt;br /&gt;
Solution:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\vec{a} - 2\vec{b} = &amp;lt;2,4,2&amp;gt; - 2 * &amp;lt;-1,1,3&amp;gt; &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; = &amp;lt;2,4,2&amp;gt; - &amp;lt;-2,2,6&amp;gt; &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; = &amp;lt;4,2,-4&amp;gt;&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We  are asked to find the magnitude of this vector, so let us use the Pythagorean theorem with its components:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;|&amp;lt;4,2,-4&amp;gt;| = \sqrt{4^2 + 2^2 + (-4)^2}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; = \sqrt{16 + 4 + 16} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; = \sqrt{36} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; = 6 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Intermediate===&lt;br /&gt;
&lt;br /&gt;
An airplane is travelling in still air at 240m/s in the direction 35&amp;lt;math&amp;gt;^\circ&amp;lt;/math&amp;gt; south of west. A wind begins to blow; the wind has a speed of 80m/s in the direction 15&amp;lt;math&amp;gt;^\circ&amp;lt;/math&amp;gt; east of north. What should be the new velocity of the plane relative to the air around it to maintain its original trajectory? You may give your answer in component form (+x is east, +y is north).&lt;br /&gt;
&lt;br /&gt;
[[File:Vectorsplaneproblem.png]]&lt;br /&gt;
&lt;br /&gt;
Solution:&lt;br /&gt;
&lt;br /&gt;
The vector sum of the new velocity of the plane &amp;lt;math&amp;gt;\vec{v_{p,1}}&amp;lt;/math&amp;gt; and the velocity of the wind &amp;lt;math&amp;gt;\vec{v_w}&amp;lt;/math&amp;gt; should equal the original velocity of the plane &amp;lt;math&amp;gt;\vec{v_{p,0}}&amp;lt;/math&amp;gt; (see [[Relative Velocity]]):&lt;br /&gt;
&lt;br /&gt;
[[File:Vectorsplanesolution.png]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \vec{v_{p,1}} + \vec{v_w} = \vec{v_{p,0}} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \vec{v_{p,1}} = \vec{v_{p,0}} - \vec{v_w} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Let us convert the given vectors to component form for easier subtraction. The +x and +y directions will be east and north respectively.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\vec{v_{p,0}} = &amp;lt;240\cos(215^\circ), 240\sin(215^\circ)&amp;gt;&amp;lt;/math&amp;gt;m/s (35&amp;lt;math&amp;gt;^\circ&amp;lt;/math&amp;gt; south of west is 215&amp;lt;math&amp;gt;^\circ&amp;lt;/math&amp;gt; above the x axis)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\vec{v_{p,0}} = &amp;lt;-196.6, -137.7&amp;gt; &amp;lt;/math&amp;gt;m/s&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\vec{v_w} = &amp;lt;80\cos(75^\circ), 80\sin(75^\circ)&amp;gt;&amp;lt;/math&amp;gt;m/s (15&amp;lt;math&amp;gt;^\circ&amp;lt;/math&amp;gt; east of north is 75&amp;lt;math&amp;gt;^\circ&amp;lt;/math&amp;gt; above the x axis)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\vec{v_w} = &amp;lt;20.7, 77.3&amp;gt; &amp;lt;/math&amp;gt;m/s&lt;br /&gt;
&lt;br /&gt;
Now let us subtract:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \vec{v_{p,1}} = \vec{v_{p,0}} - \vec{v_w} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \vec{v_{p,1}} = &amp;lt;-196.6, -137.7&amp;gt; - &amp;lt;20.7, 77.3&amp;gt; &amp;lt;/math&amp;gt;m/s&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \vec{v_{p,1}} = &amp;lt;-217.3, -214.9&amp;gt; &amp;lt;/math&amp;gt;m/s&lt;br /&gt;
&lt;br /&gt;
===Difficult===&lt;br /&gt;
&lt;br /&gt;
What is the angle between the vectors &amp;lt;2,5,-2&amp;gt; and &amp;lt;3,-4,-1&amp;gt;?&lt;br /&gt;
&lt;br /&gt;
Solution:&lt;br /&gt;
&lt;br /&gt;
The dot product between two vectors is equal to the product of their magnitudes times the cosine of the angle between them. Let us use this property to find the angle between the given vectors.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; &amp;lt;2,5,-2&amp;gt; \cdot &amp;lt;3,-4,-1&amp;gt; = |&amp;lt;2,5,-2&amp;gt;| * |&amp;lt;3,-4,-1&amp;gt;| * \cos\theta &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Rearranging this yields&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \theta = \cos^{-1}\frac{&amp;lt;2,5,-2&amp;gt; \cdot &amp;lt;3,-4,-1&amp;gt;}{|&amp;lt;2,5,-2&amp;gt;| * |&amp;lt;3,-4,-1&amp;gt;|} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Let us evaluate the dot product and simplify:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \theta = \cos^{-1}\frac{2(3) + 5(-4) + (-2)(-1)}{\sqrt{2^2 + 5^2 + (-2)^2} * \sqrt{3^2 + (-4)^2 + (-1)^2}} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \theta = \cos^{-1}\frac{-12}{\sqrt{33 * 26}} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \theta = 114^\circ &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Connectedness==&lt;br /&gt;
&lt;br /&gt;
Vectors are used in many fields and levels of physics. Kinematics, for example, studies the relationships between the position vector and its time derivatives (velocity, acceleration). Force is also a vector quantity, as are certain system properties such as linear and angular momentum. Vector fields are commonly used in electricity and magnetism, as well as in fluid dynamics.&lt;br /&gt;
&lt;br /&gt;
==History==&lt;br /&gt;
&lt;br /&gt;
It is unknown who first developed the idea of vectors, but the oldest known reference to vectors is in the work &amp;lt;i&amp;gt;Mechanics&amp;lt;/i&amp;gt; by Hero of Alexandria (first century AD), which described their addition. At this point, however, the idea of a vector was little more than a line segment with a specific orientation; they had a length extending from one point in physical space to another but were not used to represent anything else.&lt;br /&gt;
&lt;br /&gt;
In the early 19th century, several mathematicians and physicists (including Caspar Wessel (1745-1818), Jean Robert Argand (1768-1822), Carl Friedrich Gauss (1777-1855)), and William Rowan Hamilton (1805-1865) used 2D vectors to represent complex numbers; one component would represent the real value and another would represent the imaginary value. Hamilton would also become the first to use the word &amp;quot;vector.&amp;quot; August Ferdinand Möbius (1790-1868) contributed to vector math in his 1827 book &amp;lt;i&amp;gt;The Barycentric Calculus&amp;lt;/i&amp;gt;, in which he developed the convention of labeling vectors with letters and defined the multiplication of a vector by a scalar. Hermann Grassmann (1809-1877) wrote in his 1844 book &amp;lt;i&amp;gt;Ausdehnungslehre&amp;lt;/i&amp;gt; (German for &amp;quot;The Calculus of Extension&amp;quot;) that vectors could exist in space of any number of dimensions and described much of what would become linear algebra, which makes ample use of vectors.&lt;br /&gt;
&lt;br /&gt;
The modern language and conventions surrounding vectors come largely from notes created by J. Willard Gibbs (1839--1903), a professor at Yale University.&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
===External links===&lt;br /&gt;
Mathematical Computations on Vectors: [http://ocw.mit.edu/courses/mathematics/18-02sc-multivariable-calculus-fall-2010/1.-vectors-and-matrices/part-a-vectors-determinants-and-planes/session-1-vectors/MIT18_02SC_notes_0.pdf [http://ocw.mit.edu/courses/mathematics/18-02sc-multivariable-calculus-fall-2010/1.-vectors-and-matrices/part-a-vectors-determinants-and-planes/session-1-vectors/MIT18_02SC_notes_0.pdf]&lt;br /&gt;
&lt;br /&gt;
Computational Work with Vectors: [http://vpython.org/contents/docs/vector.html http://vpython.org/contents/docs/vector.html]&lt;br /&gt;
&lt;br /&gt;
Basics of Vectors: [https://www.physics.uoguelph.ca/tutorials/vectors/vectors.html https://www.physics.uoguelph.ca/tutorials/vectors/vectors.html]&lt;br /&gt;
&lt;br /&gt;
===Further Reading===&lt;br /&gt;
&lt;br /&gt;
Vector Analysis by Josiah Willard Gibbs&lt;br /&gt;
&lt;br /&gt;
Introduction to Matrices and Vectors by Jacob T. Schwartz&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
[https://www.mathsisfun.com/algebra/vectors.html https://www.mathsisfun.com/algebra/vectors.html]&lt;br /&gt;
&lt;br /&gt;
[http://ocw.mit.edu/courses/mathematics/18-02sc-multivariable-calculus-fall-2010/1.-vectors-and-matrices/part-a-vectors-determinants-and-planes/session-1-vectors/MIT18_02SC_notes_0.pdf http://ocw.mit.edu/courses/mathematics/18-02sc-multivariable-calculus-fall-2010/1.-vectors-and-matrices/part-a-vectors-determinants-and-planes/session-1-vectors/MIT18_02SC_notes_0.pdf ]&lt;br /&gt;
&lt;br /&gt;
[http://mathinsight.org/vector_introduction http://mathinsight.org/vector_introduction]&lt;br /&gt;
&lt;br /&gt;
[http://www.math.mcgill.ca/labute/courses/133f03/VectorHistory.html http://www.math.mcgill.ca/labute/courses/133f03/VectorHistory.html]&lt;br /&gt;
&lt;br /&gt;
[[Category: Geometry]]&lt;/div&gt;</summary>
		<author><name>Zsanchez6</name></author>
	</entry>
	<entry>
		<id>http://www.physicsbook.gatech.edu/index.php?title=Python_Syntax&amp;diff=30160</id>
		<title>Python Syntax</title>
		<link rel="alternate" type="text/html" href="http://www.physicsbook.gatech.edu/index.php?title=Python_Syntax&amp;diff=30160"/>
		<updated>2017-11-29T18:18:45Z</updated>

		<summary type="html">&lt;p&gt;Zsanchez6: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Edited by Zach Sanchez - Fall 2017&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==The Main Idea==&lt;br /&gt;
VPython is an extension of the Python programming language that contains a 3D graphics module called Visual, which allows users to create simple simulations of physics problems. Its primary use is for educational purposes, although it has been used in research before in the past. We will use VPython on occasion to aid us in visualizing and experimenting with the ideas that we learn in this course.&lt;br /&gt;
&lt;br /&gt;
==Downloading vPython==&lt;br /&gt;
In all cases you will need to have Python 2.7.9 installed. Future versions may also work, but be warned that it may cause VPython to behave erratically.&lt;br /&gt;
&lt;br /&gt;
[http://vpython.org/contents/download_windows.html For Windows]&lt;br /&gt;
&lt;br /&gt;
[http://vpython.org/contents/download_mac.html For Mac]&lt;br /&gt;
&lt;br /&gt;
[http://vpython.org/contents/download_linux.html For Linux]&lt;br /&gt;
&lt;br /&gt;
Note for Linux: You can only install Classic VPython, which is no longer supported and may be missing some features and bug fixes that are present in the current version of VPython.&lt;br /&gt;
&lt;br /&gt;
Alternatively, you can use GlowScript, a virtual environment that allows you to execute VPython code in your browser. You can create an account at [http://www.glowscript.org/ http://www.glowscript.org/].&lt;br /&gt;
&lt;br /&gt;
==Python Basics==&lt;br /&gt;
It&#039;s always helpful to have a background knowledge of Python, however basic, before proceeding with the applications more relevant to this course.&lt;br /&gt;
&lt;br /&gt;
    # Comments start with a number symbol. Use these liberally in order to keep track of the changes you make/the code you write.&lt;br /&gt;
    # We&#039;re always going to start our programs with the following headers to ensure that math works correctly.&lt;br /&gt;
    from__future__ import division&lt;br /&gt;
    from visual import*&lt;br /&gt;
&lt;br /&gt;
    # Math works as you would expect.&lt;br /&gt;
    1 + 1  # -&amp;gt; 2&lt;br /&gt;
    2 - 1  # -&amp;gt; 1&lt;br /&gt;
    3 * 2  # -&amp;gt; 6&lt;br /&gt;
    8 / 4  # -&amp;gt; 4&lt;br /&gt;
    (1 + 3) * 2  # -&amp;gt; 8&lt;br /&gt;
    1 + (3 * 2)  # -&amp;gt; 7&lt;br /&gt;
&lt;br /&gt;
    # That is, until you need to do an exponent. But you shouldn&#039;t encounter anything much weirder than that math-wise.&lt;br /&gt;
    2 ** 3  # -&amp;gt; 8&lt;br /&gt;
&lt;br /&gt;
    # There&#039;s also various math functions you can use, such as for finding the square root.&lt;br /&gt;
    sqrt(4) # -&amp;gt; 2&lt;br /&gt;
&lt;br /&gt;
    # However, these math operations are useless if we don&#039;t store the values anywhere.&lt;br /&gt;
    x = 1 + 1&lt;br /&gt;
    # Now if you try to access x in the future, it will have the value of &#039;2&#039;.&lt;br /&gt;
&lt;br /&gt;
    # You can print your variables like this:&lt;br /&gt;
    print(x)&lt;br /&gt;
    # You can also add in some text with them like this:&lt;br /&gt;
    print(&amp;quot;The value of x is &amp;quot;, x)&lt;br /&gt;
&lt;br /&gt;
    # Sometimes we only want to execute something based on a certain condition.&lt;br /&gt;
    if x == 2:&lt;br /&gt;
        y = 3&lt;br /&gt;
    # The &#039;==&#039; means that you&#039;re directly comparing two values. If they&#039;re equal, whatever is on the inside of the if-statement will be executed.&lt;br /&gt;
    # Now is a good time to note that whitespace is very important in Python.&lt;br /&gt;
    # &#039;y = 3&#039; will always execute if it isn&#039;t tabbed, so even if x is equal to 7, y will still become 3.&lt;br /&gt;
    # If you ever see me use whitespace in this tutorial, make sure you do as well.&lt;br /&gt;
    # Some other useful comparators: != (not equal), &amp;gt;, &amp;gt;= (greater than or equal to), &amp;lt;, &amp;lt;= (less than or equal to), &#039;and&#039;, &#039;or&#039;, &#039;not&#039;&lt;br /&gt;
    # You can add onto the above if-statement by tacking on:&lt;br /&gt;
    elif x == 3:&lt;br /&gt;
        y = 4&lt;br /&gt;
    else:&lt;br /&gt;
        y = 5&lt;br /&gt;
    # With elif meaning &amp;quot;else if&amp;quot; for a second possible condition, and &amp;quot;else&amp;quot; for something that you want to execute if none of the earlier conditions are met.&lt;br /&gt;
&lt;br /&gt;
    # You can also have a loop that executes code for a certain amount of time or based on a certain condition.&lt;br /&gt;
    while x &amp;lt; 5:&lt;br /&gt;
        print(&amp;quot;x is &amp;quot;, x)&lt;br /&gt;
        x = x + 1&lt;br /&gt;
    # This will output the value of x up until it reaches 4.&lt;br /&gt;
&lt;br /&gt;
Thus concludes our very, very brief foray into Python. That was simply the bare minimum required to understand what will be needed for this class. More concepts will be introduced as needed, whether that be in this tutorial or in a lab. For a more complete understanding of Python, you can look up other Python tutorials elsewhere on the Internet.&lt;br /&gt;
&lt;br /&gt;
==VPython Basics==&lt;br /&gt;
&lt;br /&gt;
In this section we will analyze some of the objects utilized by VPython. Each object is more or less self-explanatory with equally clear fields within.&lt;br /&gt;
&lt;br /&gt;
    # The scene has a width and a height; you can set them like so.&lt;br /&gt;
    scene.width = 1024&lt;br /&gt;
    scene.height = 760&lt;br /&gt;
&lt;br /&gt;
    # Beyond that, we have vectors.&lt;br /&gt;
    # You can access each component with pos.x, pos.y, or pos.z depending on which component you want.&lt;br /&gt;
    # Now would be a good time to mention that you access an object&#039;s field with a period following the variable name.&lt;br /&gt;
    pos = vector(0, 0, 0)&lt;br /&gt;
    xComponent = pos.x&lt;br /&gt;
    yComponent = pos.y&lt;br /&gt;
    zComponent = pos.z&lt;br /&gt;
&lt;br /&gt;
    # You can add two or more vectors together and you can multiply a vector by a scalar,&lt;br /&gt;
    # but you can&#039;t add a scalar to a vector.&lt;br /&gt;
    # To get the magnitude of or to normalize a vector, use the appropriate function.&lt;br /&gt;
    initialPos = vector(10, 3, 0)&lt;br /&gt;
    finalPos = vector(30, 15, 0)&lt;br /&gt;
    deltaR = finalPos - initialPos # -&amp;gt; vector(20, 12, 0)&lt;br /&gt;
    rMag = mag(finalPos)&lt;br /&gt;
    rHat = norm(finalPos)&lt;br /&gt;
    errorDemo = magR + finalPos # -&amp;gt; error; causes your program to crash&lt;br /&gt;
&lt;br /&gt;
    # If you were to make, say, a ball, you would want to draw a sphere.&lt;br /&gt;
    # It has a position field, a radius field, and a color field.&lt;br /&gt;
    # When creating a new instance of an object, each field is comma separated.&lt;br /&gt;
    # You access each field the same way as we did with the position vector.&lt;br /&gt;
    ball = sphere(pos = vector(10, 10, 10), radius = 9e2, color = color.red)&lt;br /&gt;
    ballColor = ball.color&lt;br /&gt;
    ballPos = ball.pos&lt;br /&gt;
    ballRadius = ball.radius&lt;br /&gt;
&lt;br /&gt;
    # You can draw arrows.&lt;br /&gt;
    # These also have a color and position field, but instead of a radius, they have an axis that determines their length.&lt;br /&gt;
    velocityArrow = arrow(color = color.blue, pos = vector(-10, -10, -10), axis = velocity * vScale)&lt;br /&gt;
&lt;br /&gt;
    # There are also boxes.&lt;br /&gt;
    # They have a position vector and a size vector.&lt;br /&gt;
    myBox = box(pos = vector(50, 50, 50), size = vector(20, 15, 12))&lt;br /&gt;
&lt;br /&gt;
    # You can draw helixes, which are useful for depicting springs.&lt;br /&gt;
    # They have a position field, a color field, a thickness field, a radius field, and a field for the number of coils.&lt;br /&gt;
    spring = helix(pos=ceiling.pos, color=color.cyan, thickness=.003, coils=40, radius=0.015)&lt;br /&gt;
&lt;br /&gt;
    # If you want to trace a moving object, you can have a curve follow it by adding to it every time step.&lt;br /&gt;
    posTrace = curve(color = color.yellow)&lt;br /&gt;
    trail.append(ball.pos)&lt;br /&gt;
&lt;br /&gt;
    # You also have the option of making graphs as your program progresses; this is particularly useful for potential vs kinetic energy.&lt;br /&gt;
    Kgraph = gcurve(color = color.cyan)&lt;br /&gt;
    Ugraph = gcurve(color = color.yellow)&lt;br /&gt;
    KplusUgraph = gcurve(color = color.red)&lt;br /&gt;
    # For each time step...&lt;br /&gt;
    Kgraph.plot(pos = (t, Kenergy))&lt;br /&gt;
    Ugraph.plot(pos = (t, Uenergy))&lt;br /&gt;
    KplusUgraph.plot(pos = (t, Kenergy + Uenergy))&lt;br /&gt;
&lt;br /&gt;
By updating the fields of whatever objects you decide to use and by using any intermediate variables necessary, you&#039;re able to draw and compute what you&#039;ll need for this course.&lt;/div&gt;</summary>
		<author><name>Zsanchez6</name></author>
	</entry>
	<entry>
		<id>http://www.physicsbook.gatech.edu/index.php?title=Python_Syntax&amp;diff=30159</id>
		<title>Python Syntax</title>
		<link rel="alternate" type="text/html" href="http://www.physicsbook.gatech.edu/index.php?title=Python_Syntax&amp;diff=30159"/>
		<updated>2017-11-29T18:15:07Z</updated>

		<summary type="html">&lt;p&gt;Zsanchez6: /* VPython Basics */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Edited by Zach Sanchez - Fall 2017 (in progress)&lt;br /&gt;
&lt;br /&gt;
==The Main Idea==&lt;br /&gt;
VPython is an extension of the Python programming language that contains a 3D graphics module called Visual, which allows users to create simple simulations of physics problems. Its primary use is for educational purposes, although it has been used in research before in the past. We will use VPython on occasion to aid us in visualizing and experimenting with the ideas that we learn in this course.&lt;br /&gt;
&lt;br /&gt;
==Downloading vPython==&lt;br /&gt;
In all cases you will need to have Python 2.7.9 installed. Future versions may also work, but be warned that it may cause VPython to behave erratically.&lt;br /&gt;
&lt;br /&gt;
[http://vpython.org/contents/download_windows.html For Windows]&lt;br /&gt;
&lt;br /&gt;
[http://vpython.org/contents/download_mac.html For Mac]&lt;br /&gt;
&lt;br /&gt;
[http://vpython.org/contents/download_linux.html For Linux]&lt;br /&gt;
&lt;br /&gt;
Note for Linux: You can only install Classic VPython, which is no longer supported and may be missing some features and bug fixes that are present in the current version of VPython.&lt;br /&gt;
&lt;br /&gt;
Alternatively, you can use GlowScript, a virtual environment that allows you to execute VPython code in your browser. You can create an account at [http://www.glowscript.org/ http://www.glowscript.org/].&lt;br /&gt;
&lt;br /&gt;
==Python Basics==&lt;br /&gt;
It&#039;s always helpful to have a background knowledge of Python, however basic, before proceeding with the applications more relevant to this course.&lt;br /&gt;
&lt;br /&gt;
    # Comments start with a number symbol. Use these liberally in order to keep track of the changes you make/the code you write.&lt;br /&gt;
    # We&#039;re always going to start our programs with the following headers to ensure that math works correctly.&lt;br /&gt;
    from__future__ import division&lt;br /&gt;
    from visual import*&lt;br /&gt;
&lt;br /&gt;
    # Math works as you would expect.&lt;br /&gt;
    1 + 1  # -&amp;gt; 2&lt;br /&gt;
    2 - 1  # -&amp;gt; 1&lt;br /&gt;
    3 * 2  # -&amp;gt; 6&lt;br /&gt;
    8 / 4  # -&amp;gt; 4&lt;br /&gt;
    (1 + 3) * 2  # -&amp;gt; 8&lt;br /&gt;
    1 + (3 * 2)  # -&amp;gt; 7&lt;br /&gt;
&lt;br /&gt;
    # That is, until you need to do an exponent. But you shouldn&#039;t encounter anything much weirder than that math-wise.&lt;br /&gt;
    2 ** 3  # -&amp;gt; 8&lt;br /&gt;
&lt;br /&gt;
    # There&#039;s also various math functions you can use, such as for finding the square root.&lt;br /&gt;
    sqrt(4) # -&amp;gt; 2&lt;br /&gt;
&lt;br /&gt;
    # However, these math operations are useless if we don&#039;t store the values anywhere.&lt;br /&gt;
    x = 1 + 1&lt;br /&gt;
    # Now if you try to access x in the future, it will have the value of &#039;2&#039;.&lt;br /&gt;
&lt;br /&gt;
    # You can print your variables like this:&lt;br /&gt;
    print(x)&lt;br /&gt;
    # You can also add in some text with them like this:&lt;br /&gt;
    print(&amp;quot;The value of x is &amp;quot;, x)&lt;br /&gt;
&lt;br /&gt;
    # Sometimes we only want to execute something based on a certain condition.&lt;br /&gt;
    if x == 2:&lt;br /&gt;
        y = 3&lt;br /&gt;
    # The &#039;==&#039; means that you&#039;re directly comparing two values. If they&#039;re equal, whatever is on the inside of the if-statement will be executed.&lt;br /&gt;
    # Now is a good time to note that whitespace is very important in Python.&lt;br /&gt;
    # &#039;y = 3&#039; will always execute if it isn&#039;t tabbed, so even if x is equal to 7, y will still become 3.&lt;br /&gt;
    # If you ever see me use whitespace in this tutorial, make sure you do as well.&lt;br /&gt;
    # Some other useful comparators: != (not equal), &amp;gt;, &amp;gt;= (greater than or equal to), &amp;lt;, &amp;lt;= (less than or equal to), &#039;and&#039;, &#039;or&#039;, &#039;not&#039;&lt;br /&gt;
    # You can add onto the above if-statement by tacking on:&lt;br /&gt;
    elif x == 3:&lt;br /&gt;
        y = 4&lt;br /&gt;
    else:&lt;br /&gt;
        y = 5&lt;br /&gt;
    # With elif meaning &amp;quot;else if&amp;quot; for a second possible condition, and &amp;quot;else&amp;quot; for something that you want to execute if none of the earlier conditions are met.&lt;br /&gt;
&lt;br /&gt;
    # You can also have a loop that executes code for a certain amount of time or based on a certain condition.&lt;br /&gt;
    while x &amp;lt; 5:&lt;br /&gt;
        print(&amp;quot;x is &amp;quot;, x)&lt;br /&gt;
        x = x + 1&lt;br /&gt;
    # This will output the value of x up until it reaches 4.&lt;br /&gt;
&lt;br /&gt;
Thus concludes our very, very brief foray into Python. That was simply the bare minimum required to understand what will be needed for this class. More concepts will be introduced as needed, whether that be in this tutorial or in a lab. For a more complete understanding of Python, you can look up other Python tutorials elsewhere on the Internet.&lt;br /&gt;
&lt;br /&gt;
==VPython Basics==&lt;br /&gt;
&lt;br /&gt;
In this section we will analyze some of the objects utilized by VPython. Each object is more or less self-explanatory with equally clear fields within.&lt;br /&gt;
&lt;br /&gt;
    # The scene has a width and a height; you can set them like so.&lt;br /&gt;
    scene.width = 1024&lt;br /&gt;
    scene.height = 760&lt;br /&gt;
&lt;br /&gt;
    # Beyond that, we have vectors.&lt;br /&gt;
    # You can access each component with pos.x, pos.y, or pos.z depending on which component you want.&lt;br /&gt;
    # Now would be a good time to mention that you access an object&#039;s field with a period following the variable name.&lt;br /&gt;
    pos = vector(0, 0, 0)&lt;br /&gt;
    xComponent = pos.x&lt;br /&gt;
    yComponent = pos.y&lt;br /&gt;
    zComponent = pos.z&lt;br /&gt;
&lt;br /&gt;
    # You can add two or more vectors together and you can multiply a vector by a scalar,&lt;br /&gt;
    # but you can&#039;t add a scalar to a vector.&lt;br /&gt;
    # To get the magnitude of or to normalize a vector, use the appropriate function.&lt;br /&gt;
    initialPos = vector(10, 3, 0)&lt;br /&gt;
    finalPos = vector(30, 15, 0)&lt;br /&gt;
    deltaR = finalPos - initialPos # -&amp;gt; vector(20, 12, 0)&lt;br /&gt;
    rMag = mag(finalPos)&lt;br /&gt;
    rHat = norm(finalPos)&lt;br /&gt;
    errorDemo = magR + finalPos # -&amp;gt; error; causes your program to crash&lt;br /&gt;
&lt;br /&gt;
    # If you were to make, say, a ball, you would want to draw a sphere.&lt;br /&gt;
    # It has a position field, a radius field, and a color field.&lt;br /&gt;
    # When creating a new instance of an object, each field is comma separated.&lt;br /&gt;
    # You access each field the same way as we did with the position vector.&lt;br /&gt;
    ball = sphere(pos = vector(10, 10, 10), radius = 9e2, color = color.red)&lt;br /&gt;
    ballColor = ball.color&lt;br /&gt;
    ballPos = ball.pos&lt;br /&gt;
    ballRadius = ball.radius&lt;br /&gt;
&lt;br /&gt;
    # You can draw arrows.&lt;br /&gt;
    # These also have a color and position field, but instead of a radius, they have an axis that determines their length.&lt;br /&gt;
    velocityArrow = arrow(color = color.blue, pos = vector(-10, -10, -10), axis = velocity * vScale)&lt;br /&gt;
&lt;br /&gt;
    # There are also boxes.&lt;br /&gt;
    # They have a position vector and a size vector.&lt;br /&gt;
    myBox = box(pos = vector(50, 50, 50), size = vector(20, 15, 12))&lt;br /&gt;
&lt;br /&gt;
    # You can draw helixes, which are useful for depicting springs.&lt;br /&gt;
    # They have a position field, a color field, a thickness field, a radius field, and a field for the number of coils.&lt;br /&gt;
    spring = helix(pos=ceiling.pos, color=color.cyan, thickness=.003, coils=40, radius=0.015)&lt;br /&gt;
&lt;br /&gt;
    # If you want to trace a moving object, you can have a curve follow it by adding to it every time step.&lt;br /&gt;
    posTrace = curve(color = color.yellow)&lt;br /&gt;
    trail.append(ball.pos)&lt;br /&gt;
&lt;br /&gt;
    # You also have the option of making graphs as your program progresses; this is particularly useful for potential vs kinetic energy.&lt;br /&gt;
    Kgraph = gcurve(color = color.cyan)&lt;br /&gt;
    Ugraph = gcurve(color = color.yellow)&lt;br /&gt;
    KplusUgraph = gcurve(color = color.red)&lt;br /&gt;
    # For each time step...&lt;br /&gt;
    Kgraph.plot(pos = (t, Kenergy))&lt;br /&gt;
    Ugraph.plot(pos = (t, Uenergy))&lt;br /&gt;
    KplusUgraph.plot(pos = (t, Kenergy + Uenergy))&lt;br /&gt;
&lt;br /&gt;
By updating the fields of whatever objects you decide to use and by using any intermediate variables necessary, you&#039;re able to draw and compute what you&#039;ll need for this course.&lt;/div&gt;</summary>
		<author><name>Zsanchez6</name></author>
	</entry>
	<entry>
		<id>http://www.physicsbook.gatech.edu/index.php?title=Python_Syntax&amp;diff=30158</id>
		<title>Python Syntax</title>
		<link rel="alternate" type="text/html" href="http://www.physicsbook.gatech.edu/index.php?title=Python_Syntax&amp;diff=30158"/>
		<updated>2017-11-29T18:10:09Z</updated>

		<summary type="html">&lt;p&gt;Zsanchez6: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Edited by Zach Sanchez - Fall 2017 (in progress)&lt;br /&gt;
&lt;br /&gt;
==The Main Idea==&lt;br /&gt;
VPython is an extension of the Python programming language that contains a 3D graphics module called Visual, which allows users to create simple simulations of physics problems. Its primary use is for educational purposes, although it has been used in research before in the past. We will use VPython on occasion to aid us in visualizing and experimenting with the ideas that we learn in this course.&lt;br /&gt;
&lt;br /&gt;
==Downloading vPython==&lt;br /&gt;
In all cases you will need to have Python 2.7.9 installed. Future versions may also work, but be warned that it may cause VPython to behave erratically.&lt;br /&gt;
&lt;br /&gt;
[http://vpython.org/contents/download_windows.html For Windows]&lt;br /&gt;
&lt;br /&gt;
[http://vpython.org/contents/download_mac.html For Mac]&lt;br /&gt;
&lt;br /&gt;
[http://vpython.org/contents/download_linux.html For Linux]&lt;br /&gt;
&lt;br /&gt;
Note for Linux: You can only install Classic VPython, which is no longer supported and may be missing some features and bug fixes that are present in the current version of VPython.&lt;br /&gt;
&lt;br /&gt;
Alternatively, you can use GlowScript, a virtual environment that allows you to execute VPython code in your browser. You can create an account at [http://www.glowscript.org/ http://www.glowscript.org/].&lt;br /&gt;
&lt;br /&gt;
==Python Basics==&lt;br /&gt;
It&#039;s always helpful to have a background knowledge of Python, however basic, before proceeding with the applications more relevant to this course.&lt;br /&gt;
&lt;br /&gt;
    # Comments start with a number symbol. Use these liberally in order to keep track of the changes you make/the code you write.&lt;br /&gt;
    # We&#039;re always going to start our programs with the following headers to ensure that math works correctly.&lt;br /&gt;
    from__future__ import division&lt;br /&gt;
    from visual import*&lt;br /&gt;
&lt;br /&gt;
    # Math works as you would expect.&lt;br /&gt;
    1 + 1  # -&amp;gt; 2&lt;br /&gt;
    2 - 1  # -&amp;gt; 1&lt;br /&gt;
    3 * 2  # -&amp;gt; 6&lt;br /&gt;
    8 / 4  # -&amp;gt; 4&lt;br /&gt;
    (1 + 3) * 2  # -&amp;gt; 8&lt;br /&gt;
    1 + (3 * 2)  # -&amp;gt; 7&lt;br /&gt;
&lt;br /&gt;
    # That is, until you need to do an exponent. But you shouldn&#039;t encounter anything much weirder than that math-wise.&lt;br /&gt;
    2 ** 3  # -&amp;gt; 8&lt;br /&gt;
&lt;br /&gt;
    # There&#039;s also various math functions you can use, such as for finding the square root.&lt;br /&gt;
    sqrt(4) # -&amp;gt; 2&lt;br /&gt;
&lt;br /&gt;
    # However, these math operations are useless if we don&#039;t store the values anywhere.&lt;br /&gt;
    x = 1 + 1&lt;br /&gt;
    # Now if you try to access x in the future, it will have the value of &#039;2&#039;.&lt;br /&gt;
&lt;br /&gt;
    # You can print your variables like this:&lt;br /&gt;
    print(x)&lt;br /&gt;
    # You can also add in some text with them like this:&lt;br /&gt;
    print(&amp;quot;The value of x is &amp;quot;, x)&lt;br /&gt;
&lt;br /&gt;
    # Sometimes we only want to execute something based on a certain condition.&lt;br /&gt;
    if x == 2:&lt;br /&gt;
        y = 3&lt;br /&gt;
    # The &#039;==&#039; means that you&#039;re directly comparing two values. If they&#039;re equal, whatever is on the inside of the if-statement will be executed.&lt;br /&gt;
    # Now is a good time to note that whitespace is very important in Python.&lt;br /&gt;
    # &#039;y = 3&#039; will always execute if it isn&#039;t tabbed, so even if x is equal to 7, y will still become 3.&lt;br /&gt;
    # If you ever see me use whitespace in this tutorial, make sure you do as well.&lt;br /&gt;
    # Some other useful comparators: != (not equal), &amp;gt;, &amp;gt;= (greater than or equal to), &amp;lt;, &amp;lt;= (less than or equal to), &#039;and&#039;, &#039;or&#039;, &#039;not&#039;&lt;br /&gt;
    # You can add onto the above if-statement by tacking on:&lt;br /&gt;
    elif x == 3:&lt;br /&gt;
        y = 4&lt;br /&gt;
    else:&lt;br /&gt;
        y = 5&lt;br /&gt;
    # With elif meaning &amp;quot;else if&amp;quot; for a second possible condition, and &amp;quot;else&amp;quot; for something that you want to execute if none of the earlier conditions are met.&lt;br /&gt;
&lt;br /&gt;
    # You can also have a loop that executes code for a certain amount of time or based on a certain condition.&lt;br /&gt;
    while x &amp;lt; 5:&lt;br /&gt;
        print(&amp;quot;x is &amp;quot;, x)&lt;br /&gt;
        x = x + 1&lt;br /&gt;
    # This will output the value of x up until it reaches 4.&lt;br /&gt;
&lt;br /&gt;
Thus concludes our very, very brief foray into Python. That was simply the bare minimum required to understand what will be needed for this class. More concepts will be introduced as needed, whether that be in this tutorial or in a lab. For a more complete understanding of Python, you can look up other Python tutorials elsewhere on the Internet.&lt;br /&gt;
&lt;br /&gt;
==VPython Basics==&lt;br /&gt;
&lt;br /&gt;
In this section we will analyze some of the objects utilized by VPython. Each object is more or less self-explanatory with equally clear fields within.&lt;br /&gt;
&lt;br /&gt;
    # The scene has a width and a height; you can set them like so.&lt;br /&gt;
    scene.width = 1024&lt;br /&gt;
    scene.height = 760&lt;br /&gt;
&lt;br /&gt;
    # Beyond that, we have vectors.&lt;br /&gt;
    # You can access each component with pos.x, pos.y, or pos.z depending on which component you want.&lt;br /&gt;
    # Now would be a good time to mention that you access an object&#039;s field with a period following the variable name.&lt;br /&gt;
    pos = vector(0, 0, 0)&lt;br /&gt;
    xComponent = pos.x&lt;br /&gt;
    yComponent = pos.y&lt;br /&gt;
    zComponent = pos.z&lt;br /&gt;
&lt;br /&gt;
    # You can add two or more vectors together and you can multiply a vector by a scalar,&lt;br /&gt;
    # but you can&#039;t add a scalar to a vector.&lt;br /&gt;
    # To get the magnitude of or to normalize a vector, use the appropriate function.&lt;br /&gt;
    initialPos = vector(10, 3, 0)&lt;br /&gt;
    finalPos = vector(30, 15, 0)&lt;br /&gt;
    deltaR = finalPos - initialPos # -&amp;gt; vector(20, 12, 0)&lt;br /&gt;
    rMag = mag(finalPos)&lt;br /&gt;
    rHat = norm(finalPos)&lt;br /&gt;
    errorDemo = magR + finalPos # -&amp;gt; error; causes your program to crash&lt;br /&gt;
&lt;br /&gt;
    # If you were to make, say, a ball, you would want to draw a sphere.&lt;br /&gt;
    # It has a position field, a radius field, and a color field.&lt;br /&gt;
    # When creating a new instance of an object, each field is comma separated.&lt;br /&gt;
    # You access each field the same way as we did with the position vector.&lt;br /&gt;
    ball = sphere(pos = vector(10, 10, 10), radius = 9e2, color = color.red)&lt;br /&gt;
    ballColor = ball.color&lt;br /&gt;
    ballPos = ball.pos&lt;br /&gt;
    ballRadius = ball.radius&lt;br /&gt;
&lt;br /&gt;
    # You can draw arrows.&lt;br /&gt;
    # These also have a color and position field, but instead of a radius, they have an axis that determines their length.&lt;br /&gt;
    velocityArrow = arrow(color = color.blue, pos = vector(-10, -10, -10), axis = velocity * vScale)&lt;br /&gt;
&lt;br /&gt;
    # There are also boxes.&lt;br /&gt;
    # They have a position vector and a size vector.&lt;br /&gt;
    myBox = box(pos = vector(50, 50, 50), size = vector(20, 15, 12))&lt;br /&gt;
&lt;br /&gt;
    # You can draw helixes, which are useful for depicting springs.&lt;br /&gt;
    # They have a position field, a color field, a thickness field, a radius field, and a field for the number of coils.&lt;br /&gt;
    spring = helix(pos=ceiling.pos, color=color.cyan, thickness=.003, coils=40, radius=0.015)&lt;br /&gt;
&lt;br /&gt;
    # If you want to trace a moving object, you can have a curve follow it by adding to it every time step.&lt;br /&gt;
    posTrace = curve(color = color.yellow)&lt;br /&gt;
    trail.append(ball.pos)&lt;br /&gt;
&lt;br /&gt;
    # You also have the option of making graphs as your program progresses; this is particularly useful for potential vs kinetic energy.&lt;br /&gt;
    Kgraph = gcurve(color = color.cyan)&lt;br /&gt;
    Ugraph = gcurve(color = color.yellow)&lt;br /&gt;
    KplusUgraph = gcurve(color = color.red)&lt;br /&gt;
    # For each time step...&lt;br /&gt;
    Kgraph.plot(pos = (t, Kenergy))&lt;br /&gt;
    Ugraph.plot(pos = (t, Uenergy))&lt;br /&gt;
    KplusUgraph.plot(pos = (t, Kenergy + Uenergy))&lt;br /&gt;
&lt;br /&gt;
Using all of these concepts, you&#039;re able to draw and compute what you&#039;ll need for this course.&lt;/div&gt;</summary>
		<author><name>Zsanchez6</name></author>
	</entry>
	<entry>
		<id>http://www.physicsbook.gatech.edu/index.php?title=Python_Syntax&amp;diff=29190</id>
		<title>Python Syntax</title>
		<link rel="alternate" type="text/html" href="http://www.physicsbook.gatech.edu/index.php?title=Python_Syntax&amp;diff=29190"/>
		<updated>2017-11-01T19:49:25Z</updated>

		<summary type="html">&lt;p&gt;Zsanchez6: Added a basic Python tutorial, cleaned up the page some. Will be back to clean up some more and improve upon the VPython tutorial itself.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
Edited by Zach Sanchez - Fall 2017 (in progress)&lt;br /&gt;
&lt;br /&gt;
==The Main Idea==&lt;br /&gt;
VPython is an extension of the Python programming language that contains a 3D graphics module called Visual, which allows users to create simple simulations of physics problems. Its primary use is for educational purposes, although it has been used in research before in the past. We will use VPython on occasion to aid us in visualizing and experimenting with the ideas that we learn in this course. &lt;br /&gt;
&lt;br /&gt;
==Downloading vPython==&lt;br /&gt;
In all cases you will need to have Python 2.7.9 installed. Future versions may also work, but be warned that it may cause VPython to behave erratically.&lt;br /&gt;
&lt;br /&gt;
[http://vpython.org/contents/download_windows.html For Windows]&lt;br /&gt;
&lt;br /&gt;
[http://vpython.org/contents/download_mac.html For Mac]&lt;br /&gt;
&lt;br /&gt;
[http://vpython.org/contents/download_linux.html For Linux]&lt;br /&gt;
&lt;br /&gt;
Note for Linux: You can only install Classic VPython, which is no longer supported and may be missing some features and bug fixes that are present in the current version of VPython.&lt;br /&gt;
&lt;br /&gt;
Alternatively, you can use GlowScript, a virtual environment that allows you to execute VPython code in your browser. You can create an account at [http://www.glowscript.org/ http://www.glowscript.org/].&lt;br /&gt;
&lt;br /&gt;
==Python Basics==&lt;br /&gt;
It&#039;s always helpful to have a background knowledge of Python, however basic, before proceeding with the applications more relevant to this course.&lt;br /&gt;
&lt;br /&gt;
    # Comments start with a number symbol. Use these liberally in order to keep track of the changes you make/the code you write.&lt;br /&gt;
    # We&#039;re always going to start our programs with the following headers to ensure that math works correctly.&lt;br /&gt;
    from__future__ import division&lt;br /&gt;
    from visual import*&lt;br /&gt;
&lt;br /&gt;
    # Math works as you would expect.&lt;br /&gt;
    1 + 1  # -&amp;gt; 2&lt;br /&gt;
    2 - 1  # -&amp;gt; 1&lt;br /&gt;
    3 * 2  # -&amp;gt; 6&lt;br /&gt;
    8 / 4  # -&amp;gt; 4&lt;br /&gt;
    (1 + 3) * 2  # -&amp;gt; 8&lt;br /&gt;
    1 + (3 * 2)  # -&amp;gt; 7&lt;br /&gt;
&lt;br /&gt;
    # That is, until you need to do an exponent. But you shouldn&#039;t encounter anything much weirder than that math-wise.&lt;br /&gt;
    2 ** 3  # -&amp;gt; 8&lt;br /&gt;
&lt;br /&gt;
    # However, these math operations are useless if we don&#039;t store the values anywhere.&lt;br /&gt;
    x = 1 + 1&lt;br /&gt;
    # Now if you try to access x in the future, it will have the value of &#039;2&#039;.&lt;br /&gt;
&lt;br /&gt;
    # You can print your variables like this:&lt;br /&gt;
    print(x)&lt;br /&gt;
    # You can also add in some text with them like this:&lt;br /&gt;
    print(&amp;quot;The value of x is &amp;quot;, x)&lt;br /&gt;
&lt;br /&gt;
    # Sometimes we only want to execute something based on a certain condition.&lt;br /&gt;
    if x == 2:&lt;br /&gt;
        y = 3&lt;br /&gt;
    # The &#039;==&#039; means that you&#039;re directly comparing two values. If they&#039;re equal, whatever is on the inside of the if-statement will be executed.&lt;br /&gt;
    # Now is a good time to note that whitespace is very important in Python. &#039;y = 3&#039; will always execute if it isn&#039;t tabbed, so even if x is equal to 7, y will still become 3.&lt;br /&gt;
    # If you ever see me use whitespace in this tutorial, make sure you do as well.&lt;br /&gt;
    # Some other useful comparators: != (not equal), &amp;gt;, &amp;gt;= (greater than or equal to), &amp;lt;, &amp;lt;= (less than or equal to), &#039;and&#039;, &#039;or&#039;, &#039;not&#039;&lt;br /&gt;
    # You can add onto the above if-statement by tacking on:&lt;br /&gt;
    elif x == 3:&lt;br /&gt;
        y = 4&lt;br /&gt;
    else:&lt;br /&gt;
        y = 5&lt;br /&gt;
    # With elif meaning &amp;quot;else if&amp;quot; for a second possible condition, and &amp;quot;else&amp;quot; for something that you want to execute if none of the earlier conditions are met.&lt;br /&gt;
&lt;br /&gt;
    # You can also have a loop that executes code for a certain amount of time or based on a certain condition.&lt;br /&gt;
    while x &amp;lt; 5:&lt;br /&gt;
        print(&amp;quot;x is &amp;quot;, x)&lt;br /&gt;
        x = x + 1&lt;br /&gt;
    # This will output the value of x up until it reaches 4.&lt;br /&gt;
&lt;br /&gt;
Thus concludes our very, very brief foray into Python. That was simply the bare minimum required to understand what will be needed for this class. More concepts will be introduced as needed, whether that be in this tutorial or in a lab. For a more complete understanding of Python, you can look up other Python tutorials elsewhere on the Internet.&lt;br /&gt;
&lt;br /&gt;
==Mathematical Model==&lt;br /&gt;
Vpython can compute any equation, but some that may be most helpful and most useful for Physics can be found below. (Keep in mind you can alter these numbers to be whatever you need, these are just to provide an example): &lt;br /&gt;
&lt;br /&gt;
To update momentum:&lt;br /&gt;
&lt;br /&gt;
    pf = pi + Fnet*deltat&lt;br /&gt;
&lt;br /&gt;
To update position:&lt;br /&gt;
&lt;br /&gt;
    objectf.pos = objecti.pos + (pcart/mcart)*deltat&lt;br /&gt;
&lt;br /&gt;
To create a vector:&lt;br /&gt;
&lt;br /&gt;
    vector(0,0,0) -- fill in with whatever numbers the vector should be&lt;br /&gt;
&lt;br /&gt;
Gravitational Force:&lt;br /&gt;
&lt;br /&gt;
    # Constants&lt;br /&gt;
    G = 6.7e-11&lt;br /&gt;
    mEarth = 6e24&lt;br /&gt;
    mcraft = 15e3&lt;br /&gt;
    deltat = 60&lt;br /&gt;
    t = 0&lt;br /&gt;
&lt;br /&gt;
Finds the change in position:&lt;br /&gt;
&lt;br /&gt;
    r=craft.pos-Earth.pos  &lt;br /&gt;
    m=mcraft&lt;br /&gt;
&lt;br /&gt;
To find the magnitude of the change in position:&lt;br /&gt;
&lt;br /&gt;
    rmag= mag(r)      &lt;br /&gt;
&lt;br /&gt;
To calculate the new magnitude of gravitational force:&lt;br /&gt;
&lt;br /&gt;
    Fmag=(G*mcraft*mEarth)/(rmag**2)&lt;br /&gt;
&lt;br /&gt;
To calculate the direction of the change in position:&lt;br /&gt;
&lt;br /&gt;
    rhat=r/rmag&lt;br /&gt;
&lt;br /&gt;
To calculate net force:&lt;br /&gt;
&lt;br /&gt;
    Fnet=-Fmag*rhat&lt;br /&gt;
&lt;br /&gt;
To calculate spring force:&lt;br /&gt;
&lt;br /&gt;
    L0 = 0.3 &lt;br /&gt;
    Lvec = ball.pos - ceiling.pos&lt;br /&gt;
    Lhat = norm(Lvec)&lt;br /&gt;
    Lmag = mag(Lvec)&lt;br /&gt;
    Fspr = (-ks)*(Lmag - L0)*(Lhat)&lt;br /&gt;
&lt;br /&gt;
To calculate kinetic energy:&lt;br /&gt;
&lt;br /&gt;
    Kinetic = (1/2)*(mball*(vel**2))&lt;br /&gt;
&lt;br /&gt;
To create a graph:&lt;br /&gt;
&lt;br /&gt;
    gdisplay(width=500, height=250, x=600, y=1)&lt;br /&gt;
    ygraph= gcurve(color=color.cyan)&lt;br /&gt;
&lt;br /&gt;
To add plots to the graph:&lt;br /&gt;
&lt;br /&gt;
    ygraph.plot(pos=(t, fnet.y))  &lt;br /&gt;
&lt;br /&gt;
==Computational Model==&lt;br /&gt;
&lt;br /&gt;
VPython is used to create computational, 3D models of various real world situations in order to better visualize how different equations can manipulate different scenarios. This is very valuable since many of the equations and situations that are coded in vPython are extremely difficult to make a functioning model of in real life. &lt;br /&gt;
&lt;br /&gt;
For instance, the picture below is an example of program that was programmed to show the orbit of a craft around Earth. &lt;br /&gt;
&lt;br /&gt;
[[File:Earthorbits.jpg]]&lt;br /&gt;
&lt;br /&gt;
This picture shows a graph that tracks.&lt;br /&gt;
[[File:PositionGraph.jpg]]&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
Simple:&lt;br /&gt;
&lt;br /&gt;
Creating Shapes:&lt;br /&gt;
&lt;br /&gt;
Sphere:&lt;br /&gt;
&lt;br /&gt;
    sphere= sphere(pos=vector(-4,-2,5), radius=.4, color=color.red)&lt;br /&gt;
&lt;br /&gt;
Arrow:&lt;br /&gt;
&lt;br /&gt;
    bt=arrow(pos=sphere.pos, axis=sphere2.pos-sphere.pos, color=color.cyan)&lt;br /&gt;
&lt;br /&gt;
Vector:&lt;br /&gt;
&lt;br /&gt;
    vector=vector(0, 0, 0)&lt;br /&gt;
&lt;br /&gt;
Trail:&lt;br /&gt;
&lt;br /&gt;
    trail = curve(color=sphere.color)&lt;br /&gt;
    trail.append(pos=sphere.pos)&lt;br /&gt;
&lt;br /&gt;
Setting Scene Range:&lt;br /&gt;
&lt;br /&gt;
    scene.range=11*sphere.radius&lt;br /&gt;
&lt;br /&gt;
Helix:&lt;br /&gt;
&lt;br /&gt;
    spring = helix(pos=ceiling.pos, color=color.cyan, thickness=.003, coils=40, radius=0.015) &lt;br /&gt;
&lt;br /&gt;
Intermediate:&lt;br /&gt;
&lt;br /&gt;
Graphs:&lt;br /&gt;
&lt;br /&gt;
Setup graphing windows:&lt;br /&gt;
&lt;br /&gt;
    gdisplay(width=500, height=250, x=600, y=1)&lt;br /&gt;
    ygraph = gcurve(color=color.yellow)&lt;br /&gt;
    gdisplay(width=500, height=250, x=600, y=300)&lt;br /&gt;
&lt;br /&gt;
Plotting:&lt;br /&gt;
&lt;br /&gt;
    pgraph = gcurve(color=color.blue)&lt;br /&gt;
    ygraph.plot(pos=(time, Fnet.y))&lt;br /&gt;
    pgraph.plot(pos=(time, sphere.y))&lt;br /&gt;
&lt;br /&gt;
Difficult:&lt;br /&gt;
&lt;br /&gt;
Using Loops to update Equations:&lt;br /&gt;
&lt;br /&gt;
Constants:&lt;br /&gt;
&lt;br /&gt;
G = ?&lt;br /&gt;
&lt;br /&gt;
mEarth = ?&lt;br /&gt;
&lt;br /&gt;
mmoon = ?&lt;br /&gt;
&lt;br /&gt;
mcraft = ?&lt;br /&gt;
&lt;br /&gt;
deltat = ?&lt;br /&gt;
&lt;br /&gt;
t = ?&lt;br /&gt;
&lt;br /&gt;
Objects and initial values:&lt;br /&gt;
&lt;br /&gt;
    Earth = sphere(pos=vector(0,0,0), radius=6.4e6, color=color.cyan)&lt;br /&gt;
    scene.range=11*Earth.radius&lt;br /&gt;
    Moon = sphere(pos=(4e8, 0, 0), radius=1.75e6, color=color.white)&lt;br /&gt;
&lt;br /&gt;
Add a radius for the spacecraft. It should be BIG, so it can be seen:&lt;br /&gt;
&lt;br /&gt;
    craft = sphere(pos=vector(-6.656e7,-3.648e6,0), radius= 10000, color=color.yellow)&lt;br /&gt;
    vcraft = vector(206, 2645,0)&lt;br /&gt;
    pcraft = mcraft*vcraft&lt;br /&gt;
    pArrow=arrow(color=color.green)&lt;br /&gt;
    fArrow=arrow(color=color.cyan)&lt;br /&gt;
    dpArrow=arrow(color=color.red)&lt;br /&gt;
    Fnet_tangent_arrow = arrow(color=color.yellow)&lt;br /&gt;
    Fnet_perp_arrow= arrow(color=color.magenta)&lt;br /&gt;
&lt;br /&gt;
This creates a trail for the spacecraft:&lt;br /&gt;
&lt;br /&gt;
    trail = curve(color=craft.color)  &lt;br /&gt;
&lt;br /&gt;
And this prevents zooming in or out:&lt;br /&gt;
  &lt;br /&gt;
    scene.autoscale = 0                 &lt;br /&gt;
    pscale=Earth.radius/mag(pcraft)&lt;br /&gt;
    fscale=Earth.radius/((G*mEarth*mcraft)*mag(craft.pos-Earth.pos)**2)&lt;br /&gt;
    dpscale=500*Earth.radius/mag(pcraft)&lt;br /&gt;
    print(&amp;quot;p=&amp;quot;, pcraft)&lt;br /&gt;
&lt;br /&gt;
Calculations:&lt;br /&gt;
&lt;br /&gt;
Sets time for loop to run:&lt;br /&gt;
&lt;br /&gt;
    while t &amp;lt; 165240: &lt;br /&gt;
&lt;br /&gt;
This slows down the animation (runs faster with bigger number):&lt;br /&gt;
&lt;br /&gt;
    rate(10000)   &lt;br /&gt;
&lt;br /&gt;
Add statements here for the iterative update of gravitational&lt;br /&gt;
force, momentum, and position.&lt;br /&gt;
&lt;br /&gt;
    r = craft.pos-Earth.pos&lt;br /&gt;
    rmag = sqrt(r.x**(2)+r.y**(2)+r.z**(2))&lt;br /&gt;
    Fmag= G*mEarth*mcraft/(rmag**2)&lt;br /&gt;
    rhat= r/rmag&lt;br /&gt;
    rmoon= craft.pos - Moon.pos&lt;br /&gt;
    rmoonmag= mag(rmoon)&lt;br /&gt;
    rmoonhat= norm(rmoon)&lt;br /&gt;
    Fmoonmag= G*mmoon*mcraft/(rmoonmag**2)&lt;br /&gt;
    Fmoon= -Fmoonmag*rmoonhat&lt;br /&gt;
    p_init= mag(pcraft)&lt;br /&gt;
    pcraft_i=pcraft+vector(0,0,0)&lt;br /&gt;
    Fearth= -Fmag*rhat&lt;br /&gt;
    Fnet= Fearth + Fmoon&lt;br /&gt;
    pcraft=Fnet*deltat+pcraft&lt;br /&gt;
    p_final=mag(pcraft)&lt;br /&gt;
&lt;br /&gt;
    Fnet_tangent = (p_final-p_init)*norm(pcraft)/deltat&lt;br /&gt;
    Fnet_tangent_arrow.pos=craft.pos&lt;br /&gt;
    Fnet_tangent_arrow.axis=Fnet_tangent*fscale&lt;br /&gt;
    Fnet_perp = Fnet-Fnet_tangent&lt;br /&gt;
    Fnet_perp_arrow.pos=craft.pos&lt;br /&gt;
    Fnet_perp_arrow.axis=Fnet_perp*fscale&lt;br /&gt;
    vcraft=pcraft/mcraft&lt;br /&gt;
    craft.pos=vcraft*deltat+craft.pos&lt;br /&gt;
    pArrow.pos=craft.pos&lt;br /&gt;
    pArrow.axis=pcraft*pscale&lt;br /&gt;
    fArrow.pos=craft.pos&lt;br /&gt;
    fArrow.axis=Fnet*fscale&lt;br /&gt;
    deltap= pcraft-pcraft_i&lt;br /&gt;
    dpArrow.pos=craft.pos&lt;br /&gt;
    dpArrow.axis=deltap*dpscale&lt;br /&gt;
    scene.center=craft.pos&lt;br /&gt;
    scene.range=craft.radius*600&lt;br /&gt;
    &lt;br /&gt;
   Uncomment these two lines to exit the loop if&lt;br /&gt;
   the spacecraft crashes onto the Earth.&lt;br /&gt;
&lt;br /&gt;
    if rmag &amp;lt; Earth.radius: &lt;br /&gt;
        break&lt;br /&gt;
&lt;br /&gt;
    trail.append(pos=craft.pos)  &lt;br /&gt;
    t = t+deltat&lt;/div&gt;</summary>
		<author><name>Zsanchez6</name></author>
	</entry>
</feed>