Intereting Posts

Showing that $2 \Gamma(a) \zeta(a) \left(1-\frac{1}{2^{a}} \right) = \int_{0}^{\infty}\left( \frac{x^{a-1}}{\sinh x} – x^{a-2} \right) \, dx$
Is there a general formula for creating close approximations of regular polygons on a regular lattice?
Powers of elements and subgroups
If two coins are flipped and one gets head, what is the probability that both get head?
Number of Ways to Fill a Matrix with symbols subject to Weird contsraint.
dice problem – throws necessary for sum multiple of n
Why is $3$ the multiplicative coefficient in the Collatz conjecture?
For $a_n>0$ such that $\sum a_n $ converges, show that there exist $c_n>0$ such that $c_n\to \infty$ and $\sum a_n c_n$ is finite.
Density of first hitting time of Brownian motion with drift
Can the cardinality of continuum exceed all aleph numbers in ZF?
Sheafyness and relative chinese remainder theorem
Find the limit of $x_n^3/n^2$ if $x_{n+1}=x_{n}+1/\sqrt{x_n}$
What is the difference between independent and mutually exclusive events?
Homology functor commute with direct limit
If $\int_{0}^{x}f(t)dt\rightarrow \infty$ as $|x|\rightarrow \infty\;,$ Then every line $y=mx$ Intersect $ y^2+\int_{0}^{x}f(t)dt=2$

Suppose $\vec x$ is a (non-zero) vector with integer coordinates in $\mathbb R^n$ such that $\|\vec x\| \in \mathbb Z$. Is it true that there is an orthogonal basis of $\mathbb R^n$ containing $\vec x$, consisting of vectors with integer coordinates, all with the same length?

For example: let $\vec x = \left<2,10,11\right>$, so $\|\vec x\| = 15$. Then the vectors $\left<14,-5,2\right>$ and $\left<5,10,-10\right>$ complete a basis of $\mathbb R^3$.

I’ve checked all such integer vectors in $\mathbb R^3$ with an integer length up to 17 and found no counter examples. Moreover, these can always be arranged as a symmetric matrix, possibly changing the order (or permuting the coordinates) and changing signs (**edit:** *not* always; see answer below). For example, the vectors above can be arranged as:

- Proof that (n!+1,(n+1)!+1)=1
- Find all primes $p$ such that $14$ is a quadratic residue modulo $p$.
- For what $n$ and $m$ is this number a perfect square?
- Bezout's Theorem
- Proof: if $p$ is prime, and $0<k<p$ then $p$ divides $\binom pk$
- Legendre symbol $(-21/p)$

$$\begin{bmatrix}14&-5&2\\-5&-10&10\\2&10&11\end{bmatrix}$$

This is easily true if $n$ is even (**edit:** rather, if $n=4$), you can simply permute the entries of $\vec x$ (altering signs appropriately) to find $n-1$ other vectors orthogonal to $\vec x$. In $\mathbb R^3$, finding a second integer vector is sufficient because the cross product of the two (divided by $\|\vec x\|$) will give the third vector of such a basis. Then it is straightforward to prove for special cases (like $\vec x = \left<1,2m,2m^2 \right>$, $m\in \mathbb Z$), but I can’t think of a good reason why this should be true in general.

**Edited**, hopefully for clarity, by o.p. The original phrasing and title referred to $\mathbb Z^n$.

- Show that $x^2+y^2+z^2=999$ has no integer solutions
- How do I show that the sum $(a+\frac12)^n+(b+\frac12)^n$ is an integer for only finitely many $n$?
- Probability Of Union/Intersection Of Two Events
- Olympiad-style question about functions satisfying condition $f(f(f(n))) = f(n+1) + 1$
- Help me to simplify $\sum\limits_{i=0}^{\lfloor\frac{r}{2}\rfloor}\binom{r}{i}\binom{r-i}{r-2i}$
- How do you find all $n$ such that $\phi(n)|n$
- An analogue of Hensel's lifting for Fibonacci numbers
- If $\operatorname{ord}_ma=10$, find $\operatorname{ord}_ma^6$
- Solve the following equation for x and y:
- Does there exist coprime numbers $a$ and $b$ such that $a^n+b$ is composite for every $n$?

Well, if your real question is what @user1551 says, then it is probably true in $\mathbb Z^3.$ See the paper I call Pall_Automorphs_1940 at one of my websites, TERNARY. All that is necessary for this to settle dimension 3 is this: If $n$ is odd and

