python data structures matrix is special case of two dimensional arraywhereeach data element is of strictly same size soevery matrix is also two dimensional array but notvice versa matrices are very important data structures for many mathematical and scientific calculations as we have already discussedtwo dimensional array data structure in the previous we will be focusing on data structure operations specific to matrices in this we will also use the numpy package for matrix data manipulation matrix example consider the case of recording temperature for one week measured in the morningmiddayevening and mid-night it can be presented as matrixusing an array and the reshape method available in numpy from numpy import array([['mon', , , , ],['tue', , , , ]['wed', , , , ],['thu', , , , ]['fri', , , , ],['sat', , , , ]['sun', , , , ]] reshape( ,( , )print(mthe above data can be represented as two dimensional array as below[['mon' ' ' ' '['tue' ' ' ' '['wed' ' ' ' '['thu' ' ' ' '['fri' ' ' ' '['sat' ' ' ' '['sun' ' ' ' ']accessing values the data elements in matrix can be accessed by using the indexes the access methods are sameas the way data is accessed in two dimensional array from numpy import