const column Array = this.matrix Array[0].map((entry, index) => this.matrix Array.map(row => row[index])); code example
Example: transpose an array in javascript
array[0].map((_, colIndex) => array.map(row => row[colIndex]));
array[0].map((_, colIndex) => array.map(row => row[colIndex]));