MODULE 01 · LESSON 03
Vectors
A vector is an ordered list. A matrix makes weighted sums from that list.
PLAIN-LANGUAGE INTRODUCTION
The idea
A vector is an ordered list. A matrix makes weighted sums from that list.
A worked example
Use
x = [2,3] and W = [[4,1],[1,2]]. Then Wx = [11,8].The input
A two-number vector and a matrix with two columns.
The result
One weighted sum per matrix row. Here, the output is [11,8].
Why you use it
Neural layers use matrices to mix many input features at once.
A limit to remember
A matrix does not know what its rows mean. Your program defines that meaning.
Check your understanding
- A vector keeps numbers in order. Here,
x₁ = 2andx₂ = 3. - The first matrix row is
[4,1]. Its weighted sum is4×2 + 1×3 = 11. - The second row is
[1,2]. Its weighted sum is1×2 + 2×3 = 8. - The matrix has shape
(2,2). The input has length2. The output has length2. - Common mistake: changing
[2,3]to[3,2]changes the meaning and both weighted sums.