{"course":{"slug":"maths-you-need","title":"The Maths You Actually Need","url":"https://addaly.com/learn/maths-you-need","level":"intermediate","track":"deep"},"lesson":{"slug":"vector-is-a-list","title":"A vector is just a list","url":"https://addaly.com/learn/maths-you-need/vector-is-a-list","position":2,"of":76,"minutes":7,"answer":"A vector is an ordered list of numbers, and in a model its direction carries the meaning, not its length.","keyIdea":"A vector is an ordered list of numbers, and in a model its direction carries the meaning, not its length."},"body":{"format":"markdown","text":"## Start with a spreadsheet row\n\nA flat in Bengaluru: rent 32000, area 850 square feet, floor 4, walking minutes to the metro 12. Write those numbers in a fixed order and you have a vector:\n\n```\n[32000, 850, 4, 12]\n```\n\nThat is the whole definition. An ordered list of numbers. The order is the only rule: the third slot always means floor, in every flat you describe.\n\nThe word scares people because school introduced it as an arrow in physics, with force and velocity and diagrams. In machine learning, forget the arrow for a moment. It is a row.\n\n## What models actually store\n\nWhen a model reads the word \"chai\", it does not store the letters. It looks up a list of numbers: 384 of them, or 768, or 1536, depending on the model. That list is called an embedding. Nobody sat down and chose those numbers. Training produced them.\n\nHere is the honest part. Individual slots in that list almost never mean anything you could name. Dimension 412 is not \"spiciness\" or \"how Indian the word is\". The meaning is smeared across all 768 numbers at once, and any single one is close to unreadable. You may have heard that `king - man + woman` lands near `queen`. That is real for some older word embeddings, and much weaker and more cherry-picked than the story suggests. Enjoy it as a demo. Do not build on it.\n\n## What \"direction\" means\n\nTwo vectors point the same way when one is a multiple of the other. `[2, 1]` and `[6, 3]` have different sizes and identical direction.\n\nIn an embedding space, the direction is where the meaning lives. The length usually tracks something else entirely: how common the word is, how long the document was, how much text the encoder had to work with.\n\nMake that concrete. A 400-word review of a restaurant in Lagos and a 40-word review saying the same thing produce vectors pointing in nearly the same direction, but the long one is a longer vector. Compare them by angle and they match, correctly. Compare them by raw size and the long one wins, for a reason that has nothing to do with what it says.\n\nThis is why almost every retrieval system normalises: divide every number in the vector by the vector's length, so each vector sits on a sphere of radius 1 and only direction is left.\n\n```python\nimport math\n\nv = [3.0, 4.0]\nlength = math.sqrt(3*3 + 4*4)      # 5.0\nunit = [x / length for x in v]     # [0.6, 0.8]\n```\n\nThat `sqrt(sum of squares)` is Pythagoras, extended to as many slots as you like. It works identically for 768 numbers. Nothing new happens.\n\n## Adding and scaling\n\nAdd two vectors by adding matching slots. Scale by multiplying every slot. That is it.\n\nThis has a real use. Take every sentence embedding in a paragraph and average them, slot by slot, and you get a crude paragraph embedding. It is used in production more than anyone admits. It also throws away word order completely, so \"the dog bit the man\" and \"the man bit the dog\" land in the same place. Cheap, useful, and wrong in a specific way you should know about.\n\n## Why people say \"space\"\n\nA list of 768 numbers is a point in 768-dimensional space. You cannot picture that, and you never need to. Everything you will do with it is one of three things: measure a distance, measure an angle, or add.\n\nOne warning where 2D intuition breaks. High-dimensional space is mostly empty, and points in it tend to be roughly the same distance from each other. So a rule like \"call them similar if the distance is under 0.5\" gets tuned on one embedding model and then quietly means nothing when you switch models. Angles survive that switch a little better than distances. Neither survives it completely."},"check":{"question":"A retrieval system ranks results by the angle between vectors. You multiply every number in one stored embedding by 10 and re-run the same search.","options":[{"text":"It ranks higher for every query now, because a bigger vector scores higher.","correct":false,"tempting":"Treats similarity as growing with size, when the ranking only ever looked at angle."},{"text":"Its rank is unchanged, because scaling stretches a vector without turning it.","correct":true},{"text":"It moves to a different region of the space, so it gets different neighbours.","correct":false,"tempting":"Assumes a vector's position is what matters, when only its direction from the origin does."},{"text":"It now reads as a stronger, more emphatic version of the same meaning.","correct":false,"tempting":"Reads length as intensity, so a longer vector must mean the thing more strongly."}]},"prev":{"slug":"turning-things-into-numbers","title":"Everything a model sees is numbers","url":"https://addaly.com/learn/maths-you-need/turning-things-into-numbers"},"next":{"slug":"dot-products","title":"What a dot product measures","url":"https://addaly.com/learn/maths-you-need/dot-products"},"authorship":"Founder and series editor: Dr Mustafa Mun. Written by AI models to a written standard. Exam keys checked blind by a second model: 3,665 of 3,666 agreed. Academic review invited.","review":{"status":"Draft, open for academic review"},"cite":"Addaly (2026) 'A vector is just a list', in The Maths You Actually Need. Edited by M. Mun. Addaly. Available at: https://addaly.com/learn/maths-you-need/vector-is-a-list (Accessed: 31 October 2026).","licence":{"name":"CC BY-NC-SA 4.0","url":"https://creativecommons.org/licenses/by-nc-sa/4.0/"},"reader":{"schema":1,"title":"A vector is just a list","courseTitle":"The Maths You Actually Need","module":{"index":1,"slug":"vectors-and-space","title":"Vectors, and the space they live in"},"answer":null,"keyIdea":"A vector is an ordered list of numbers, and in a model its direction carries the meaning, not its length.","hero":{"kind":"plate","image":null,"alt":null,"caption":null},"blocks":[{"t":"h2","id":"start-with-a-spreadsheet-row","runs":[{"text":"Start with a spreadsheet row"}]},{"t":"p","runs":[{"text":"A flat in Bengaluru: rent 32000, area 850 square feet, floor 4, walking minutes to the metro 12. Write those numbers in a fixed order and you have a vector:"}]},{"t":"code","lang":"","label":"Text","text":"[32000, 850, 4, 12]"},{"t":"p","runs":[{"text":"That is the whole definition. An ordered list of numbers. The order is the only rule: the third slot always means floor, in every flat you describe."}]},{"t":"p","runs":[{"text":"The word scares people because school introduced it as an arrow in physics, with force and velocity and diagrams. In machine learning, forget the arrow for a moment. It is a row."}]},{"t":"h2","id":"what-models-actually-store","runs":[{"text":"What models actually store"}]},{"t":"p","runs":[{"text":"When a model reads the word “chai”, it does not store the letters. It looks up a list of numbers: 384 of them, or 768, or 1536, depending on the model. That list is called an embedding. Nobody sat down and chose those numbers. Training produced them."}]},{"t":"p","runs":[{"text":"Here is the honest part. Individual slots in that list almost never mean anything you could name. Dimension 412 is not “spiciness” or “how Indian the word is”. The meaning is smeared across all 768 numbers at once, and any single one is close to unreadable. You may have heard that "},{"text":"king - man + woman","code":true},{"text":" lands near "},{"text":"queen","code":true},{"text":". That is real for some older word embeddings, and much weaker and more cherry-picked than the story suggests. Enjoy it as a demo. Do not build on it."}]},{"t":"h2","id":"what-direction-means","runs":[{"text":"What “direction” means"}]},{"t":"p","runs":[{"text":"Two vectors point the same way when one is a multiple of the other. "},{"text":"[2, 1]","code":true},{"text":" and "},{"text":"[6, 3]","code":true},{"text":" have different sizes and identical direction."}]},{"t":"p","runs":[{"text":"In an embedding space, the direction is where the meaning lives. The length usually tracks something else entirely: how common the word is, how long the document was, how much text the encoder had to work with."}]},{"t":"p","runs":[{"text":"Make that concrete. A 400-word review of a restaurant in Lagos and a 40-word review saying the same thing produce vectors pointing in nearly the same direction, but the long one is a longer vector. Compare them by angle and they match, correctly. Compare them by raw size and the long one wins, for a reason that has nothing to do with what it says."}]},{"t":"p","runs":[{"text":"This is why almost every retrieval system normalises: divide every number in the vector by the vector’s length, so each vector sits on a sphere of radius 1 and only direction is left."}]},{"t":"code","lang":"python","label":"Python","text":"import math\n\nv = [3.0, 4.0]\nlength = math.sqrt(3*3 + 4*4)      # 5.0\nunit = [x / length for x in v]     # [0.6, 0.8]"},{"t":"p","runs":[{"text":"That "},{"text":"sqrt(sum of squares)","code":true},{"text":" is Pythagoras, extended to as many slots as you like. It works identically for 768 numbers. Nothing new happens."}]},{"t":"h2","id":"adding-and-scaling","runs":[{"text":"Adding and scaling"}]},{"t":"p","runs":[{"text":"Add two vectors by adding matching slots. Scale by multiplying every slot. That is it."}]},{"t":"p","runs":[{"text":"This has a real use. Take every sentence embedding in a paragraph and average them, slot by slot, and you get a crude paragraph embedding. It is used in production more than anyone admits. It also throws away word order completely, so “the dog bit the man” and “the man bit the dog” land in the same place. Cheap, useful, and wrong in a specific way you should know about."}]},{"t":"h2","id":"why-people-say-space","runs":[{"text":"Why people say “space”"}]},{"t":"p","runs":[{"text":"A list of 768 numbers is a point in 768-dimensional space. You cannot picture that, and you never need to. Everything you will do with it is one of three things: measure a distance, measure an angle, or add."}]},{"t":"p","runs":[{"text":"One warning where 2D intuition breaks. High-dimensional space is mostly empty, and points in it tend to be roughly the same distance from each other. So a rule like “call them similar if the distance is under 0.5” gets tuned on one embedding model and then quietly means nothing when you switch models. Angles survive that switch a little better than distances. Neither survives it completely."}]}],"check":{"question":[{"text":"A retrieval system ranks results by the angle between vectors. You multiply every number in one stored embedding by 10 and re-run the same search."}],"options":[{"text":[{"text":"It ranks higher for every query now, because a bigger vector scores higher."}],"correct":false,"tempting":[{"text":"Treats similarity as growing with size, when the ranking only ever looked at angle."}]},{"text":[{"text":"Its rank is unchanged, because scaling stretches a vector without turning it."}],"correct":true,"tempting":null},{"text":[{"text":"It moves to a different region of the space, so it gets different neighbours."}],"correct":false,"tempting":[{"text":"Assumes a vector’s position is what matters, when only its direction from the origin does."}]},{"text":[{"text":"It now reads as a stronger, more emphatic version of the same meaning."}],"correct":false,"tempting":[{"text":"Reads length as intensity, so a longer vector must mean the thing more strongly."}]}],"order":[2,0,3,1],"why":null},"prev":{"slug":"turning-things-into-numbers","title":"Everything a model sees is numbers","minutes":9},"next":{"slug":"dot-products","title":"What a dot product measures","minutes":7}}}