Let $\mathbb{B}=\{0,1\}$. Let's consider a linear operator $A:\mathbb{B}^{n}\to\mathbb{B}^{n}$ defined by the matrix $A=(a_{ij})$ with elements from the field $\mathbb{B}=\{0,1\}$. That is, $y=Ax$ means that $$ y_{i}=\bigoplus_{j=1}^{n}a_{ij}x_{j}, \quad i=\overline{1,n}. $$ The symbol $\bigoplus$ denotes the sum modulo 2.
Let $m$ be some fixed positive integer, $1 < m < n$.
Let's consider the set $$ L=\Big\{x=(x_{1},\ldots,x_{n})\in\mathbb{B}^{n}:\,\sum_{j=1}^{n}x_{j}=m\Big\}. $$ Here, the sum is the usual sum, NOT modulo 2.
Question. Under what conditions on the matrix $A$ it is true that if $x\in L$ then $y=Ax\in L$ for every $x\in L$?
In other words, under what conditions on the matrix $A$ the condition $\sum\limits_{j=1}^{n}x_{j}=m$ implies $\sum\limits_{i=1}^{n}y_{i}=m$?
If the same question were for the linear operator $A:\mathbb{R}^{n}\to\mathbb{R}^{n}$ where $$ y_{i}=\sum_{j=1}^{n}a_{ij}x_{j}, \quad i=\overline{1,n}, $$ with the usual sum, then as I see it would be solved simply: $$ \sum_{i=1}^{n}y_{i}=\sum_{i=1}^{n}\sum_{j=1}^{n}a_{ij}x_{j}=\sum_{j=1}^{n}\sum_{i=1}^{n}a_{ij}x_{j}= \sum_{j=1}^{n}\Big(x_{j}\sum_{i=1}^{n}a_{ij}\Big)=m=\sum_{j=1}^{n}x_{j}, $$ and such a condition would be the following one: $$ \sum_{i=1}^{n}a_{ij}=1, \quad j=\overline{1,n}. $$ But the problem is that in the case of the operator $A:\mathbb{B}^{n}\to\mathbb{B}^{n}$ $$ \sum_{i=1}^{n}y_{i}=\sum_{i=1}^{n}\bigoplus_{j=1}^{n}a_{ij}x_{j}\neq \bigoplus_{j=1}^{n}\sum_{i=1}^{n}a_{ij}x_{j}. $$ What to do in this case? Thank you in advance for your help.