Title: Why does Multiplying a column stochastic matrix with a vector that sums to one result in vector that again has sum one
Tags: matrix;multiplication;stochastic
Question: Suppose I have a ```nxn``` coulmn stochastic matrix. If  I multiply it by a vector of length ```n``` that has elements that sum to one I get a resultant vector of length ```n``` that again sums to one Why does this happen? What if I give the vector of lenght ```n``` sum =0.8 or some 1.2?

Edit:
What happens if one of the columns of the matrix dosent add up to 1?



Here is another answer: Consider matrix ```B=4x4``` and vector ```A=4x1```. Now when we are calculating the output vector sum it can be broken as 

```a1*(b11+b21+b31+b41)+a2*(b12+b22+b32+b42)+a3*(b13+b23+b33+b43)+a4*(b14+b24+b34+b44)
```

Now since all columns sum to 1 since it's column stochastic the 

```sum=a1*1+a2*1+a3*1+a4*1=1
```

since the vector was 1. Now if one of the cols is not 1 we will have that column's contribution reduced for the jth entry of vector A. For eg. if 

```b13+b23+b33+b43=0.8 
```

then 

```sum=a1*1+a2*1+a3*(0.8)+a4*1=a1*1+a2*1+a3*1+a4*1 -0.2*a3 
```

So there is a leak of ```-0.2a*3``` from the original sum of 1


{'source': 'StackExchangeDataset', 'subset': 'stackoverflow.com', 'metadata': {'AnswerCount': 1, 'CommentCount': 0, 'ContentLicense': 'CC BY-SA 3.0', 'CreationDate': '2017:00:03/27/17', 'FavoriteCount': None, 'PostTypeId': 1, 'Tags': '<matrix><multiplication><stochastic>', 'Title': 'Why does Multiplying a column stochastic matrix with a vector that sums to one result in vector that again has sum one', 'ViewCount': 604, 'id': 43040367, 'user_AboutMe': None, 'user_AccountId': 3657904.0, 'user_DisplayName': 'Prateek Agrawal', 'user_Reputation': 153.0, 'user_Views': 54.0, 'user_id': 7107357.0}}