$$ n^2 = x^2 + y^2 + z^2 $$ with $x$ odd, then we can find $a,b,c,d$ such that

$$ x = a^2 + b^2 – c^2 – d^2, \; \; y = 2(ad – bc), \; \; z = 2(ac+bd) $$

and

$$ n = a^2 + b^2 + c^2 + d^2. $$

This seems likely to me, and may be in one of Pall’s articles. He and Jones found every way to use integral quaternions in studying the sum of three squares.

Other than that, I will need to think about it.

The shortest integral length for which a 3 by 3 such matrix cannot be made symmetric is 39, as in

$$

\left( \begin{array}{ccc}

29 & 22 & 14 \\

2 & 19 & -34 \\

-26 & 26 & 13

\end{array}

\right) .

$$

As the only repeated absolute value is 26, you do not have the three pairs of repeated absolute values necessary for transpositions of rows, or columns, and negation of either to result in symmetry. Actually, I suppose there could be some shorter length where some combinatoric problem prevents symmetry. Hard to tell.

The shortest integral length where you get nine distinct absolute values is 57, as in

$$

\left( \begin{array}{ccc}

47 & 28 & 16 \\

4 & 23 & -52 \\

-32 & 44 & 17

\end{array}

\right) .

$$

The dimension 3 case is looking very good. I was looking in Dickson’s History, volume II, page 271, where he mentions briefly that H. Schubert suggested this in 1902: we consider $4x^2 + 4y^2 + z^2 = n^2 $ with $z,n$ odd and $\gcd(n,z) = 1.$ This is not every case but it is a good start. It follows that with

$$ u = \frac{1}{2}(n-z), \; \; v = \frac{1}{2}(n+z), $$

we also get $\gcd(n,z) = 1.$ Then, from $$ uv = x^2 + y^2, $$ we know that the two factors are separately sums of two squares, that is

$$ v = a^2 + b^2, \; \; u = c^2 + d^2 $$

for some $a,b,c,d.$ But this immediately gives

$$ n = a^2 + b^2 + c^2 + d^2, \; \; z = a^2 + b^2 – c^2 – d^2. $$

That is most of the battle.

FOUND IT. For dimension 3, this is Theorem 3 on page 176 of Jones and Pall (1939) which is on that website, taking $\lambda = 1.$ So dimension 3 is affirmative.

Dimension 4 is also affirmative, because you may begin with any quaternion $t$ and make the evident matrix out of $t,it,jt,kt.$

However, I do not see why that says anything about dimension 6. Given a row of six integers, certainly a rearrangement of pairs, with one extra minus sign for each pair, gives an orthogonal row. I don’t see what to do after that. It is always possible that the octonions give some method for dimensions 5,6,7,8, but I would not be too sure about dimension 9 and above.

EDIT: This is true up to dimension 8. An article that I have, Hsia, J.S. Two theorems on integral matrices. Linear Multilinear Algebra 5, 257-264 (1978). I put a pdf at TERNARY with the name Hsia_1978.pdf. He calls the the Completion problem, answers it in Theorem 2. He also gives my dimension 9 example, page 262. So, I was only about 34 years late. This reference was provided on MO by someone anonymous using the name http://en.wikipedia.org/wiki/Yazdegerd_III , which I really thought was a Dr. Seuss name because of the rhyme, compare http://en.wikipedia.org/wiki/Yertle_the_Turtle_and_Other_Stories and see http://en.wikipedia.org/wiki/Dr._Seuss_bibliography#Dr._Seuss_books

ORIGINAL: Finally got it. The task is impossible for a 9 by 9 matrix with first row

$$ (1,1,1,1,1,1,1,1,1 ). $$

I Win.

The trick is that $$ x^2 \equiv x \pmod 2. $$

So, if I take any ODD number $k,$ and consider a $k^2$ by $k^2$ matrix, then take the first row of the matrix to be all 1’s, we find that there are NO other rows of the same length orthogonal to the first row, because a row $(x_1, \ldots, x_{k^2})$ is required to have squared length $k^2$ in this problem, so

$$ \sum_{j=1}^{k^2} \; x_j^2 \; = \; k^2 \equiv 1 \pmod 2. $$ Then the dot product with the row of all 1’s is

$$ \sum_{j=1}^{k^2} \; x_j \; \equiv \; \sum_{j=1}^{k^2} \; x_j^2 \equiv 1 \pmod 2. $$

That is, the dot product is odd and therefore nonzero. So, in fact, there are just no orthogonal rows of the same squared length, you cannot fill in the entire matrix, you cannot even get a second row.

