Find the computational cost of a column vector $x$ multiplied by a row vector $v$
I computed n multiplication operations and n - 1 addition operations, so would that make for $n(n-1)$ operations overall?
Find the computational cost of $A*x$ where A is $n$ by $n$ and $x$ is $n$ by $1$
This one i'm struggling with as well I came up with $n^{2}$ multiplications and $n(n-1)$ additions so would that cout up to $n^{3}(n - 1)$ overall operations?
If you have $n$ and $n-1$ operations, the combined cost is only $2n-1$ (the $n-1$ additions are the total, not per multiplication). For a matrix-vector multiplication you get $n$ times a vector-vector product, so $n(2n-1)$ operations.