Cartesian product and graph

Cartesian product A × B એટલે A ના દરેક element ને B ના દરેક element સાથે જોડવો, અને એ જ ordered pairs ને તમે graph ઉપર points તરીકે plot કરો છો.

9 min read · 12 cards · 3 checks

Read in: English · हिन्दी · ગુજરાતી


Theory

કેન્ટીનનો combo સવાલ

કેન્ટીનમાં 2 drinks {tea, coffee} અને 3 snacks {samosa, vadapav, sandwich} મળે છે. તો (drink, snack) ના કેટલા જુદા જુદા combos બને?

જવાબ તો તમને feel થઈ જ જાય: દરેક drink દરેક snack સાથે જાય, એટલે 2 × 3 = 6.

Mathematics માં આ આખા combos ના list ને Cartesian product કહે છે, અને આ એક જ idea ઉપરથી graphs, relations અને database joins બધું ઊભું થાય છે.

Theory

દરેક row દરેક column ને મળે

એક table ની કલ્પના કરો: drinks ને બાજુમાં ઊભા લખો, snacks ને ઉપર આડા. table નો દરેક cell એ એક pairing છે. Cartesian product એ જ આ table છે, ફક્ત pairs ના set તરીકે લખેલી. અને એટલા માટે જ count ગુણાય છે: rows × columns એટલા cells.

Theory

Definition

2 sets A અને B માટે Cartesian product આ પ્રમાણે છે:

A × B = એ બધા ordered pairs (a, b) નો set જ્યાં a ∈ A અને b ∈ B

Example: A = {1, 2}, B = {x, y}

A × B = {(1, x), (1, y), (2, x), (2, y)}

અહીં key word છે "ordered": પહેલો slot હંમેશા A માંથી, અને બીજો slot હંમેશા B માંથી આવે.

Theory

Order 2 વાર મહત્વનું છે

"ordered" હોવાના 2 પરિણામ છે:

  • એક pair ની અંદર: (1, x) અને (x, 1) એ 2 અલગ અલગ વસ્તુ છે.
  • 2 products ની વચ્ચે: B × A = {(x, 1), (y, 1), (x, 2), (y, 2)}, જે A × B નથી.

અને count ની વાત: જો A માં m elements હોય અને B માં n, તો A × B માં બરાબર m·n pairs હોય, કારણ કે m પહેલા element માંનો દરેક n બીજા element ના દરેક સાથે મળે છે.

Quiz

A માં 4 elements છે અને B માં 3. તો B × A માં કેટલા elements હોય?

  1. 7
  2. 12
  3. કહી ના શકાય, કારણ કે B × A એ A × B નથી
  4. 64
Show the answer

12

Order ગમે તે હોય, size તો ગુણાય જ: 3 × 4 = 12. B × A અને A × B માં pairs અલગ હોય, પણ સંખ્યા હંમેશા સરખી હોય. Option A માં ગુણવાને બદલે સરવાળો કર્યો છે, અને option D માં 4³ ગણી નાખ્યું છે, pairing આ રીતે કામ નથી કરતું.

Think first

C = {0, 1} અને D = {a, b, c}.

મનમાં જ C × D ની list બનાવો, અને tap કરતાં પહેલાં count કરી લો.

Show the answer

C × D = {(0, a), (0, b), (0, c), (1, a), (1, b), (1, c)}: 6 pairs, બરાબર 2 × 3 જેટલા.

List બનાવવાની systematic રીત જુઓ: પહેલા 0 ને fix કરો, આખા D માંથી ફરી વળો, પછી 1 ને fix કરીને એ જ repeat કરો. આ row-by-row order માં લખો તો exam માં કોઈ pair રહી ના જાય કે repeat ના થાય.

Theory

Pairs થી graphs સુધી

હવે બંને sets ને numbers બનાવી દો. (2, 3) જેવી pair એ ખરેખર એક point જ છે: x-coordinate 2, y-coordinate 3.

