# Questions tagged [linear-algebra]

For challenges involving linear algebra, the mathematics of vector spaces and linear mappings between them.

43 questions
Filter by
Sorted by
Tagged with
4answers
450 views

### Bad matrix multiplication that gives the right answer

Executive summary: Print NxN matrices $A$ and $B$ where $AB = 10A + B$. Largest N wins! Details: Entrants in this challenge should choose an N. Submit a program that takes an input integer '...
5answers
962 views

### What is the Subspace Dimension?

Challenge Given the Cartesian coordinates of two or more distinct points in Euclidean n-space ($\mathbb{R}^n$), output the minimum dimension of a flat (affine) subspace that contains those points, ...
10answers
473 views

12answers
1k views

### Recursive 2x2 determinant

The determinant of a 2 by 2 matrix a b c d is given by ad - bc. Given a matrix of digits with dimensions 2n by 2n, n ≥ 1, ...
18answers
2k views

### Find the Cross Product

The cross product of two three-dimensional vectors $\vec a$ and $\vec b$ is the unique vector $\vec c$ such that: ﻿$\vec c$ is orthogonal to both $\vec a$ and $\vec b$ The magnitude of \\$...
84answers
5k views

### Construct the Identity Matrix

The challenge is very simple. Given an integer input n, output the n x n identity matrix. The identity matrix is one that has <...
6answers
1k views

### Cofactor Matrices

The cofactor matrix is the transpose of the Adjugate Matrix. The elements of this matrix are the cofactors of the original matrix. The cofactor (i.e. the element of the cofactor matrix at row i and ...
12answers
891 views

### Construct a companion matrix

You have a number of polynomials who are lonely, so make them some companions (who won’t threaten to stab)! For a polynomial of degree n, there is an ...
1answer
2k views

### Reduced Row-Echelon Form of a Matrix

The goal of this challenge is to create a program that takes in a matrix and outputs its reduced row-echelon form. A matrix is in reduced row-echelon form if it meets all of the following ...
4answers
553 views

### Multiply Pauli Matrices

The Pauli matrices are a set of 2x2 matrices which appear very commonly in quantum physics (no, you don't need to know any quantum physics for this challenge). If we include the identity in the set, ...
1answer
506 views

### Find the inverse of a matrix

Write a full program to calculate the inverse of a 4-by-4 matrix. Rules The sixteen values of the initial matrix must be hard-coded to variables, as follows: ...
4answers
1k views

### Solve a 2x2 Eigensystem

For those with a little linear algebra background, the challenge is as simple as this: determine the eigenvalues and eigenvectors of a given complex 2x2 matrix. You may skip ahead to The Challenge for ...