I read this reddit post and this SE thread discussing how to represent nonlinear/linear transforms in matrix notations but they were not sufficient.
In quantum mechanics, scientists use infinite matrices to represent operators. Should the operators be linear to be represented as matrices? If then, should the operators be linear even to be represented as infinite matrices? Or can infinite matrices represent nonlinear operators too?
I'm reluctant to say it cannot be done, but I would think any natural use of matrices to represent functions would entail linear functions. For example, let $S$ be the set of convergent sequences of real numbers and let $A$ be an infinite matrix such that $X\in S\implies AX\in S$. That is $$(AX)_i=\sum_{j=1}^{\infty}a_{ij}x_j$$ where we know that sums will be convergent and the sequence of sums will converge. Then it follows from elementary properties of sums and sequences that $$A(aX+bY)=aAX+bAy$$