# mathematical operation in image scaling

I am trying to understand the resizing of an image, I understand that it is a matrix and the concept of where the values change when changing its size, but I don't know if this is some operation in linear algebra.
For example, I have a $$[2,2]$$ matrix and I want to transform it into $$[6, 6]$$ which is to multiply it by $$6$$, well the rows and columns start with zero (the ones represent pixels) $$\begin{matrix} 1 & 1 \\ 1 & 1 \end{matrix} \rightarrow \begin{matrix} 1 & 0 & 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 \\ 1 & 0 & 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 \\ \end{matrix}$$ another example $$\begin{matrix} 1 & 1 & 1 \\ 1 & 1 & 1 \\ 1 & 1 & 1 \end{matrix} \rightarrow \begin{matrix} 1 & 0 & 1 & 0 & 1 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 \\ 1 & 0 & 1 & 0 & 1 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 \\ 1 & 0 & 1 & 0 & 1 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 \\ \end{matrix}$$ the first coordinate is $$(0,0)$$ the second is $$(0,1)$$ and last $$(0,2)$$ then double the size then the first coordinate follows while $$(0,0)$$ the second is $$(0, 2)$$ and the third is $$(0, 4)$$

I guess the operation they are doing is the following In the matrix $$A$$ for all $$A_{j, i}$$ we multiply by a $$\delta$$ something like $$i,j * \delta$$

After searching I found that it is a resize image algorithm but I still don't know what the mathematical operation is :(

### Questions:

So my question is any operation in linear algebra?
Does it have any notation?

sorry English is not my mother tongue

• If you were scaling the 2x2 matrix into the 6x6 matrix, wouldn't you want the four 3x3 blocks in the 6x6 matrix to be more representative of the four 1x1 blocks in the 2x2 matrix? Ie, not a 1 in the corner of each block, but a 1 everywhere? Also, I'm not that deep into linear algebra or computer graphics, so I'm likely incredibly wrong, but what you might be looking for is the tensor product. Nov 19, 2021 at 17:41
• @rhkoulen Thanks for your answer, I'm not sure I understand you, I still don't know what a tensor product is. I've done the course on "linear algebra 1" but I'm not very good at it. Nov 19, 2021 at 18:33
• @rhkoulen I modified the first question because I did not write it well Nov 19, 2021 at 18:33
• You seem to be missing how scaling is done, forget linear algebra. You need to figure out how to resize the array and then assign its values from the original array. Nov 20, 2021 at 4:24