ME 228 - Tutorial 1
Department of Mechanical Engineering, IIT Bombay
Spring 2025
January 9, 2025
Objective and Instructions
1. The objective of this tutorial is to get familiar with Python and verify the linear algebra learning from
lecture. Some of the problems may be attempted in other Tutorial sessions as well.
2. This needs to be performed using Google Colab Notebook or Jupyter Notebook only.
Q 1. Install Anaconda.
Q 2. Install Python.
Q 3. Install Jupyter Notebook and Visual Studio Code.
Q 4. Define a 3 × 3 matrix and determine transpose of A as AT =⇒ (AT )i,j = Ai,j
Q 5. Find a practical example to demonstrate applicability of A = AT .
Q 6. Print any three elements of the matrix and sum and print
Q 7. Define another matrix of same type and add the two matrices.
Q 8. Multiply the first matrix with a scalar and then add this new matrix to the second matrix.
Q 9. Add a vector b to the original matrix A using C = A + b i.e. Ci,j = Ai,j + bj . This is essentially an
operation that adds vector b to each row of the matrix A.
Q 10. Determine time consumed for calculating inverse of matrices of order 4 to 10, one at a time, plot time vs
order and comment.
Q 11. Setup a matrix in which w column is dependent on u and v. Determine its inverse. Highlight your
observation. Make w weakly dependent on the other two columns and repeat the above exercise. For
example, if w∗ is dependent, you can alter one of its elements manually.
w∗ = u + v
. Then , assign 0.001 to the third element
w∗ (3) = 0.001
−end−