If I have a matrix of any size, say
$\begin{pmatrix} 72 & 32 & 64 \\ 18 & 8 & 16 \\ 63 & 28 & 56 \\ \end{pmatrix}$
$\begin{pmatrix} 72 & 32 \\ 18 & 8 \\ 63 & 28 \\ \end{pmatrix}$
How can I rotate/transform it exactly 45 Degrees (diagonal becomes row) to look like below matrix (preferably sparse array) (not as image) ? Prefer a generic solution
Imagine looking towards 63 in the above matrix diagonally from 64 and fill the space between numbers with zero
$\begin{pmatrix} 0 & 0 & 64 & 0 & 0 \\ 0 & 32 & 0 & 16 & 0 \\ 72 & 0 & 8 & 0 & 56 \\ 0 & 18 & 0 & 28 & 0 \\ 0 & 0 & 63 & 0 & 0 \\ \end{pmatrix}$
$\begin{pmatrix} 0 & 32 & 0 & 0 \\ 72 & 0 & 8 & 0 \\ 0 & 18 & 0 & 28 \\ 0 & 0 & 63 & 0 \\ \end{pmatrix}$
Background
below function f generates outer product of digits
f = Outer[Times, ##] & @@ IntegerDigits /@ # &
f[{123, 456}]
4 5 6
8 10 12
12 15 18
When this Matrix is rotated 45 degrees
rotate45@f[{123, 456}]
0 0 6 0 0
0 5 0 12 0
4 0 10 0 18
0 8 0 15 0
0 0 12 0 0
Total of rotated matrix results in
Total@rotate45@f[{123, 456}]
4 13 28 27 18
Adding above list in following way result is 123 * 456 .
04
13
28
27
18
56088
I am trying to create a demonstration to depict this in an interesting way will share the details when done. See this for further details