Is there a closed-form way to make a matrix hollow?
Clash Royale CLAN TAG#URR8PPP
up vote
4
down vote
favorite
Let $AinmathbbR^Ntimes N$ a matrix with entries $a_ij ge 0$. I am interested in finding a closed matrix form operation such that $A$ becomes hollow.
In other words, if I want to obtain
$$
tildeAinmathbbR^Ntimes Nquadtextsuch thatquad tildea_ij=a_ij;forall (ineq j)quadtextandquadtildea_ii=0
$$
with constant matrices $P$ and $Q$ such that
$$
tilde A=PAQ
$$
is it possible?
I tried a simple example, when $N=2$ and with brute force I found an interesting correlation with a transformation matrix $Q$ (here $P=I$), but I do not know how (and if) it is generalizable to $N>2$:
$$
A=beginpmatrix
a & b\
c & d
endpmatrix
$$
$$
tildeA=beginpmatrix
0 & b\
c & 0
endpmatrix=PAQ=IAQ=AQ=Acdotfrac1detAbeginpmatrix
-bc & bd\
ac & -bc
endpmatrix
$$
EDIT
From the comments, it has been pointed out that what I seek is not possible, meaning $P$ and $Q$ do not exist. Is there a way to prove this?
linear-algebra matrices linear-transformations matrix-decomposition
 |Â
show 4 more comments
up vote
4
down vote
favorite
Let $AinmathbbR^Ntimes N$ a matrix with entries $a_ij ge 0$. I am interested in finding a closed matrix form operation such that $A$ becomes hollow.
In other words, if I want to obtain
$$
tildeAinmathbbR^Ntimes Nquadtextsuch thatquad tildea_ij=a_ij;forall (ineq j)quadtextandquadtildea_ii=0
$$
with constant matrices $P$ and $Q$ such that
$$
tilde A=PAQ
$$
is it possible?
I tried a simple example, when $N=2$ and with brute force I found an interesting correlation with a transformation matrix $Q$ (here $P=I$), but I do not know how (and if) it is generalizable to $N>2$:
$$
A=beginpmatrix
a & b\
c & d
endpmatrix
$$
$$
tildeA=beginpmatrix
0 & b\
c & 0
endpmatrix=PAQ=IAQ=AQ=Acdotfrac1detAbeginpmatrix
-bc & bd\
ac & -bc
endpmatrix
$$
EDIT
From the comments, it has been pointed out that what I seek is not possible, meaning $P$ and $Q$ do not exist. Is there a way to prove this?
linear-algebra matrices linear-transformations matrix-decomposition
3
Your question isn't clear. Are you looking for a formula/function that accepts a matrix and returns the same matrix but with zeros on the main diagonal?
– GuySa
Jul 27 at 9:58
1
@GuySa Yes, exactly
– Andrea L.
Jul 27 at 10:19
3
To zero out the diagonal of $A$ means to subtracting $A$ by $sum_i=1^nE_iiAE_ii$. As $I_n^2-sum_i=1^n(E_iiotimes E_ii)$ is not a Kronecker product, you cannot obtain the zeroed out $A$ by a matrix product of the form $PAQ$ using constant matrices $P$ and $Q$.
– user1551
Jul 27 at 10:32
1
@AndreaL.: If $n>1$ and the matrix $A$ consists of ones everywhere, i.e. $a_ij=1$ for all $i,j$, such $P$ and $Q$ cannot exist, because $operatornamerank(PAQ)leq 1$ (since $operatornamerank(A)=1$) whereas $operatornamerank(widetildeA)>1$.
– Dejan Govc
Aug 6 at 23:27
1
If @user1551 does not post an answer within the bounty period, I will do so after the bounty has expired. However, Andrea, you may be able to figure it out yourself after reading Wikipedia's page on vectorization, paying special attention to the section on compatibility with Kronecker products.
– Rahul
2 days ago
 |Â
