Ok, imagine I have this Matrix: {{1,2},{2,3}}, and I\'d rather have {{4,1,2},{5,2,3}}. That is, I prepended a column to the matrix. Is there an easy way to do it?
My
Since ArrayFlatten was introduced in Mathematica 6 the least obfuscated solution must be
ArrayFlatten
matrix = {{1, 2}, {2, 3}} vector = {{4}, {5}} ArrayFlatten@{{vector, matrix}}
A nice trick is that replacing any matrix block with 0 gives you a zero block of the right size.
0