0
Hello People Please what is a Vector in Programing
4 Answers
0
Think vector as an Arrow. It is a mathematical concept with Direction and Magnitude. Usually represented with something like a = [ 1 2 7] in programming. This is a 3 dimensional vector. Look for linear algebra and numpy to study more about vectors.
0
Vector are similar to Arrays. But general difference is "Arrays are fixed size. Cannot grow or strink on adding/removal of elements but vector can. Vector size can be increased/decreased. You can add/remove elements completely". So you can think vectors are dynamic array type..
Edit:
Ashish I think, you mean array.. Not arrow.
Is it?
0
Jayakrishnađźđł I mean Arrow.
Visually, you see vectors drawn as arrows, which is perfect because an arrow has both a clear direction and a clear magnitude (the length of the arrow). The arrow represents a vector that starts at the arrowâs foot (also called the tail) and ends at the head.
Vector is a concept from Physics rather than math or data structure.
For example force and velocity.
If. Vector has 4 element. It is an arrow in 4 dimensional space. It is so easy to represent mathematically that you can do multidimensional calculations easily.
In python vector can represented as Numpy array.
If you see Python arrays (list) are also not fixed size.
0
Ashish ok then fine.
[ A visual representation then more clarifies for your model may be..]