mathematical operation in image scaling

273 Views Asked by At

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