Concepts / Vectors and Their Elements

Vectors and Their Elements

Lowercase letters commonly denote scalars or abstract objects; boldface lowercase letters emphasize vectors.

  • Programming

Reading Symbols Before Calculating

Mathematical notation is a compact guide to the kind of object you are reading. Before manipulating a symbol, ask two questions: is it a single quantity or a collection, and does its typography signal a special structure? In this course, lowercase letters commonly identify scalars or abstract objects, boldface lowercase letters emphasize vectors, and uppercase letters identify matrices, sets, or sequences. These conventions reduce ambiguity, but the surrounding context still determines the exact meaning.

A symbol's capitalization or typography gives you a useful first clue, not the complete interpretation. Always combine the symbol's appearance with how it is used in context.

Single Values and Collections

Object typeCommon notation clueWhat to inspect
ScalarLowercase letterIt is being used as a single quantity or abstract object.
VectorBoldface lowercase letterThe boldface emphasizes that the symbol represents a vector.
MatrixUppercase letterContext determines that the uppercase symbol represents a matrix.
SetUppercase letterContext determines that the uppercase symbol represents a set.
SequenceUppercase letter or indexed termsPositions and order indicate that the collection is being treated as a sequence.

The same capitalization rule does not force every uppercase symbol to mean the same thing. An uppercase letter may denote a matrix, a set, or a sequence. You determine which one is intended by looking at the surrounding notation and the role of the symbol. Similarly, lowercase letters commonly denote scalars or abstract objects, while boldface lowercase letters emphasize vectors.

xlowercase scalar orabstract objectbold xboldface lowercase vectorAuppercase; contextidentifies matrixSuppercase; contextidentifies setSuppercase; indexedpositions show sequence
How do typography and context distinguish a scalar, vector, matrix, set, or sequence?

Finding an Element by Index

An indexed symbol such as x_i identifies an element of a vector. The letter x names the vector, and the index i identifies which position or element is being referred to.

The index is not another independent vector. It is a locator attached to the vector's symbol. When you see x_i, read it as the element of vector x identified by position i. The particular value of i tells you which element to select, while the vector symbol tells you which collection of elements to inspect.

containscontainslocatesselectsxvector1first positionx_ielement at position i2second positioniselected position
Which position in the vector does x_i refer to, and how does the index map to the corresponding element?

Reading an Indexed Vector Element

Suppose bold x is a vector and the notation x_3 appears in a calculation. What does x_3 identify?

Read the vector symbol: The symbol x identifies the vector whose elements are being discussed.

Read the index: The index 3 identifies the position used to select one element of that vector.

Combine the clues: The expression x_3 identifies the element of vector x at position 3.

x_3 refers to one particular element of vector x, selected by its index.

Why Positions Make a Sequence

Consider the notation S = z_1, ..., z_m. The indexed terms identify examples and preserve their positions in the collection. This is why the course uses the word sequence even when the shorthand name training set appears. The notation describes examples by position rather than only by membership.

View of the examplesWhat the notation emphasizesWhy it matters
SequencePositions and orderThe indices identify where each example occurs.
SetMembershipThe collection is described by which members belong to it, without the positional distinction emphasized by the sequence notation.
positionpositionpositionmembershipSz_1, ..., z_mz_1position 1Smembership viewmembersbelong to Sz_2position 2z_mposition m
What changes when the same values are shown with positions and order instead of only membership?

Reading a Training Sequence

Interpret S = z_1, ..., z_m.

Identify the collection: The uppercase symbol S names the collection of examples.

Inspect the indices: The indices 1 through m identify positions for the examples z_1 through z_m.

Choose the correct description: Because the examples are identified by positions, the notation describes a sequence, even though the collection may be called a training set.

S = z_1, ..., z_m denotes a sequence of m examples whose positions are retained by the indices.

Context Resolves Ambiguity

Do not identify an object from capitalization alone. An uppercase symbol can represent a matrix, a set, or a sequence. First notice the typography, then ask how the symbol is arranged and used. Indexed terms such as z_1 through z_m signal positions in a sequence, while the word or surrounding notation may establish a matrix or set interpretation.

Common Reading Mistakes

  • Treating x_i as a completely separate object with no connection to x.

    The indexed symbol identifies an element of the vector; the index locates the element.

    Fix: Read x_i as the element of vector x at the position identified by i.

  • Assuming every uppercase letter represents a matrix.

    Uppercase letters can denote matrices, sets, or sequences, and context determines which meaning applies.

    Fix: Inspect the surrounding notation and the role of S before deciding what type of object it represents.

  • Calling S = z_1, ..., z_m only a set and ignoring the indices.

    The indices identify positions, so the notation preserves sequence information.

    Fix: Describe the collection as a sequence of m examples when the indexed positions are part of the notation.

  • Assuming lowercase always means scalar.

    Lowercase letters commonly denote scalars or abstract objects, while boldface lowercase letters emphasize vectors.

    Fix: Check whether the lowercase symbol is boldface and combine that clue with context.

Apply the Notation

MEDIUM

For each description, identify the most useful clue: a single lowercase symbol, a boldface lowercase symbol, an uppercase symbol whose context must be inspected, or indexed terms such as z_1 through z_m. Then explain what the clue tells you about the object.

Hints
  • First decide whether the symbol represents one quantity or a collection.
  • Boldface lowercase typography emphasizes a vector.
  • Uppercase typography alone does not distinguish a matrix, set, or sequence.
  • Indices identify positions in a sequence or elements of a vector.

What do you think happens?

You see S = z_1, ..., z_m and the phrase training set. Should you ignore the indices and treat S as only a membership-based set?

  • Yes, because the phrase training set overrides the notation.
  • No, because the indices identify positions and the notation describes a sequence.
Reveal answer

Answer: No, because the indices identify positions and the notation describes a sequence.

The source distinguishes the shorthand name training set from the indexed notation. The indices do more than count examples: they identify positions in the sequence.

Notation Checklist

  1. Lowercase letters commonly denote scalars or abstract objects.
  2. Boldface lowercase letters emphasize vectors.
  3. An indexed symbol such as x_i identifies one element of a vector by its position.
  4. Uppercase letters may denote matrices, sets, or sequences, so context is essential.
  5. In S = z_1, ..., z_m, the indices preserve positions, which is why the examples are treated as a sequence rather than merely a set.

Key Takeaways

  • Typography provides clues: lowercase commonly signals a scalar or abstract object, while boldface lowercase emphasizes a vector.
  • An index identifies a particular element or position within a vector.
  • Uppercase letters can represent matrices, sets, or sequences, so context determines the exact meaning.
  • The notation S = z_1, ..., z_m preserves positions through its indices, making it a sequence of examples even when it is called a training set.