Revision history [back]

The given matrix equation implies that the minimal polynomial of $A$ divides $f(x):=p^2 x^{p^2} - q^2 x^{q^2} - 1$. It follows that $A$ can be constructed as a block diagonal matrix $\begin{bmatrix} C_g & 0\\ 0 & I_{n-d} \end{bmatrix}$ for any divisor $g(x)\mid f(x)$ of degree $d:=\deg g(x)\leq n$, where $C_g$ is the companion matrix of $g(x)$.

Here is a sample code that constructs and prints such matrices:

def compA(n,p,q,r):
assert p^2 == q^2 + r^2
R.<x> = PolynomialRing(QQ)
f = p^2*x^(p^2) - q^2*x^(q^2) - r^2
for g in divisors(f):
if g.degree()>n:
continue
A = block_diagonal_matrix(companion_matrix(g), identity_matrix(n-g.degree()))
print(A)


The given matrix equation implies that the minimal polynomial of $A$ divides $f(x):=p^2 x^{p^2} - q^2 x^{q^2} - 1$. It follows that $A$ can be constructed as a block diagonal matrix $\begin{bmatrix} C_g & 0\\ 0 & I_{n-d} \end{bmatrix}$ for any divisor $g(x)\mid f(x)$ of degree $d:=\deg g(x)\leq n$, where $C_g$ is the companion matrix of $g(x)$.

Here is a sample code that constructs and prints such matrices:

def compA(n,p,q,r):
assert p^2 == q^2 + r^2
R.<x> = PolynomialRing(QQ)
f = p^2*x^(p^2) - q^2*x^(q^2) - r^2
for g in divisors(f):
if g.degree()>n:
continue
A = block_diagonal_matrix(companion_matrix(g), identity_matrix(n-g.degree()))
print(A)


Similarly $A$ can be taken as a block diagonal matrix with blocks $C_{g_1}, \dots, C_{g_k}$ where each $g_i(x)\mid f(x)$ and $\sum_{i=1}^k \deg g_i(x) = n$.

The given matrix equation implies that the minimal polynomial of $A$ divides $f(x):=p^2 x^{p^2} - q^2 x^{q^2} - 1$. It follows that $A$ can be constructed as a block diagonal matrix matrix $\begin{bmatrix} C_g & 0\\ 0 & I_{n-d} \end{bmatrix}$ for any divisor $g(x)\mid f(x)$ of degree $d:=\deg g(x)\leq n$, where $C_g$ is the companion matrix matrix of $g(x)$.

Here is a sample code that constructs and prints such matrices:

def compA(n,p,q,r):
assert p^2 == q^2 + r^2
R.<x> = PolynomialRing(QQ)
f = p^2*x^(p^2) - q^2*x^(q^2) - r^2
for g in divisors(f):
if g.degree()>n:
continue
A = block_diagonal_matrix(companion_matrix(g), identity_matrix(n-g.degree()))
print(A)


Similarly More generally, $A$ can be taken as a block diagonal matrix with blocks $C_{g_1}, \dots, C_{g_k}$ C_{g_k}$, where each$g_i(x)\mid f(x)$and$\sum_{i=1}^k \deg g_i(x) = n$.n$. Matrices similar to such $A$ will also satisfy the given matrix equation.

The given matrix equation implies that the minimal polynomial of $A$ divides $f(x):=p^2 x^{p^2} - q^2 x^{q^2} - 1$. It follows that $A$ can be constructed as a block diagonal matrix $\begin{bmatrix} C_g & 0\\ 0 & I_{n-d} \end{bmatrix}$ for any divisor $g(x)\mid f(x)$ of degree $d:=\deg g(x)\leq n$, where $C_g$ is the companion matrix of $g(x)$.

Here is a sample code that constructs and prints such matrices:

def compA(n,p,q,r):
assert p^2 == q^2 + r^2
R.<x> = PolynomialRing(QQ)
PolynomialRing(ZZ)
f = p^2*x^(p^2) - q^2*x^(q^2) - r^2
for g in divisors(f):
if g.degree()>n:
continue
A = block_diagonal_matrix(companion_matrix(g), identity_matrix(n-g.degree()))
print(A)


