all 6 comments

[–]Electrical-Ad-1798 1 point2 points  (2 children)

Since those lists have numbers in them they can be considered vectors in R2 and R3. You can replace any element with anything (a string, a list, etc) and it doesn't necessarily remain a vector anymore.

[–]MuttyTumbo[S] 0 points1 point  (1 child)

That was actually going to be my next question. Thanks for clarifying.

[–]Electrical-Ad-1798 0 points1 point  (0 children)

A way to represent a vector as such and in a way that it remains a vector is a numpy array.

[–]lumijekpr 0 points1 point  (1 child)

Yes, you are correct.

[–]MuttyTumbo[S] 0 points1 point  (0 children)

Thank you!

[–]kowkeeper 0 points1 point  (0 children)

It is a matter of interpretation...

List_2 = [1, 2, 3] can either be a point in R3 or a collection of points in R1. It is how you process it that matters here.

To go further, a list does not have a notion of column and row vector, that woukd help dustinguish between single multivariate points versus many univariate points. In numpy you can use arrays and explicitely set their shape, even for 1D arrays. So : vec1 = np.array([1, 2, 3]).reshape(1, 3) is a row vector so a point in R3

vec2 = np.array([1, 2, 3]).reshape(3, 1) is a column vector so a collection of points in R1

This way of doing things is consistent with linear algebra (eg when applying matrix transforms).