A vector is a direction with a distance. It can be written in different ways. I'll use a 2d example to be simple.
A vector could be written like this...
100 along the x axis
100 along the y axis
This would have a direction of 100x,100y and a length of sqrt(100^2+100^2), because I can't be arsed to find the length.
You could also write a vector like this...
50 units at 40 degrees
This would have a length of 50 units and a bearing of 40 degrees.
I believe they are based around two different coordinate systems, cartisian and something else

. The first example is the one used in darkbasic pro, the second I don't think is used as much but I suppose it has some use. Anyone with basic knowledge of triganometry can translate between the two.
Vectors have loads of uses, especially in 3D and 2D calculations, for example, the vector perpendicular to another (2D) vector can be found by...
vector = (x,y)
perp vector = (-y,x)
The dot product of 2 vectors can be used to tell what angle is between them...
angle = acos(dot product of 2 unit vectors)
Unit vectors being vectors with a total length of 1.
This is a simple program that uses perp vectors and dot products to check if the mouse is inside a triangle...
sync on
x1=rnd(640)
y1=rnd(480)
x2=rnd(640)
y2=rnd(480)
x3=rnd(640)
y3=rnd(480)
do
if spacekey()=1
x1=rnd(640)
y1=rnd(480)
x2=rnd(640)
y2=rnd(480)
x3=rnd(640)
y3=rnd(480)
endif
line x1,y1,x2,y2
line x2,y2,x3,y3
line x3,y3,x1,y1
x12=x2-x1
y12=y2-y1
xm1=mouseX-x1
ym1=mouseY-y1
x23=x3-x2
y23=y3-y2
xm2=mouseX-x2
ym2=mouseY-y2
x31=x1-x3
y31=y1-y3
xm3=mouseX-x3
ym3=mouseY-y3
mouseX=mousex()
mouseY=mousey()
`Perp vector is used here
dot1#=dotProduct#(x12,y12,0-ym1,xm1)
dot2#=dotProduct#(x23,y23,0-ym2,xm2)
dot3#=dotProduct#(x31,y31,0-ym3,xm3)
pick = 0
if (dot1#>0 and dot3#>0 and dot2#>0) or (dot1#<0 and dot3#<0 and dot2#<0) then pick=1
text 20,20,"Inside? "+str$(pick)
text 20,40,"Dot1: "+str$(dot1#)
text 20,60,"Dot2: "+str$(dot2#)
text 20,80,"Dot3: "+str$(dot3#)
sync
cls
loop
function dotProduct#(x1,y1,x2,y2)
value# = (x1*x2)+(y1*y2)
endfunction value#
Brains are for idiots.
Athelon XP 1400 Plus - Nvidia Geforce MX400 - 256mb RAM