A vector is an ordered list of numbers representing magnitude and direction, or simply a point in space. To work with these fundamental mathematical objects, a consistent way to write them down is essential. Similar to using symbols like or for unknown numbers in algebra, linear algebra employs specific notation for vectors. This notation clearly distinguishes vectors from single numbers (scalars) and ensures mathematical expressions remain precise and unambiguous.
You'll typically see vectors denoted in one of two main ways:
Both notations signal that we're talking about a vector, not just a simple scalar value like or . In this course, we will primarily use the lowercase bold letter convention, like .
A vector is defined by its components, which are the individual numbers within the ordered list. We usually write these components enclosed in square brackets or parentheses.
For example, a vector with components can be written as:
Or sometimes using parentheses:
Here, is the first component, is the second component, and is the -th component. The subscript number (1, 2, ..., n) indicates the position of the component within the vector.
Important Note on Indexing: In mathematics, vector components are often 1-indexed, meaning the first element is , the second is , and so on. However, in programming, particularly in Python and libraries like NumPy, indexing is typically 0-indexed. This means the first element is at index 0, the second at index 1, etc. When we move to implementing vectors in code, we'll use 0-based indexing. It's useful to be aware of both conventions.
The way we arrange the components visually matters, especially when we start working with matrices later. There are two primary formats:
Column Vector: The components are arranged vertically in a column. This is often the default representation in many linear algebra contexts.
Row Vector: The components are arranged horizontally in a row.
Or simply written inline as .
While they contain the same information, the distinction between column and row vectors becomes significant for operations like matrix multiplication. Unless specified otherwise, when we refer to a "vector," we often implicitly mean a column vector. However, row vectors are also frequently used, especially when representing data points in a table or dataset, where each row might be a single data sample (vector).
A 2-dimensional column vector :
Here, and .
A 3-dimensional row vector :
Here, , , and .
A general -dimensional column vector :
You might also encounter notation like . This is mathematical shorthand stating that is a vector belonging to the set of all possible -dimensional vectors where each component is a real number. represents the set of real numbers, and the superscript indicates the dimension (number of components).
Understanding this notation is helpful for reading mathematical definitions related to machine learning algorithms.
With this standard notation in mind, we can clearly communicate and work with vectors. Next, we'll see how to represent these mathematical objects using Python's NumPy library.
Was this section helpful?
© 2026 ApX Machine LearningEngineered with