You can use a _Generators > "Hilbert 3d"_ node to make the matrix. I'll use this for brevity. Either that or stack a few subdivided planes and join them with _Mesh Join_.

Each point on the matrix is a Vector, you wanted to check the distance between each vector and the origin vector (0,0,0) and use that distance to scale a sphere placed on that vector point. 

[![enter image description here][1]][1]

here's how to make a more dynamic matrix

[![enter image description here][2]][2]

import the Gist from the SV import/export panel
https://gist.github.com/c0f658e5dab427711f58c1908d470c64

----

Mesh instances 


[![enter image description here][3]][3]


  [1]: https://i.sstatic.net/DOWiy.png
  [2]: https://i.sstatic.net/LgKBz.png
  [3]: https://i.sstatic.net/wALnf.png