Row and column matrices #
This file provides results about row and column matrices.
Main definitions #
Matrix.replicateRow ι r : Matrix ι n α: the matrix where every row is the vectorr : n → αMatrix.replicateCol ι c : Matrix m ι α: the matrix where every column is the vectorc : m → αMatrix.updateRow M i r: update theith row ofMtorMatrix.updateCol M j c: update thejth column ofMtoc
Matrix.replicateCol ι u is the matrix with all columns equal to the vector u.
To get a column matrix with exactly one column,
Matrix.replicateCol (Fin 1) u is the canonical choice.
Equations
- Matrix.replicateCol ι w = Matrix.of fun (x : m) (x_1 : ι) => w x
Instances For
Matrix.replicateRow ι u is the matrix with all rows equal to the vector u.
To get a row matrix with exactly one row, Matrix.replicateRow (Fin 1) u is the canonical choice.
Equations
- Matrix.replicateRow ι v = Matrix.of fun (x : ι) (y : n) => v y
Instances For
v ᵥ* M is the vector whose entries are those of replicateRow ι v * M.
M *ᵥ v is the vector whose entries are those of M * replicateCol ι v.
Updating rows and columns #
Update, i.e. replace the ith row of matrix A with the values in b.
Equations
- M.updateRow i b = Matrix.of (Function.update M i b)
Instances For
Update, i.e. replace the jth column of matrix A with the values in b.
Equations
- M.updateCol j b = Matrix.of fun (i : m) => Function.update (M i) j (b i)
Instances For
Updating rows and columns commutes in the obvious way with reindexing the matrix.
reindex versions of the above submatrix lemmas for convenience.