show 4 more comments
up vote
4
down vote
favorite
up vote
4
down vote
favorite
Let $AinmathbbR^Ntimes N$ a matrix with entries $a_ij ge 0$. I am interested in finding a closed matrix form operation such that $A$ becomes hollow.
In other words, if I want to obtain
$$
tildeAinmathbbR^Ntimes Nquadtextsuch thatquad tildea_ij=a_ij;forall (ineq j)quadtextandquadtildea_ii=0
$$
with constant matrices $P$ and $Q$ such that
$$
tilde A=PAQ
$$
is it possible?
I tried a simple example, when $N=2$ and with brute force I found an interesting correlation with a transformation matrix $Q$ (here $P=I$), but I do not know how (and if) it is generalizable to $N>2$:
$$
A=beginpmatrix
a & b\
c & d
endpmatrix
$$
$$
tildeA=beginpmatrix
0 & b\
c & 0
endpmatrix=PAQ=IAQ=AQ=Acdotfrac1detAbeginpmatrix
-bc & bd\
ac & -bc
endpmatrix
$$
EDIT
From the comments, it has been pointed out that what I seek is not possible, meaning $P$ and $Q$ do not exist. Is there a way to prove this?
linear-algebra matrices linear-transformations matrix-decomposition
Let $AinmathbbR^Ntimes N$ a matrix with entries $a_ij ge 0$. I am interested in finding a closed matrix form operation such that $A$ becomes hollow.
In other words, if I want to obtain
$$
tildeAinmathbbR^Ntimes Nquadtextsuch thatquad tildea_ij=a_ij;forall (ineq j)quadtextandquadtildea_ii=0
$$
with constant matrices $P$ and $Q$ such that
$$
tilde A=PAQ
$$
is it possible?
I tried a simple example, when $N=2$ and with brute force I found an interesting correlation with a transformation matrix $Q$ (here $P=I$), but I do not know how (and if) it is generalizable to $N>2$:
$$
A=beginpmatrix
a & b\
c & d
endpmatrix
$$
$$
tildeA=beginpmatrix
0 & b\
c & 0
endpmatrix=PAQ=IAQ=AQ=Acdotfrac1detAbeginpmatrix
-bc & bd\
ac & -bc
endpmatrix
$$
EDIT
From the comments, it has been pointed out that what I seek is not possible, meaning $P$ and $Q$ do not exist. Is there a way to prove this?
linear-algebra matrices linear-transformations matrix-decomposition
edited Aug 3 at 10:09
asked Jul 27 at 8:27


Andrea L.
361514
361514
3
Your question isn't clear. Are you looking for a formula/function that accepts a matrix and returns the same matrix but with zeros on the main diagonal?
– GuySa
Jul 27 at 9:58
1
@GuySa Yes, exactly
– Andrea L.
Jul 27 at 10:19
3
To zero out the diagonal of $A$ means to subtracting $A$ by $sum_i=1^nE_iiAE_ii$. As $I_n^2-sum_i=1^n(E_iiotimes E_ii)$ is not a Kronecker product, you cannot obtain the zeroed out $A$ by a matrix product of the form $PAQ$ using constant matrices $P$ and $Q$.
– user1551
Jul 27 at 10:32
1
@AndreaL.: If $n>1$ and the matrix $A$ consists of ones everywhere, i.e. $a_ij=1$ for all $i,j$, such $P$ and $Q$ cannot exist, because $operatornamerank(PAQ)leq 1$ (since $operatornamerank(A)=1$) whereas $operatornamerank(widetildeA)>1$.
– Dejan Govc
Aug 6 at 23:27
1
If @user1551 does not post an answer within the bounty period, I will do so after the bounty has expired. However, Andrea, you may be able to figure it out yourself after reading Wikipedia's page on vectorization, paying special attention to the section on compatibility with Kronecker products.
– Rahul
2 days ago
 |Â