EDIT: a similar thing can be done for any $n$ by $n$ matrix when $$ n \equiv 1 \pmod 8. $$ So, for example, when $n = 17,$ the matrix cannot be filled in as desired when the first row is $$ (3,1,1,1,1, 1,1,1,1, 1,1,1,1, 1,1,1,1). $$ The entries do not need to be 1, just odd. So, there should be infinitely many first rows (for each $n$) for which this task is impossible, as long as we have $ n \equiv 1 \pmod 8. $ Yes, that is quite easy. Gauss showed that every number is the sum of three triangular numbers, such being $(1/2)(p^2 +p)$ for integer $p \geq 0.$ Now, $8 \cdot (1/2)(p^2 +p)= 4 p^2 + 4 p.$ So we can represent any multiple of 8 as $4 p^2 + 4 p + 4 q^2 + 4 q + 4 r^2 + 4 r$ with integers $p,q,r \geq 0.$ As a result, we may have any odd square we like (no smaller than $n$) as the sum of the squares of $$ (2p+1,2q+1,2r+1,1,1,1, \ldots, 1,1,1,1) $$ with the row being of length $ n \equiv 1 \pmod 8. $ As a result, we can have the length be any odd integer we like, as long as it is at least $\lceil \; \sqrt n \; \rceil.$

EDDDITTT: the part about Gauss and triangular numbers says something stronger, making for far more counterexamples: with $ n \equiv 1 \pmod 8, $ we may specify any $n-3$ odd numbers we like, then use the final three positions (also odd numbers) to force integral length, as requested in the original problem. Hence this example:

$$ (1,3,5,7,9,11,13,17,25) $$ which has length 37. But any other integer vector of length 37 has an odd, hence nonzero, inner product with this vector.

**This answer is wrong. And let it remain there as a reminder for me.**

Some thoughts:

For any integer $N \times 1$ vector , you can find another $N-1$ orthogonal set of vectors in the rational field. This is always true. Since it is in the rational field, you can multiply by a large integer, and make them all have integer entries.

Now we have seen that for every integer vector, you can find a integer orthogonal basis. But we have neglected the length part.

Let us say you have two integer vectors $\vec{x}$ and $\vec{y}$. Then there always exist a positive number $c_1$ and another positive number $c_2$ such that $c_1||\vec{x}||=c_2||\vec{y}||$. I think this should be true for any number of integer vectors. If that is true, then you can past the length part also.

No, in fact, to extend $(a_1,\cdots,a_n)$ to a basis of $\mathbb{Z}^n$ a necessary and sufficient condition is that $\text{gcd}(a_1,\cdots,a_n)=1$. To see necessity, suppose for a second that $(a_1,\cdots,a_n)=x_1$ extends to a basis $\{x_1,\cdots,x_n\}$ for $\mathbb{Z}^n$. We know then that the matrix

$$A=\left(\begin{array}{c|c|c} & & \\ x_1 & \cdots & x_n\\ & & \end{array}\right)$$

is in $\text{GL}_n(\mathbb{Z})$ so that $\det(A)=\pm 1$. But, by expanding along the first column you find that

$$\pm1=\det(A)=m_1 a_1+\cdots +m_n a_n$$

so that $\text{gcd}(a_1,\cdots,a_n)$ is $1$ as desired. So, taking $(0,0,2)$ which has integer length, but can’t be extended to a basis, let alone an orthogonal one.

Computer program for size 5, which seems to hold up as well as 3,4. No idea why.

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

