Create a pyramidal matrix
Python 2, 109 99 98



n=input()
r=range(1,abs(n)+1)
l=r+r[~n|-2::-1]
for j in l:print[abs((n&lt;0)*~-n+min(i,j))for i in l]


Create list

l = [1,2,3,4,5,4,3,2,1]


and play with it a little.



edit: new way of creating list + thx Lynn for two bytes