show 4 more comments
3
Your question isn't clear. Are you looking for a formula/function that accepts a matrix and returns the same matrix but with zeros on the main diagonal?
– GuySa
Jul 27 at 9:58
1
@GuySa Yes, exactly
– Andrea L.
Jul 27 at 10:19
3
To zero out the diagonal of $A$ means to subtracting $A$ by $sum_i=1^nE_iiAE_ii$. As $I_n^2-sum_i=1^n(E_iiotimes E_ii)$ is not a Kronecker product, you cannot obtain the zeroed out $A$ by a matrix product of the form $PAQ$ using constant matrices $P$ and $Q$.
– user1551
Jul 27 at 10:32
1
@AndreaL.: If $n>1$ and the matrix $A$ consists of ones everywhere, i.e. $a_ij=1$ for all $i,j$, such $P$ and $Q$ cannot exist, because $operatornamerank(PAQ)leq 1$ (since $operatornamerank(A)=1$) whereas $operatornamerank(widetildeA)>1$.
– Dejan Govc
Aug 6 at 23:27
1
If @user1551 does not post an answer within the bounty period, I will do so after the bounty has expired. However, Andrea, you may be able to figure it out yourself after reading Wikipedia's page on vectorization, paying special attention to the section on compatibility with Kronecker products.
– Rahul
2 days ago
3
3
Your question isn't clear. Are you looking for a formula/function that accepts a matrix and returns the same matrix but with zeros on the main diagonal?
– GuySa
Jul 27 at 9:58
Your question isn't clear. Are you looking for a formula/function that accepts a matrix and returns the same matrix but with zeros on the main diagonal?
– GuySa
Jul 27 at 9:58
1
1
@GuySa Yes, exactly
– Andrea L.
Jul 27 at 10:19
@GuySa Yes, exactly
– Andrea L.
Jul 27 at 10:19
3
3
To zero out the diagonal of $A$ means to subtracting $A$ by $sum_i=1^nE_iiAE_ii$. As $I_n^2-sum_i=1^n(E_iiotimes E_ii)$ is not a Kronecker product, you cannot obtain the zeroed out $A$ by a matrix product of the form $PAQ$ using constant matrices $P$ and $Q$.
– user1551
Jul 27 at 10:32
To zero out the diagonal of $A$ means to subtracting $A$ by $sum_i=1^nE_iiAE_ii$. As $I_n^2-sum_i=1^n(E_iiotimes E_ii)$ is not a Kronecker product, you cannot obtain the zeroed out $A$ by a matrix product of the form $PAQ$ using constant matrices $P$ and $Q$.
– user1551
Jul 27 at 10:32
1
1
@AndreaL.: If $n>1$ and the matrix $A$ consists of ones everywhere, i.e. $a_ij=1$ for all $i,j$, such $P$ and $Q$ cannot exist, because $operatornamerank(PAQ)leq 1$ (since $operatornamerank(A)=1$) whereas $operatornamerank(widetildeA)>1$.
– Dejan Govc
Aug 6 at 23:27
@AndreaL.: If $n>1$ and the matrix $A$ consists of ones everywhere, i.e. $a_ij=1$ for all $i,j$, such $P$ and $Q$ cannot exist, because $operatornamerank(PAQ)leq 1$ (since $operatornamerank(A)=1$) whereas $operatornamerank(widetildeA)>1$.
– Dejan Govc
Aug 6 at 23:27
1
1
If @user1551 does not post an answer within the bounty period, I will do so after the bounty has expired. However, Andrea, you may be able to figure it out yourself after reading Wikipedia's page on vectorization, paying special attention to the section on compatibility with Kronecker products.
– Rahul
2 days ago
If @user1551 does not post an answer within the bounty period, I will do so after the bounty has expired. However, Andrea, you may be able to figure it out yourself after reading Wikipedia's page on vectorization, paying special attention to the section on compatibility with Kronecker products.
– Rahul
2 days ago
 |Â