More generally, $A$ can be taken as a block diagonal matrix with blocks $C_{g_1}, \dots, C_{g_k}$, where each $g_i(x)\mid f(x)$ and $\sum_{i=1}^k \deg g_i(x) = n$. Matrices similar to such $A$ will also satisfy the given matrix equation.

The given matrix equation implies that the minimal polynomial of $A$ divides $f(x):=p^2 x^{p^2} - q^2 x^{q^2} - 1$. r^2$. It follows that$A$can be constructed as a block diagonal matrix$\begin{bmatrix} C_g & 0\\ 0 & I_{n-d} \end{bmatrix}$for any divisor$g(x)\mid f(x)$of degree$d:=\deg g(x)\leq n$, where$C_g$is the companion matrix of$g(x)$. Here is a sample code that constructs and prints such matrices: def compA(n,p,q,r): assert p^2 == q^2 + r^2 R.<x> = PolynomialRing(ZZ) f = p^2*x^(p^2) - q^2*x^(q^2) - r^2 for g in divisors(f): if g.degree()>n: continue A = block_diagonal_matrix(companion_matrix(g), identity_matrix(n-g.degree())) print(A)  More generally,$A$can be taken as a block diagonal matrix with blocks$C_{g_1}, \dots, C_{g_k}$, where each$g_i(x)\mid f(x)$and$\sum_{i=1}^k \deg g_i(x) = n$. Matrices similar to such$A$will also satisfy the given matrix equation. The given matrix equation implies that the minimal polynomial of$A$divides$f(x):=p^2 x^{p^2} - q^2 x^{q^2} - r^2$. It follows that$A$can be constructed as a block diagonal matrix$\begin{bmatrix} C_g & 0\\ 0 & I_{n-d} \end{bmatrix}$for any monic divisor$g(x)\mid f(x)$of degree$d:=\deg g(x)\leq n$, where$C_g$is the companion matrix of$g(x)$. Here is a sample code that constructs and prints such matrices: def compA(n,p,q,r): assert p^2 == q^2 + r^2 R.<x> = PolynomialRing(ZZ) f = p^2*x^(p^2) - q^2*x^(q^2) - r^2 for g in divisors(f): if g.degree()>n: g.degree()>n and not g.is_monic(): continue A = block_diagonal_matrix(companion_matrix(g), identity_matrix(n-g.degree())) print(A)  More generally,$A$can be taken as a block diagonal matrix with blocks$C_{g_1}, \dots, C_{g_k}$, where each$g_i(x)\mid f(x)g_i(x)$is a monic divisor of$f(x)$, and$\sum_{i=1}^k \deg g_i(x) = n$. Matrices similar to such$A$will also satisfy the given matrix equation. The given matrix equation implies that the minimal polynomial of$A$divides$f(x):=p^2 x^{p^2} - q^2 x^{q^2} - r^2$. It follows that$A$can be constructed as a block diagonal matrix$\begin{bmatrix} C_g & 0\\ 0 & I_{n-d} \end{bmatrix}$for any monic divisor$g(x)\mid f(x)$of degree$d:=\deg g(x)\leq n$, where$C_g$is the companion matrix of$g(x)$. Here is a sample code that constructs and prints such matrices: def compA(n,p,q,r): assert p^2 == q^2 + r^2 R.<x> = PolynomialRing(ZZ) f = p^2*x^(p^2) - q^2*x^(q^2) - r^2 for g in divisors(f): if g.degree()>n and or not g.is_monic(): continue A = block_diagonal_matrix(companion_matrix(g), identity_matrix(n-g.degree())) print(A)  More generally,$A$can be taken as a block diagonal matrix with blocks$C_{g_1}, \dots, C_{g_k}$, where each$g_i(x)$is a monic divisor of$f(x)$, and$\sum_{i=1}^k \deg g_i(x) = n$. Matrices similar to such$A\$ will also satisfy the given matrix equation.