MATLAB: Why exp(a*t) is not equal to ilaplace ((s*i-a)^-1) in matlab

exp(a*t)

we know that one of the ways to obtain exp(A*t), when A is a n-by-n matrix is exp(A*t) = ilaplace [ (S*I-A)^-1 ] but the result of exp(A*t) and ilaplace [ (S*I-A)^-1 ] are not equal!
e.g
A = [-3 -1;2 1]
exp(A*t) = [ exp(-3*t), exp(-t) ; exp(2*t), 1]
ilaplace [ (S*I-A)^-1 ] = [ 2*exp(-2*t) – exp(-t), exp(-2*t) – exp(-t); 2*exp(-t) – 2*exp(-2*t), 2*exp(-t) – exp(-2*t)]
what is wrong?

Best Answer

The matrix exponential e^At = L^-1 {(sI-A)^-1}
This does not mean you can just take exp of each of the elements of the matrix.
This is wrong
Matrix exponential:
e^(At) =/= exp(A*t) = [ exp(-3*t), exp(-t) ; exp(2*t), 1]
MATLAB does element wise operation of matrices hence you can't compute the matrix exponential by the above method.
Maybe this will give you a better idea of how it is defined: