Analytical Solution of a Three-layer Network with a Matrix Exponential Activation Function