March 2020
Intermediate to advanced
406 pages
8h 39m
English
We may also want to multiply two matrices together. Multiplying two matrices together gives you a product of the two matrices. This can be very helpful when we want to multiply many numbers together at once in a concurrent fashion. We can take matrix A, an N × M matrix, alongside B, an M × P matrix. The resulting set is called AB, which is an N × P matrix, as follows:

We can represent this in Go with the following code:
package mainimport ( "fmt" "gonum.org/v1/gonum/mat")func main() { a := mat.NewDense(2, 2, []float64{1, 2, 3, 4}) b := mat.NewDense(2, 3, []float64{1, 2, 3, 4, 5, 6}) var c mat.Dense c.Mul(a, b) result ...Read now
Unlock full access