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.
6
questions
11
votes
15
answers
2k
views
Is this a Hadamard matrix?
Hadamard matrices is a square matrix whose entries are either +1 or −1 and whose rows are mutually orthogonal.
In other words, it means that each pair of rows has matching entries in exactly half of ...
11
votes
5
answers
1k
views
9-16-25 2D Matrix
Given three grids and the sum of rows and columns of each grid, your task is:
Grid \$3×3\$: Fill the grid from \$1\$ to \$9\$, ensure no repeats within the grid.
Grid \$4×4\$: Fill the grid from \$1\...
12
votes
6
answers
1k
views
Contract a tensor
Introduction
Tensor contraction is an operation that can be performed on a tensor. It is a generalization of the idea of the trace of a matrix. For example, if we have a rank-2 tensor (a matrix) and ...
4
votes
1
answer
607
views
Which line is best?
Consider an \$n \times n\$ grid of integers. The task is to draw a straight line across the grid so that the part that includes the top left corner sums to the largest number possible. Here is a ...
9
votes
5
answers
924
views
Compute the logarithm of a matrix
There have already been challenges about computing the exponential of a matrix , as well as computing the natural logarithm
of a number. This challenge is about finding the (natural) logarithm of ...
17
votes
22
answers
2k
views
Compute this fractal matrix
The unique-disjointness matrix ( UDISJ(n) ) is a matrix on all pairs of subsets of {1...,n} with entries $$ U_{(A,B)}=\begin{cases}
0, ~ if ~ |A\cap B|=1\\
1, ~ ...