
6 Introduction to Computational Linear Algebra
Operation Vector-Vector Component MATLAB
Notation Notation Implementation
Scalar-Vector
Multiplication z = ax z
i
= ax
i
z=a*x
Vector Addition z = x + y z
i
= x
i
+ y
i
z=x+y
saxpy z = ax + y z
i
= ax
i
+ y
i
z=a*x+y
scalar product a = x
T
y a =
P
i
x
i
y
i
z=x’*y
Hadamard vector
multiply
(component-wise) z = x .× y z
i
= x
i
y
i
z=x.*y
TABLE 1.2: Basic vector-vector operations.
In this table, saxpy means “scalar a ? x plus y”; it is not independent of the
preceding two operations, but it is common to list it as a basic operation
because it occurs frequently in practical calculations.
The analysis of complexity would go as follows. By denoting ...