I am trying to implement the steepest descent algorithm for linear systems. The equation is below:
$\begin{align*} Ax &= b\\ x_0 &= [0]*[m,n]\\ x_k &= x_{k-1} + \frac{|d_{k-1}|^2}{d_{k-1} * Ad_{k-1}}d_{k-1}\\ d_{k-1} &= -(Ax_{k-1} - b) \end{align*}$
My problem is that I think $d_{k-1}$ should be an $m\times1$ matrix and when you try and dot the denominator of $x_k$ it does not work because you end up trying to dot an $m\times1$ by an $m\times1$ matrix.
What am I doing wrong?