the slightly stronger fact that for these matrices, the only convex invariant set is the unit square $$S=\{(x,y)\in\mathbb{R}^2|\ ||(x,y)||_\infty\leq 1\},$$ or, of course, a scaling of it.

Let $\mathcal{A}=\{A_1,A_2\}$ and let $\mathcal{A}^*$ denote the set of all matrix products out of $\mathcal{A}$. Suppose for the sake of contradiction that there was a convex bivariate polynomial $p$ whose unit level set was the boundary of an invariant set for the switched system defined by $\mathcal{A}$. More precisely, suppose we had $$\label{eqn-contrex-lyap}\forall x \in {{\mathbb R}}^2,\ \forall A\in \mathcal{A}, \quad p(Ax) \leq p(x).$$ Let $x^*\in\mathbb{R}$ be such that It is easy to check that the following matrices can be obtained as products of matrices in $\mathcal{A}$: $$\label{eqn-ando-semigroup}
\left \{  
\begin{pmatrix}
0 & 1\\
0 & -1
\end{pmatrix},\ \begin{pmatrix}
0 & 1\\
0 & 1
\end{pmatrix}
         ,\
\begin{pmatrix}
0 & -1\\
0 & 1
\end{pmatrix},\right \}\quad \subset {{\cal{A}}}^*.$$ This implies that $$\begin{aligned}
\nonumber p({\bf x})&=&1 \\
\nonumber \mbox{for } {\bf x}&\in&\{(x^*,-x^*),(-x^*,-x^*),(-x^*,x^*)\}\end{aligned}$$ as well, because these points can all be mapped onto each other with matrices from (\[eqn-ando-semigroup\]).

Suppose that there is an $x>x^*,$ $-x^*<y<x^*,$ such that Then we reach a contradiction because (\[eqn-ando-semigroup\]) implies that $(x,y)$ can be mapped on $(x,x),$ which contradicts 