The vertical column of data could really be three distinct functions, each taking a single parameter.Īh. The row containing a horizontal function could really be three data points (each with a single element). This is a function taking three inputs and returning a single result.Īnd the aha! moment: data is code, code is data! Here, x is a vector of data (I'm using to separate each row). We take raw information like "3 4 5" treat it as a vector or function, depending on how it's written:īy convention, a vertical column is usually a vector, and a horizontal row is typically a function: (Compilers treat a program as text, modify it, and eventually output "instructions" - which could be text for another layer.) The result is a new recipe, which can be further tweaked, or executed as instructions to make a different pie, muffin, cake, etc. Adjust for altitude or different equipment.If you interpret the words as data, the text is prose that can be tweaked: If you interpret the words as instructions, you'll end up with a pie, muffin, cake, etc. (Some purists cringe at reducing beautiful algebraic structures into frumpy spreadsheets I sleep OK at night.) Programmer's Intuition: Code is Data is Code But mostly I think about information flowing through a system. Sometimes I'll think of data as geometric vectors, and sometimes I'll see a matrix as a composing functions. We can swap between the vector and function interpretation as needed.Some of the data are seen as functions to apply, others as data points to use.We store information in various spreadsheets ("matrices").I think of linear algebra as "math spreadsheets" (if you're new to linear algebra, read this intro): I'll put a programmer's viewpoint into the ring:ģ) Matrix multiplication is about information flow, converting data to code and back. We need another intuition for what's happening. However, sometimes the matrix being operated on is not a linear operation, but a set of vectors or data points. This is the technically accurate definition: yes, matrix multiplication results in a new matrix that composes the original functions. With large matrices I don't think about 500-dimensional vectors, just data to be modified.Ģ) Matrix multiplication composes linear operations. You probably don't think "Oh, I need the volume of a invitation-familysize-hunger prism!". If 20 families are coming to your BBQ, how do you estimate the hotdogs you need? ( Hrm… 20 families, call it 3 people per family, 2 hotdogs each… about 20 * 3 * 2 = 120 hotdogs.) Unfortunately, this can lead to an over-reliance on geometric visualization. This is useful when first learning about vectors: vectors go in, new ones come out. What does matrix multiplication mean? Here's a few common intuitions:ġ) Matrix multiplication scales/rotates/skews a geometric plane.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |