Theory:

Let's see how to create tables and how to write linear equations using two variables for patterns.

Look at the above pattern and form a table.

Let us take, $$x$$ be the number of steps (or) number of columns and $$y$$ be the number of square boxes within every column.

 Number of steps $$(x)$$ $$1$$ $$2$$ $$3$$ $$4$$ … Number of square boxes $$(y)$$ $$2$$ $$4$$ $$6$$ $$8$$ …

Now, find the relationship between the two variables $$x$$ and $$y$$.

For $$x = 1$$, $$y = 2$$

$$y$$ can be rewritten as $$y = 2 \times 1$$

As $$x = 1$$, we can write $$y = 2 \times x = 2x$$ - - - - - - - (I)

For $$x = 2$$, $$y = 4$$

$$y$$ can be rewritten as $$y = 2 \times 2$$

As $$x = 2$$, we can write $$y = 2 \times x = 2x$$ - - - - - - - (II)

For $$x = 3$$, $$y = 6$$

$$y$$ can be rewritten as $$y = 2 \times 3$$

As $$x = 3$$, we can write $$y = 2 \times x = 2x$$ - - - - - - - (III)

For $$x = 4$$, $$y = 2$$

$$y$$ can be rewritten as $$y = 2 \times 4$$

As $$x = 4$$, we can write $$y = 2 \times x = 2x$$ - - - - - - - (IV)

From equation (I), (II), (III) and (IV):

We can generalise the relation as $$y = 2 \times x$$ or $$y = 2x$$.