If you're interested in the classic MDS algorithm, it is spelled out very nicely on the Wikipedia page:
Classical MDS uses the fact that the coordinate matrix can be derived
by eigenvalue decomposition from $B=XX'$. And the matrix $B$ can be
computed from proximity matrix $D$ by using double centering.
- Set up the squared proximity matrix $D^{(2)}=[d_{ij}^{2}]$
Apply double centering: $B=-{\frac {1}{2}}JD^{(2)}J$ using the centering matrix $J=I-{\frac {1}{n}}11'$, where $n$ is the number of
objects.
Determine the $m$ largest eigenvalues $\lambda _{1},\lambda _{2},...,\lambda _{m}$ and corresponding eigenvectors $e_{1},e_{2},...,e_{m}$ of $B$ (where $m$ is the number of dimensions
desired for the output).
Now, $X=E_{m}\Lambda _{m}^{1/2}$, where $E_{m}$ is the matrix of $m$ eigenvectors and $\Lambda _{m}$ is the diagonal matrix of $m$
eigenvalues of $B$.
I can't really tell what your $A$ matrix is, but if each entry is a measure of the distance from the $i^{th}$ to $j^{th}$ entry, then that would be your proximity matrix.
Also, $11'$ is an n-by-n matrix of all 1's. This should be fairly self-explanatory, however most of these terms can be Googled if you're unsure. It really shouldn't be any more than about 10 lines of code.