# A silly doubt on Computer Science Objects: Arrays, Lists, Strings, and Vectors, are they the same concept?

First of all I'm a Physics Student and I've been arguing with my brother concerning the usage and the fundamental meaning of a vector on Computer Science (CS).

I) Vectors

A vector have a axiomatic meaning, i.e., given a set $$\mathcal{A}$$ of objects, their objects can be called vectors if and only if they satisfy the vector space axioms $$[1]$$. Of course that, 3D vectors (little arrows), function, matrices and so on are different objects, but under a well defined vector addition $$\boxplus$$, and scalar multiplication $$\boxdot$$ they are the same: Vectors!

Furthermore, I think that is impossible to talk about more complicated objects like Tensors without a vector space structure underlying the mathematical usage of CS objects.

II) My doubt

So, I would like to know: arrays, lists, strings are the same object as vectors? In other words, they satisfy the vector space axioms?

$$* * *$$

$$[1]$$ https://en.wikipedia.org/wiki/Vector_space#Definition

The objects you mention are not the same. In particular, lists and (mutable) strings are dynamic data structures whereas arrays are not; their size is fixed. Now, whether some set of instances of data structures forms a vector space depends on the underlying types, some do, others do not. Considering e.g. boolean arrays of fixed size $$n$$ together with the usual addition/scalar multiplication of $$\mathbb F_2^n$$ yields a vector space, integer arrays of fixed size $$n$$ do not yield one with the usual operations.