I have a matrix in 2x2
a ={{x, y}, {z, u}}
I want to expand this matrix 3x3
b ={{x, y, y}, {z, u, x}, {z, x, u}}
4x4
c ={{x, y, y, y}, {z, u, x, x}, {z, x, u, x}, {z, x, x, u}}
5x5
d ={{x, y, y, y, y}, {z, u, x, x, x}, {z, x, u, x, x}, {z, x, x, u, x}, {z, x, x, x, u}}
and soon...
Basically, I am adding a row and column each time. How to do this automatically, without writing each time?
Edit:
Now consider x, y,z and u are also 2x2 matrices.
Lets
x={{0,1},{1,0}}, y={{1,1},{1,0}}, z={{1,0},{1,1}}
and
u = {{p,q},{r,s}}.
How I can get a,b,c and d (defined above) in this case?