show 4 more comments
1 Answer
1
active
oldest
votes
up vote
2
down vote
If I understand the question, you would like to have $$Pbeginbmatrix1&1\1&1endbmatrixQ=beginbmatrix0&1\1&0endbmatrix$$
This is not possible, since the left side has determinant $0$, and the right side has determinant $-1$.
With $N>2$, the story is the same using a matrix of all $1$s, which we can denote $mathbf1$. In that case, you want $$Pmathbf1Q=mathbf1-I$$ The left side has determinant $0$. As for the right side, note that $$(mathbf1-I)left(frac1N-1mathbf1-Iright)=fracNN-1mathbf1-mathbf1-frac1N-1mathbf1+I=I$$ so the right side is invertible, and has nonzero determinant.
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
2
down vote
If I understand the question, you would like to have $$Pbeginbmatrix1&1\1&1endbmatrixQ=beginbmatrix0&1\1&0endbmatrix$$
This is not possible, since the left side has determinant $0$, and the right side has determinant $-1$.
With $N>2$, the story is the same using a matrix of all $1$s, which we can denote $mathbf1$. In that case, you want $$Pmathbf1Q=mathbf1-I$$ The left side has determinant $0$. As for the right side, note that $$(mathbf1-I)left(frac1N-1mathbf1-Iright)=fracNN-1mathbf1-mathbf1-frac1N-1mathbf1+I=I$$ so the right side is invertible, and has nonzero determinant.
add a comment |Â
up vote
2
down vote
If I understand the question, you would like to have $$Pbeginbmatrix1&1\1&1endbmatrixQ=beginbmatrix0&1\1&0endbmatrix$$
This is not possible, since the left side has determinant $0$, and the right side has determinant $-1$.
With $N>2$, the story is the same using a matrix of all $1$s, which we can denote $mathbf1$. In that case, you want $$Pmathbf1Q=mathbf1-I$$ The left side has determinant $0$. As for the right side, note that $$(mathbf1-I)left(frac1N-1mathbf1-Iright)=fracNN-1mathbf1-mathbf1-frac1N-1mathbf1+I=I$$ so the right side is invertible, and has nonzero determinant.
add a comment |Â
up vote
2
down vote
up vote
2
down vote
If I understand the question, you would like to have $$Pbeginbmatrix1&1\1&1endbmatrixQ=beginbmatrix0&1\1&0endbmatrix$$
This is not possible, since the left side has determinant $0$, and the right side has determinant $-1$.
With $N>2$, the story is the same using a matrix of all $1$s, which we can denote $mathbf1$. In that case, you want $$Pmathbf1Q=mathbf1-I$$ The left side has determinant $0$. As for the right side, note that $$(mathbf1-I)left(frac1N-1mathbf1-Iright)=fracNN-1mathbf1-mathbf1-frac1N-1mathbf1+I=I$$ so the right side is invertible, and has nonzero determinant.
If I understand the question, you would like to have $$Pbeginbmatrix1&1\1&1endbmatrixQ=beginbmatrix0&1\1&0endbmatrix$$
This is not possible, since the left side has determinant $0$, and the right side has determinant $-1$.
With $N>2$, the story is the same using a matrix of all $1$s, which we can denote $mathbf1$. In that case, you want $$Pmathbf1Q=mathbf1-I$$ The left side has determinant $0$. As for the right side, note that $$(mathbf1-I)left(frac1N-1mathbf1-Iright)=fracNN-1mathbf1-mathbf1-frac1N-1mathbf1+I=I$$ so the right side is invertible, and has nonzero determinant.
answered yesterday


alex.jordan
36.9k459117
36.9k459117
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f2864180%2fis-there-a-closed-form-way-to-make-a-matrix-hollow%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
3
Your question isn't clear. Are you looking for a formula/function that accepts a matrix and returns the same matrix but with zeros on the main diagonal?
– GuySa
Jul 27 at 9:58
1
@GuySa Yes, exactly
– Andrea L.
Jul 27 at 10:19
3
To zero out the diagonal of $A$ means to subtracting $A$ by $sum_i=1^nE_iiAE_ii$. As $I_n^2-sum_i=1^n(E_iiotimes E_ii)$ is not a Kronecker product, you cannot obtain the zeroed out $A$ by a matrix product of the form $PAQ$ using constant matrices $P$ and $Q$.
– user1551
Jul 27 at 10:32
1
@AndreaL.: If $n>1$ and the matrix $A$ consists of ones everywhere, i.e. $a_ij=1$ for all $i,j$, such $P$ and $Q$ cannot exist, because $operatornamerank(PAQ)leq 1$ (since $operatornamerank(A)=1$) whereas $operatornamerank(widetildeA)>1$.
– Dejan Govc
Aug 6 at 23:27
1
If @user1551 does not post an answer within the bounty period, I will do so after the bounty has expired. However, Andrea, you may be able to figure it out yourself after reading Wikipedia's page on vectorization, paying special attention to the section on compatibility with Kronecker products.
– Rahul
2 days ago