Coder Social home page Coder Social logo

dsc-linalg-dot-product-properties-lab-onl01-dtsc-ft-052620's Introduction

Properties of Dot Product - Lab

Introduction

In this lab, you'll be practicing some interesting properties of a dot product-type matrix multiplication. Understanding these properties will become useful as you study machine learning. The lab will require you to calculate results to provide a proof for these properties.

Objectives

In this lab you will:

  • Demonstrate the distributive, commutative, and associative property of dot products
  • Use the transpose method to transpose Numpy matrices
  • Compute the dot product for matrices and vectors

Instructions

  • For each property, create suitably sized matrices with random data to prove the equations
  • Ensure that size/dimension assumptions are met while performing calculations (you'll see errors otherwise)
  • Calculate the LHS and RHS for all equations and show if they are equal or not

Distributive Property - matrix multiplication IS distributive

Prove that $A \cdot (B+C) = (A \cdot B + A \cdot C) $

# Your code here

Associative Property - matrix multiplication IS associative

Prove that $A \cdot (B \cdot C) = (A \cdot B) \cdot C $

# Your code here 

Commutative Property - matrix multiplication is NOT commutative

Prove that for matrices, $A \cdot B \neq B \cdot A $

# Your code here 

Commutative Property - vector multiplication IS commutative

Prove that for vectors, $x^T \cdot y = y^T \cdot x$

Note: supersciptT denotes the transpose we saw earlier

# Your code here 

Simplification of the matrix product

Prove that $ (A \cdot B)^T = B^T \cdot A^T $

# Your code here 

Summary

You've seen enough matrix algebra by now to solve a problem of linear equations as you saw earlier. You'll now see how to do this next.

dsc-linalg-dot-product-properties-lab-onl01-dtsc-ft-052620's People

Contributors

loredirick avatar mathymitchell avatar shakeelraja avatar sumedh10 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

renjmindy

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.