એટલે school થી તમે જે Cartesian plane દોરતા આવ્યા છો એ ખરેખર એક Cartesian product જ છે: ℝ × ℝ, દરેક શક્ય (x, y). એ જ Descartes, એ જ નામ. કોઈ line કે curve plot કરવી એટલે ℝ × ℝ માંથી કઈ pairs કોઈ equation ને satisfy કરે છે એ mark કરવું.

Theory

Relations સાથેનો પુલ

A = {1, 2, 3} લો અને A × A બનાવો (9 pairs). હવે ફક્ત એ જ pairs રાખો જ્યાં પહેલો number બીજા number કરતાં નાનો હોય:

{(1, 2), (1, 3), (2, 3)}

આ પસંદ કરેલા subset ને relation કહે છે. A થી B સુધીની દરેક relation એ ખરેખર A × B નો એક subset જ છે. આ 3 pairs plot કરો તો બધી y = x line ની ઉપર બેસશે, એટલે "less than" ને પણ એક picture મળી ગઈ.

Quiz

A થી B સુધીની relation ને best રીતે કેવી રીતે describe કરાય?

  1. A × B નો કોઈ પણ subset
  2. હંમેશા આખું A × B જ
  3. A ∪ B નો કોઈ પણ subset
  4. એક pair of elements, દરેક set માંથી એક એક
Show the answer

A × B નો કોઈ પણ subset

Relation એ A × B માંથી કોઈ condition ને satisfy કરતી pairs પસંદ કરે છે, એકેય ના હોય ત્યાંથી માંડીને બધી હોય ત્યાં સુધી. Union (option C) માં elements હોય, pairs નહીં, અને એક single pair (option D) એ તો product નો ફક્ત એક member છે, પોતે એકલી relation નથી.

Watch out

Pair ના 2 traps

Trap 1: (1, x) ને બદલે {1, x} લખવું, એટલે curly brackets માં. Curly brackets order ને ગણકારતા નથી, round brackets order જાળવે છે; pairs હંમેશા round brackets માં જ. Trap 2: A × B = B × A છે એવો દાવો કરવો. Size સરખી, pairs અલગ. બંને ભૂલ ઉપર marks કડક રીતે કપાય છે, કારણ કે એ બતાવે છે કે order ને ignore કરી નાખ્યો છે.

Theory

આ ફરી ક્યાં મળશે

SQL માં 2 tables નું CROSS JOIN ખરેખર એમનો Cartesian product જ compute કરે છે, અને game engine જે (x, y) point દોરે એ બધા ℝ × ℝ માં જ રહે છે. આગળના topics આજના subset ના idea ને વધારે ઊંડે લઈ જશે: પહેલા detail માં relations, પછી functions, જે એક extra rule વાળી relations છે (દરેક input નો એક જ output).

Summary

Key takeaways

  • A × B એ બધા ordered pairs નો set છે જ્યાં પહેલો element A માંથી અને બીજો B માંથી હોય.
  • Order pair ની અંદર પણ મહત્વનું અને products ની વચ્ચે પણ: સામાન્ય રીતે A × B ≠ B × A.
  • |A| = m અને |B| = n હોય તો બરાબર m·n pairs; row by row list બનાવો તો એકેય ના રહી જાય.
  • Numeric pairs એ points છે, એટલે xy plane એ ℝ × ℝ છે, અને relation એ product નો કોઈ પણ પસંદ કરેલો subset છે.
  • યાદ રાખવાની ટ્રીક: દરેક row દરેક column ને મળે.

Study this properly

This page is the lesson to read. In Gri-Learn the same topic is a graded deck: the self-checks are scored and your weak topics are tracked. Free to start.

Start this topic

Already have an account? Sign in

More from Set Theory

Gri-Learn · syllabus-mapped B.C.A. lessons in English, Hindi and Gujarati

Cartesian product and graph · Mathematics (Multi-Disciplinary Course) · Gri-Learn