```
#include <iostream>
#include <stdlib.h>
#include <fstream>
#include <strstream>
#include <list>
#include <set>
#include <math.h>
#include <iomanip>
#include <string>
#include <algorithm>
#include <iterator>
using namespace std;
// compile as
// g++ -o size_5 size_5.cc -lm
// then run with
// ./size_5
const int ENTRY_BOUND = 6 ;
class vex5
{
friend ostream & operator<< (ostream &, const vex5 &);
public:
vex5();
vex5(int,int,int,int,int);
void setFields(int,int,int,int,int);
int GetV() const;
int GetW() const;
int GetX() const;
int GetY() const;
int GetZ() const;
int operator == ( const vex5 & ) const;
int operator < ( const vex5 & ) const;
int Norm() const;
int Dot(const vex5 &) const;
private:
int v;
int w;
int x;
int y;
int z;
} ;
vex5::vex5()
{
setFields(0,0,0,0,0) ;
}
vex5::vex5(int v1, int w1,int x1, int y1, int z1)
{
setFields(v1, w1, x1,y1,z1) ;
}
void vex5::setFields(int v1, int w1, int x1, int y1, int z1)
{
v = v1; w = w1; x = x1 ; y = y1 ; z = z1 ;
}
int vex5::Norm() const
{
return v * v + w * w + x * x + y * y + z * z;
}
int vex5::Dot(const vex5 & right) const
{
return v * right.v + w * right.w + x * right.x + y * right.y + z * right.z;
}
int vex5::GetV() const
{
return v;
}
int vex5::GetW() const
{
return w;
}
int vex5::GetX() const
{
return x;
}
int vex5::GetY() const
{
return y;
}
int vex5::GetZ() const
{
return z;
}
int vex5::operator == ( const vex5 & right) const
{
return v == right.v && w == right.w && x == right.x && y == right.y && z == right.z ;
}
int vex5::operator < ( const vex5 & right) const
{
int boo ;
boo = (v < right.v) ;
boo = boo || ( (v == right.v) && ( w < right.w ) ) ;
boo = boo || ( (v == right.v) && ( w == right.w ) && (x < right.x)) ;
boo = boo || ( (v == right.v) && ( w == right.w ) && (x == right.x) && (y < right.y)) ;
boo = boo || ( (v == right.v) && ( w == right.w ) && (x == right.x) && (y == right.y) && (z < right.z)) ;
return boo ;
}
ostream & operator<< (ostream & output, const vex5 & h)
{
// output << setiosflags(ios::left) ;
output << setw(6) << h.v ; // Disc <2,000,000: a < 100
output << setw(6) << h.w ; // Disc <2,000,000: b < 1000
output << setw(6) << h.x ; // Disc <2,000,000: c < 1000000
output << setw(6) << h.y ; // Disc <6,013,006: d > -1000
output << setw(6) << h.z ; // { 2, n+1, n+1, -n, 1, 1 }
return output; // Deitel and Deitel page 445
}
int IntSqrt(int i)
{
// cerr << "called intsqrt with " << i << endl;
if ( i <= 0 ) return 0;
else if ( i <= 3) return 1;
else if ( i >= 2147395600) return 46340;
else
{
float r;
r = 1.0 * i;
r = sqrt(r);
int root = (int) ceil(r);
while ( root * root <= i ) ++root;
while ( root * root > i ) --root;
return root ;
}
}
int SquareQ(int i)
{
if ( i < 0 ) return 0;
else if ( i <= 1) return 1;
else
{
int root = IntSqrt(i);
return i == root * root ;
}
}
int main()
{
// g++ -o size_5 size_5.cc -lm
int keepgoing = 1;
for( int a = 1; keepgoing && a <= ENTRY_BOUND; ++a){
for( int b = 0; keepgoing && b <= a; ++b) {
for( int c = 0; keepgoing && c <= b; ++c) {
for( int d = 0; keepgoing && d <= c; ++d) {
for( int e = 0; keepgoing && e <= d; ++e) {
vex5 given(a,b,c,d,e);
int norm = given.Norm();
// cout << norm << endl << endl;
if ( SquareQ( norm))
{
set<vex5> smegma;
int root = IntSqrt(norm) ;
cout << setw(12) << norm << setw(12) << root << endl << endl;
for(int v = -root; v <= root; ++v){
for(int w = -root; w <= root; ++w){
for(int x = -root; x <= root; ++x){
for(int y = -root; y <= root; ++y){
for(int z = -root; z <= root; ++z){
vex5 spooge(v,w,x,y,z);
if( norm == spooge.Norm() && 0 == spooge.Dot(given) ) smegma.insert(spooge) ;
}}}}} // for vwxyz
// int a_bound = IntSqrt(n);
int boo = 1;
set<vex5>::iterator it1;
set<vex5>::iterator it2;
set<vex5>::iterator it3;
set<vex5>::iterator it4;
for(it1 = smegma.begin() ; boo && it1 != smegma.end() ; ++it1)
{
vex5 u = *it1;
for(it2 = it1 ; boo && it2 != smegma.end() ; ++it2)
{
vex5 v = *it2;
// cout << setw(8) << u << setw(8) << v << endl;
if ( 0 == v.Dot(u) )
{
for(it3 = it2 ; boo && it3 != smegma.end() ; ++it3)
{
vex5 w = *it3;
if ( 0 == w.Dot(u) && 0 == w.Dot(v) )
{
for(it4 = it3 ; boo && it4 != smegma.end() ; ++it4)
{
vex5 x = *it4;
if ( 0 == x.Dot(u) && 0 == x.Dot(v) && 0 == x.Dot(w) )
{
boo = 0;
cout << given << endl;
cout << u << endl;
cout << v << endl;
cout << w << endl;
cout << x << endl;
cout << endl;
} // if success
} // for it4
} // if w perp u,v
} // for it3
} // if u perp v
} // for it2
} // for it1
cout << endl << endl;
if(boo){
cout << "FAILURE" << given << endl << endl;
keepgoing = 0;
} // if failure
} // if norm is squre
}}}}} // for abcde
// g++ -o size_5 size_5.cc -lm
return 0 ;
}
```

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

