This document is under construction
Introduction To Vectors
Vectors
Vectors
In mathematics, a vector is a very general concept. This article will deal with vectors in the context of GLScene, where they are represented as a list of numbers. An example of a vector with two entries is
v = (5, 7). We call the
set∞ containing all possible vectors with two entries for
R2, where
R stands for the
real numbers∞ which appear as entries in the vectors. The exponent indicates how many entries each vector contains. Two vectors are equal if and only if their corresponding entries are equal. So the vector (1, 3) is not equal to the vector (3, 1).
Given two vectors
u and
v, the
sum u +
v is calculated by adding the corresponding entries in each vector. Here's an example in
R2:
(1, 3) + (5, 7) = (1 + 5, 3 + 7) = (6, 10).
By multiplying a vector
v by a real number
c you get the
scalar multiple cu. It is obtained by multiplying each entry in
u by
c. For example,
given u = (4, 1) and c = -2, cu = -2(4, 1) = (-2 * 4, -2 * 1) = (-8, -2).
The number
c is called a
scalar.
The set of vectors containing n entries, where n is a positive integer, is called
Rn. Addition and scalar multiplication is performed in the same way for vectors in
Rn.
Properties for vectors in Rn:
- u + v = v + u
- (u + v) + w = u + (v + w)
- u + 0 = 0 + u = u
- u + (-u) = -u + u = 0, where -u = (-1)u
- c(u + v) = cu + cv
- (c + d)u = cu + du
- c(du) = (cd)u
- 1u = u
To subtract
u from
v, we write
u -
v instead of
u + (-1)
v
The
linear combination of vectors
v1,
v2, ...,
vp in
Rn with
weights c1,
c2, ...,
cp is given as
y = c1v1 + c2v2 + ... + cpvp.
The weights can be any real numbers, including zero.