O'Reilly logo

Machine Learning with Spark - Second Edition by Nick Pentreath, Manpreet Singh Ghotra, Rajdeep Dua

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Matrix

A matrix over a field F is a two-dimensional array whose entries are elements of F. An example of a matrix over the field of real numbers is given as follows:

1 2 3

10 20 30

The previous matrix has two rows and three columns; we call it a 2 × 3 matrix. It is traditional to refer to the rows and columns by numbers. Row 1 is (1 2 3), and row 2 is (10 20 30); column 1 is (1 10) , column 2 is (2 20), and column 3 is (3 30). In general, a matrix with m rows and n columns is called an m × n matrix. For matrix A, the element (i, j) is defined to be the element in the ith row and the jth column, and is indexed using the Ai, j or Aij notation. We will often use the pythonese notation, A[i, j]. Row i is the vector (A[i, 0], A[i, 1], A[i, 2], ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required