Happiness scenario from worksheet

Matrix A:

A={{0.25,0.5,0.1},{0.5,0.4,0.1},{0.25,0.1,0.8}};
MatrixForm[A]

Multiply A·A:

A.A //MatrixForm

Define the initial vector (Subscript[x, 0]):

x0={0.3,0.5,0.2}

Compute (A^52)·(Subscript[x, 0]):

MatrixPower[A,52].x0//MatrixForm

Compute (A^100)·(Subscript[x, 0]):

MatrixPower[A,100].x0//MatrixForm

Compute (A^1000)·(Subscript[x, 0]):

MatrixPower[A,1000].x0//MatrixForm

Multiply matrix A times the steady-state vector

A.{0.252874,0.287356,0.45977}

Row-reduce A-(Subscript[I, 3]):

RowReduce[A-IdentityMatrix[3]]//MatrixForm

The solution to (A-(Subscript[I, 3]))x=0 involves a free variable. Say (Subscript[x, 3]) is free; then (Subscript[x, 1])=0.55(Subscript[x, 3]) and (Subscript[x, 2])=0.625(Subscript[x, 3]). Choose (Subscript[x, 3]) to be anything, such as (Subscript[x, 3])=1; then (Subscript[x, 1])=0.55 and (Subscript[x, 2])=0.625. Since we want a probability vector divide ((Subscript[x, 1]),(Subscript[x, 2]),(Subscript[x, 3])) by the sum of all three:

(1/(0.55+0.625+1)){0.55,0.625,1}

This is the same steady-state vector we found earlier!