# Is there any way to apply linear transformations on a vector other than matrix multiplication?

I am trying to optimize the cost function calculation in regression analysis using a non-matrix multiplication based approach.

More specifically, I have a point $$x = (1, 1, 2, 3)$$, to which I want to apply a linear transformation $$n$$ times. If the transformation is denoted by a $$4 \times 4$$ matrix $$A$$, then the final transformation would be given by $$A^n * x$$.

Given that matrix multiplication can computational expensive, is there a way we can speed up the computation, assuming we would need to run multiple iterations of this simulation?

• Singular value decomposition might help.
– user9947
Sep 10 '20 at 14:26

In your case, you can actually compute $$A^n$$ in less time than $$\mathcal{O}(n^3$$). For example, have a look at this question at CS SE and this one at Stack Overflow (SO). Note that the provided solutions may not be numerically stable, so I am not suggesting you use them.