# reshape(Module,Module,Matrix) -- reshape a matrix

## Synopsis

• Function: reshape
• Usage:
reshape(F,G,f)
• Inputs:
• F, , a free module
• G, , a free module
• f,
• Outputs:
• , F <-- G obtained from f by taking elements from the first column of f, then the second, and so on, filling them into the result column by column.

## Description

Currently, it is assumed that f and the result both have the same number of entries. The resulting map has the same degree that f has, but it is easy to spoil homogeneity by giving incorrect free modules.
 i1 : f = matrix{{1,3,5,7,9,11},{2,4,6,8,10,12}} o1 = | 1 3 5 7 9 11 | | 2 4 6 8 10 12 | 2 6 o1 : Matrix ZZ <--- ZZ i2 : reshape(ZZ^3,ZZ^4,f) o2 = | 1 4 7 10 | | 2 5 8 11 | | 3 6 9 12 | 3 4 o2 : Matrix ZZ <--- ZZ