# Questions tagged [matrix]

In mathematics, a matrix (plural matrices) is a rectangular array of numbers, symbols, or expressions, arranged in rows and columns. The individual items in a matrix are called its elements or entries.

596 questions
Filter by
Sorted by
Tagged with
24 views

### How would you convert this code to best take advantage of CSS transform for panning/zooming?

I am using react-flow-chart for a job project, but it doesn't implement zoom, and I would like to take the reigns and try applying it myself. I took a linear ...
116 views

### Rotate a matrix, using transposition and reflection

I want to compare two solutions to the following question from Cracking The Coding Interview by Gayle Laakman McDowell : 1.7 Rotate Matrix - Given an image represented by an NxN matrix, where each ...
232 views

### Golang matrix package

I developed a small package to do matrix math. I just learned Go so I may have done it wrong. ...
873 views

### Python algorithm that converts array-like data into MathJax

I frequently use MathJax, and often I need to write matrices. Since writing matrices using MathJax is very tiresome task, I decided to automate it. Code: ...
890 views

### Magic Square (Python)

Problem Write a method to return a boolean if an input grid is magic square. A magic square is a $NxN$ square grid (where N is the number of cells on each side) filled with distinct positive ...
196 views

### overlapping rectangles c#

I had to write code for a competition which calculates sum of the perimeter of three overlapping rectangles in a 2D space. rectangle A and rectangles B and rectangle c is overlapping each other.They ...
3k views

### Matrix class in C#

I've been learning C# during my free time in the past months; before that, I was mostly writing Java, so the transition hasn't been too hard, but I've never had my code reviewed or read by someone ...
59 views

142 views

### Search for row number of maximum value in matrix column

Background I'm writing code that searches for the row number of the maximum value in a partial column of a matrix. The partial column corresponds with the non-zero values of an equivalent lower ...
85 views

### Applying a function to each row of a matrix

My goal is to apply a function func1 to each row of the matrix input and then return a new one resulting from the transformation....
81 views

### Manually writing a function matrixpower() in R

Problem 1 - Matrix powers in R R does not have a built-in command for taking matrix powers. Write a function matrixpower() with two arguments mat and k ...
142 views

### Matrix class with space-optimized triangular (lower and upper) variants

I've written a class for square numerical matrices (of doubles, in this case), in C++11. Since I intend to use this class later ...
63 views

### Applying a function to columns of two matrices producing their combinations

I made a short snippet for applying a function f that takes two arguments (vectors) to columns of two matrices producing all possible combinations of those columns. ...
291 views

### Computing a Discrete Cosine Transform matrix

I'm learning Haskell and I needed to work with discrete cosine transform matrices, so I made a program that generates text (usable in WolframAlpha) containing the generated matrix. The elements of ...
84 views

### Transpose of a very large matrix with fewer than 1021 rows with Python

I have a matrix of fewer than 1021 rows. I'd like to take its transpose, but it is too big for GNU datamash and awk solutions to ...
46 views

### Calculating the potential of a matrix of size (424600, 55)

I have the following working code to calculate the potential of a matrix after normalizing the matrix. But it is too much time consuming. Is there a way to make this code run faster? ...