A vector is a variable-length collection of homogeneous elements. For fixed-length, use an array if homogeneous or a tuple if not. For heterogeneous, untyped collections, please consider one of the many “list” variants.
Life when a vector is an insect 💀
I don’t understand
A vector space is a collection of vectors in which you can scale vectors and add vectors together such that the scaling and addition operations satisfy some nice relationships. The 2D and 3D vectors that we are used to are common examples. A less common example is polynomials. It’s hard to think of a polynomial as having a direction and a magnitude, but it’s easy to think of polynomials as elements of the vector space of polynomials.
Thanks for clearing that up ❤️
A vector space is when you can:
- add two Things
- multiply a Thing by any real number
And get another Thing that’s the same Kind of Thing.
By Thing I mean Vector and by Kind of Thing I mean element of the same Vector Space.
Examples of vector spaces:
- real numbers
- complex numbers
- sets of N numbers (what most people think of when they hear “vector”)
- matrices
- polynomials
- functions
- quantum states of a given system
- quantities of apples sold, classified by type of apple
Examples of Not Vector Spaces:
- integers
- negative numbers
- nonzero numbers
- unitary matrices
- apples
Yeah a few of these come with asterisks I’m happy to answer questions but don’t want to argue with pedants.
wow didn’t expect this to be so general. How do integers not fit into the definition ? you can add them together and obtain another integer
When talking about vector space, you usually need the “scalar (field)”, and scalars need inverse to be well-defined.
So for integers, the scalar should be integer itself. Sadly, inverse of integers stops being an integer,
from where all sorts of number theoretic nightmare occursInstead, integers form a ring, and is a module over scalar of integers.
A vector is an object which transforms like a vector
The advanced math that people adopt usually gets adopted for a reason…