```
1 1
1 0 0 0 0
0 -1 0 0 0
0 0 -1 0 0
0 0 0 -1 0
0 0 0 0 -1
4 2
1 1 1 1 0
-1 -1 1 1 0
-1 1 -1 1 0
-1 1 1 -1 0
0 0 0 0 -2
4 2
2 0 0 0 0
0 -2 0 0 0
0 0 -2 0 0
0 0 0 -2 0
0 0 0 0 -2
9 3
2 2 1 0 0
-2 1 2 0 0
-1 2 -2 0 0
0 0 0 -3 0
0 0 0 0 -3
16 4
2 2 2 2 0
-3 1 1 1 -2
-1 -1 -1 3 2
-1 -1 3 -1 2
-1 3 -1 -1 2
9 3
3 0 0 0 0
0 -3 0 0 0
0 0 -3 0 0
0 0 0 -3 0
0 0 0 0 -3
16 4
3 2 1 1 1
-2 0 2 2 2
-1 2 -3 1 1
-1 2 1 -3 1
-1 2 1 1 -3
25 5
3 2 2 2 2
-2 -3 2 2 2
-2 2 -3 2 2
-2 2 2 -3 2
-2 2 2 2 -3
36 6
3 3 3 3 0
-5 1 1 3 0
-1 -1 5 -3 0
-1 5 -1 -3 0
0 0 0 0 -6
16 4
4 0 0 0 0
0 -4 0 0 0
0 0 -4 0 0
0 0 0 -4 0
0 0 0 0 -4
25 5
4 2 2 1 0
-2 -1 4 2 0
-2 4 -1 2 0
-1 2 2 -4 0
0 0 0 0 -5
25 5
4 3 0 0 0
-3 4 0 0 0
0 0 -5 0 0
0 0 0 -5 0
0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
-3 8 -2 -2 0
0 -1 0 -4 8
0 0 -6 6 3
100 10
6 4 4 4 4
-8 3 3 3 3
0 -7 -1 1 7
0 -5 5 5 -5
0 -1 7 -7 1
64 8
6 5 1 1 1
-4 6 -2 -2 -2
-2 1 -3 5 5
-2 1 5 -3 5
-2 1 5 5 -3
81 9
6 5 4 2 0
-6 2 4 5 0
-3 6 0 -6 0
0 -4 7 -4 0
0 0 0 0 -9
81 9
6 6 2 2 1
-6 3 4 4 2
-3 6 -4 -4 -2
0 0 -6 3 6
0 0 -3 6 -6
81 9
6 6 3 0 0
-6 3 6 0 0
-3 6 -6 0 0
0 0 0 -9 0
0 0 0 0 -9
121 11
6 6 6 3 2
-8 1 4 2 6
-4 2 4 2 -9
-2 8 -7 2 0
-1 4 2 -10 0
144 12
6 6 6 6 0
-10 2 2 6 0
-2 -2 10 -6 0
-2 10 -2 -6 0
0 0 0 0 -12
169 13
6 6 6 6 5
-11 2 2 2 6
-2 -5 2 10 -6
-2 2 10 -5 -6
-2 10 -5 2 -6
```

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

- What rational numbers have rational square roots?
- What is the divergence of a matrix valued function?
- Operator norm. Alternative definition
- convergence of alternating series — weakening a hypothesis
- How to write two for loops in math notation?
- Inverse Laplace of $ \frac{1}{\sqrt{s} – 1} $?
- Aren't vacuous statements True and False simultaneously?
- Roundest ellipse with specified tangents
- Sequence converges iff $\limsup = \liminf$
- A variant of the Monty Hall problem
- Probability that an undirected graph has cycles
- $\int \frac{\sin^3x}{\sin^3x + \cos^3x)}$?
- Crossing the road
- What does the big intersection or union sign of a set mean?
- How to reverse the $n$ choose $k$ formula?