# Is such a matrix possible?

## Recommended Posts

I want a matrix W of size nxk (where n>>k) with the following two properties:

1. Sum of all elements of each row is equal to one, i.e. Sumj wij = 1 for all i.
2. Sum of squares of all elements of each column is equal to one, i.e. Sumi wij2 = 1 for all j.
Is such a matrix possible? Any hint at how to prove one way or the other would be appreciated. Thanks in advance.
##### Share on other sites

Sure. A trivial example would be $w_{i1}=1$, and $w_{ij}=0$ for all $j\neq 1$.

##### Share on other sites

Sure. A trivial example would be $w_{i1}=1$, and $w_{ij}=0$ for all $j\neq 1$.

How does that satisfy the second property?

Are negative numbers allowed?

=Uncool-

##### Share on other sites

How does that satisfy the second property?

Are negative numbers allowed?

=Uncool-

Because 12=1, and the rest of the elements in the row are zero. So $\sum_j (w_{ij})^2=1^2+0^2+0^2+...+0^2=1$.

EDIT: You're right, I read the question wrong. The simplest matrix I can think of which satisfies 1. and 2. is the identity matrix, but that doesn't satisfy the condition that n>>k.

Edited by elfmotat
##### Share on other sites

It's a bit cheesy, but if you let $n=k^2$ and set every element to $\frac{1}{k}$, then for sufficiently large $k$ you'll have such a matrix.

##### Share on other sites

It's a bit cheesy, but if you let $n=k^2$ and set every element to $\frac{1}{k}$, then for sufficiently large $k$ you'll have such a matrix.

Condition 1. is satisfied by setting every element to $1/k$, but condition 2. is only satisfied if $n/k=1$, i.e $n=k$ in which case the condition that $n\gg k$ is not satisfied.

##### Share on other sites

Condition 1. is satisfied by setting every element to $1/k$, but condition 2. is only satisfied if $n/k=1$, i.e $n=k$ in which case the condition that $n\gg k$ is not satisfied.

I'm not sure I follow. If we have an $n \times k$ matrix with $n=k^2$ and each element set to $\frac{1}{k}$, then each column will consist of $k^2$ elements of $\frac{1}{k}$ each. Since condition 2 deals with the sum of the squares along each column, we end up with $k^2 \left(\frac{1}{k^2}\right) =1$, as condition 2 requires.

Edited by John
##### Share on other sites

I'm not sure I follow. If we have an $n \times k$ matrix with $n=k^2$ and each element set to $\frac{1}{k}$, then each column will consist of $k^2$ elements of $\frac{1}{k}$ each. Since condition two deals with the sum of the squares along each column, we end up with $k^2 \left(\frac{1}{k^2}\right) =1$, as condition 2 requires.

Nevermind, you're right. Fortunately/unfortunately I'm a bit intoxicated at the moment.

## Create an account

Register a new account