# Questions tagged [matrix]

This tag is for challenges involving matrices. A matrix, also known as a 2D array, is a list of numbers arranged in a rectangle with rows and columns.

247 questions
Filter by
Sorted by
Tagged with
594 views

### Is it an elementary matrix?

Consider a linear system of equations, in $n$ unknowns, expressed as $$A \textbf x = \textbf b$$ where $A \in M_{n,n}(\mathbb Z)$ is an $n \times n$ matrix of integers, $\textbf x$ is a column ...
1k views

### Compute matrix blockiness

Consider a non-empty binary matrix M and a natural number n. For the purposes of this challenge, M is said to have blockiness n if it can be built using adjacent square blocks of size n, where each ...
755 views

### Remove submatrices

Given two integer matrices a and b, your challenge is to replace any occurences of b in <...
455 views

### Fast Matrix Multiplicator Evaluator

A triplet of real tensors $(A,B,C)$ of size $\gamma \times \gamma \times \sigma$ represents a matrix multiplication algorithm with $\sigma$ elementary multiplications iff the following function ...
2k views

### Bird's Algorithm for Computing Determinants

There is a division-free algorithm for computing determinants published by R.S.Bird in 2011 that uses only matrix multiplications. Given a $n×n$ matrix $X$, the matrix $Y=μ(X)$ is another $n×n$...
2k views

### Checkered grid with X mark

Challenge Given two integer values $a \ge 2$ and $0 \le b < a$, generate a $(2a-1) \times (2a-1)$ matrix consisting of the integers 0, 1, and 2 as follows: Create a checkerboard of 0s and 1s ...
2k views

### Double trace of a square matrix

Inspired by a question (now closed) at Stack Overflow. Given a square matrix, let its double trace be defined as the sum of the entries from its main diagonal and its anti-diagonal. These are marked ...
1k views

759 views

### Find the number of n-by-n (-1, 0, 1) matrices with zero permanent as quickly as possible

The permanent of an $n$-by-$n$ matrix $A = (a_{i,j})$ is defined as: $$\operatorname{perm}(A)=\sum_{\sigma\in S_n}\prod_{i=1}^n a_{i,\sigma(i)}$$ For a fixed $n$, consider the $n$-by-$n$ ...
The title pretty much describes it all. Given as input a $n \times m$ matrix and an integer $i$ create a complete function/program that returns the matrix $i$ times clockwise rotated by \\$90^\...