Spooky Sale: 10% off Premium yearly · $118.80 for the first year · until Nov 6Get it

Deep-ML
Learn
Problems1,200+ hands-on ML problemsLearning PathA guided route through the fundamentalsLabsInteractive labs on real techniquesProjectsBuild a GPT, an RL agent, CUDA kernelsCollectionsCurated problem sets and videosMathPen-and-paper math for MLIntuitionInvent the idea behind the formula yourselfPlaylistsYour own problem lists, shareableStudy AssistantAn AI teacher that knows your progress
Interview Prep
Compete
ContestsFresh problem sets, ranked liveLeaderboardWhere you stand, globallyBuddiesSolve with a friend: streaks, a weekly board, chat
Discuss
Deep-Path
Premium
      Intuition
      25 of 102

      How much does it stretch?

      A 2×2 matrix [[a, b], [c, d]] moves every point of the plane. Its columns say where the two unit arrows land: the across arrow [1, 0] lands on [a, c], the up arrow [0, 1] on [b, d], so the unit square becomes the parallelogram they span. Write area_change(matrix): how many times it multiplies area, negative if it flips the picture over.

      A photo editor moves a picture with a matrix. Every point moves, so the square tile with the F on it becomes a slanted tile.

      acrossupthe matrix[[2, 1], [0.5, 1.5]]across [1, 0] → [2, 0.5]up [0, 1] → [1, 1.5]the square’s area 1 becomes
      how many times bigger did the area get? that’s for you to work out
      Your functionarea_change(matrix)
      matrix[[a, b], [c, d]]; the across arrow lands on [a, c], the up arrow on [b, d]e.g. [[1, 0], [0, 1]]
      returnshow many times areas get bigger (negative if flipped over)
      solution.pyLoading Python
      Sign in for an AI hint
      ← King − man + womanThe direction that survives →