How to determine the function is linear in linear regression problem?
A function $x = (x_1, \dots, x_n) \mapsto f(x_1, \dots, x_n) \in \mathbb{R}$  is linear if and only if for every $a,b \in \mathbb{R}$ it holds that $f(a (x_1, \dots, x_n) + b (\xi_1, \dots, \xi_n)) = a  f(x_1, \dots, x_n) + b f(\xi_1, \dots,\xi_n)$.

In your second example try computing $f(a x + b \xi)$ to see that the last term $w_3 x_1 x_3$ will make $f(a x + b \xi) \neq a f(x) + b f(\xi)$.

The third  example has a coefficient which is expressed as a product, but the function remains linear (just rename $w_3 w_4$ to $w$).