# How to show that $x^t A x$ is divisible by $2$ where $A$ is an $n \times n$ symmetric matrix with all its diagonal entries are zero?

Let $$A$$ is a symmetric matrix with all diagonal element zero.

How to show that the dot product of $$x$$ with $$Ax$$ is divisible by $$2$$ ?

I can only verify for matrix of order (size) $$2, 3, 4$$ but not sure about general $$n×n$$ matrix.

Edit: Here, $$x$$ is any vector in $$\Bbb{Z}^n$$.

If $$A$$ is real symmetric matrix with all diagonal elements $$0$$, then prove that $$x^{T}Ax$$ is divisible by $$2$$. ( Here $$x$$ is any vector in $$\mathbb{Z}^{n}$$, and $$x^T$$ denotes transpose of $$x$$ )

$$2$$nd edit: If $$A$$ is integer entry symmetric matrix with all diagonal elements $$0$$, then prove that $$x^{T}Ax$$ is divisible by $$2$$.

• Your question needs mor information, such as: What ist $x$, what is $A$? In particular, are the entries of $A$ integers? What do you mean by "divisible"? Also, use MathJax to typeset mathematical content. Aug 1, 2022 at 8:18
• Sorry, I am posting for first time, not even sure how to type mathematics character, x is any vector in R^n Aug 1, 2022 at 8:20
• There's a mathjax tutorial here: math.meta.stackexchange.com/questions/5020/… Aug 1, 2022 at 8:21
• thank you, so much I got it. Aug 1, 2022 at 8:23
• Your specifications do have some problems. If $x\in\mathbb R^n$ the result of $\langle Ax, x\rangle$ must not even be integral. I believe you want to have $x\in\mathbb Z^n$ and $A\in\mathbb Z^{n\times n}$.
– Lazy
Aug 1, 2022 at 9:07

Let $$A=(a_{ij})$$ be a symmetric matrix with $$a_{ii}=0$$.

Then by symmetry $$a_{ij}=a_{ji}$$

Let $$Q_A:\Bbb{R}^n\to \Bbb{R}$$ is the quadratic form associated with $$A$$.

\begin{align}Q(x) =x^TAx&=\sum_{i,j}a_{ij}x_ix_j\\&=2\sum_{i\neq j, i>j}a_{ij}x_ix_j\end{align}

If $$A\in M_n(\Bbb{Z})$$ and $$x\in \Bbb{Z}^n$$ , then clearly $$2\mid Q(x)$$

Let $$A=\begin{pmatrix}0&{\frac{1}{2}}\\ {\frac{1}{2}}&0\end{pmatrix}$$

Then \begin{align}Q(x) =x^TAx&= \frac{1}{2}x_1x_2+\frac{1}{2}x_2x_1\\&=x_1x_2\end{align}

Clearly $$2\mid Q(x)$$ for all $$x\in \Bbb{R^2}\setminus \{0\}$$ is false.

$$A=\begin{pmatrix}0&1\\ {1}&0\end{pmatrix}$$

Then $$Q(x) =2x_1x_2$$

Let $$x=\begin{pmatrix}\frac{1}{2}\\\frac{1}{2}\end{pmatrix}$$

Then $$Q(x) =\frac{1}{2}$$ and $$2\nmid Q(x)$$.

Hence $$2\mid Q(x)$$ if $$a_{ij},x_i\in \Bbb{Z}$$

• Are you sure you have shown (in general) that $2|Q(x)$ implies that $a_{ij}, x_i\in\mathbb{Z}$? Aug 1, 2022 at 10:29
• @Thomas My bad. I have shown if part. Aug 1, 2022 at 10:31