Is there a way to solve the eigenvalues of a linear operator without giving its matrix form?

In Python or Matlab, the eigensolver can solve the system by giving the linear function (for example, in Matlab we can use eigs(Afun,…)), this speeds up the calculation largely as we do not need to construct the whole matrix. I can not find a similar solver in Mathematica. I wonder if there is a way to achieve this within Mathematica. Any ideas would be appreciated.

Have you read the documentation on Eigenvalues? It supports sparse matrices and with the Method -> "Arnoldi" it can find a subset of the eigenvalues.

Yes. The problem is this solver is still costly because one needs to construct the whole matrices first. If the matrix is not sparse, it becomes worse. So I try to find if there is a way to make use of the linear map in Mathematica like Matlab or Python.

I am not at all expert in numerical linear algebra. Just a curiosity: how do you specify a “linear map” in Matlab, for example?

For example, in Matlab we can define a linear function “fun” to map the m^2 dimensional vector X to another m^2 dimensional vector as follows:

m=3;
A=rand(m,m);
fun = @(X)reshape(reshape(X,[m,m])*A,[m^2,1]);
T = eigs(fun,m^2,1)

Then the function “eigs” can solve the eigenvalue T of this function without specifying the exact matrix form of '“fun”.

This mapping can involve more tensors making the construction of the whole matrix expensive, while in Mathematica, it seems “Eigenvalues” can not deal with this kind of function.

Sorry, I don’t know Matlab, and I cannot follow the details. However, it seems that you start from an actual full matrix A, then you pre-process it into fun, and then feed fun to an eigenvalue solver. Can you recover A from fun?

I hope that this conversation is joined by someone that knows Mathematica linear algebra better than I do.

Version 15.0 provides some support for this sort of thing. I give a few examples on Mathematica StackExchange here.