I have two questions that I want to ask. Consider the following system:$$BM = A$$i) $B$ is a $n$ by $n$ tridiagonal matrix and $A$ is a diagonal matrix. What is the leading order computation cost for calculating $M$.ii) $B$ is $n$ by $n$ full matrix and $A$ is diagonal. What is the cost in this case?The way I have thought:i) If we think of Thomas algorithm then it costs ~$8n$ flops to solve for a linear system of the form $Bx=c$. So if I am thinking of $n$ by $n$ matrix then it will go as ~$8n^2$. However this does not take into account that $A$ is diagonal. ii) Same for this case. How to determine the flops if $A$ is diagonal.Thanks in advance.(Note: I know that there have been developments in matrix computation and there are better algorithms to solve systems without elimination. However I am specifically interested to find the cost in context of elimination process).
FLOPS of a linear system
linear algebra;matrices;linear solver;matrix equations;banded matrix