[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"doc-seo-657825-105":3,"detail-sidebar-cat-0-en-105":80,"doc-detail-657825-en":130},{"code":4,"msg":5,"data":6},0,"ok",{"site_id":7,"language":8,"slug":9,"title":10,"keywords":11,"description":12,"schema_data":13,"social_meta":73,"head_meta":75,"extra_data":77,"updated_unix":79},105,"en","lecture-7-functions-part-71-definitions","Lecture 7: Functions - Part 7.1 - Definitions","","Lecture 7: Functions explains how functions are defined using relations between sets, focusing on formal conditions that ensure existence and uniqueness of outputs. It introduces the definition of a function as a mapping from a domain set to a codomain set and clarifies the informal meaning of assignment to each domain element exactly one codomain element. The lecture also motivates the concept with concrete examples, including a case that is not a function and the use of arrow diagrams for finite sets.",{"@graph":14,"@context":72},[15,34,55],{"@type":16,"itemListElement":17},"BreadcrumbList",[18,23,27,31],{"item":19,"name":20,"@type":21,"position":22},"https://docshare.wps.com","Home","ListItem",1,{"item":24,"name":25,"@type":21,"position":26},"https://docshare.wps.com/document/","Document",2,{"item":28,"name":29,"@type":21,"position":30},"https://docshare.wps.com/document/exam/","Exam",3,{"item":32,"name":10,"@type":21,"position":33},"https://docshare.wps.com/document/lecture-7-functions-part-71-definitions/657825/",4,{"url":32,"name":10,"@type":35,"image":36,"author":41,"headline":10,"publisher":44,"fileFormat":47,"inLanguage":8,"description":12,"dateModified":48,"datePublished":49,"encodingFormat":47,"isAccessibleForFree":50,"interactionStatistic":51},"DigitalDocument",{"url":37,"@type":38,"width":39,"height":40},"https://docshare.wps.com/thumbnails/lecture-7-functions-part-71-definitions/657825.png","ImageObject",300,407,{"name":42,"@type":43},"AditGamingID","Person",{"url":19,"name":45,"@type":46},"DocShare","Organization","application/pdf","2026-10-30","2026-10-26",true,{"@type":52,"interactionType":53,"userInteractionCount":33},"InteractionCounter",{"@type":54},"ViewAction",{"@type":56,"mainEntity":57},"FAQPage",[58,64,68],{"name":59,"@type":60,"acceptedAnswer":61},"What makes a relation a function from set A to set B?","Question",{"text":62,"@type":63},"A relation is a function if every element of the domain has at least one related element in the codomain, and the related element is unique for each domain element.","Answer",{"name":65,"@type":60,"acceptedAnswer":66},"Why is the example defined by x^2 + y^2 = 1 not always a function?",{"text":67,"@type":63},"For some x values there is no y satisfying the equation, and for other x values there are two different y values satisfying it, so uniqueness fails.",{"name":69,"@type":60,"acceptedAnswer":70},"How do arrow diagrams help determine whether a mapping is a function?",{"text":71,"@type":63},"A diagram defines a function when every element in the domain has exactly one outgoing arrow to an element of the codomain, with no domain element pointing to two different codomain elements.","https://schema.org",{"og:url":32,"og:type":74,"og:title":10,"og:site_name":45,"og:description":12},"article",{"robots":76,"canonical":32},"index,follow",{"doc_id":78,"site_id":7},657825,1793146809,{"code":4,"msg":81,"data":82},"success",[83,87,91,94,99,104,109,114,119,122,126],{"id":22,"doc_module":4,"doc_module_name":25,"category_name":84,"show_sort_weight":85,"slug":86},"Story & Novel",90,"story-novel",{"id":26,"doc_module":4,"doc_module_name":25,"category_name":88,"show_sort_weight":89,"slug":90},"Literature",80,"literature",{"id":33,"doc_module":4,"doc_module_name":25,"category_name":29,"show_sort_weight":92,"slug":93},70,"exam",{"id":95,"doc_module":4,"doc_module_name":25,"category_name":96,"show_sort_weight":97,"slug":98},5,"Comic",60,"comic",{"id":100,"doc_module":4,"doc_module_name":25,"category_name":101,"show_sort_weight":102,"slug":103},6,"Technology",50,"technology",{"id":105,"doc_module":4,"doc_module_name":25,"category_name":106,"show_sort_weight":107,"slug":108},7,"Healthcare",40,"healthcare",{"id":110,"doc_module":4,"doc_module_name":25,"category_name":111,"show_sort_weight":112,"slug":113},8,"Research & Report",30,"research-report",{"id":115,"doc_module":4,"doc_module_name":25,"category_name":116,"show_sort_weight":117,"slug":118},9,"Religion & Spirituality",20,"religion-spirituality",{"id":117,"doc_module":4,"doc_module_name":25,"category_name":120,"show_sort_weight":117,"slug":121},"World Cup","world-cup",{"id":123,"doc_module":4,"doc_module_name":25,"category_name":124,"show_sort_weight":123,"slug":125},10,"Lifestyle","lifestyle",{"id":127,"doc_module":4,"doc_module_name":25,"category_name":128,"show_sort_weight":95,"slug":129},19,"General","general",{"code":4,"msg":81,"data":131},{"doc_id":78,"user_id":132,"nickname":42,"user_avatar":133,"doc_module":4,"category_id":33,"category_name":29,"doc_title":10,"doc_description":12,"doc_content":134,"file_id":135,"file_url":136,"file_type":137,"file_size":138,"view_count":33,"is_deleted":4,"is_public":22,"is_downloadable":22,"audit_status":22,"page_count":139,"language":140,"language_code":8,"site_id":7,"html_lang":8,"table_of_contents":141,"faqs":142,"seo_title":143,"seo_description":12,"update_tm":144,"read_time":145},962094249103,"https://ap-avatar.wpscdn.com/davatar_276721f389ce27ea32af1340a28f341c","Definitions Injections, Surjections and Inverse Functions Composition of Functions  \nLecture 7: Functions  \nAaron Tan  \nPart of the contents here is taken from  \n AY2026/27 Semester 1  Dr Wong Tin Lok’s lecture notes. 1  \nDefinitions Injections, Surjections and Inverse Functions Composition of Functions  \nFunctions in C programming:  \nint f(int x, double y) { return x * sqrt(y);  \n}  \nf(3, 4) → 6.0  \nf(4, 3) → 6.928203  \nf(6, 1) → 6.0  \nMany built-in math functions in C:  \n▪ floor(), round()  \n▪ ceil(), floor()  \n▪ sin(), cos(), tan()  \n▪ log(), log10()  \n▪ sqrt(), pow()  \n▪ etc.  \nApplications of function in Computer Science: computational complexity of algorithms, counting objects, study of sequences and strings, etc.  \n2  \nDefinitions Injections, Surjections and Inverse Functions Composition of Functions  \nRecapitulation  \nDefinitions Injections, Surjections and Inverse Functions Composition of Functions  \nRecapitulation  \n| Definition: Relation |\n| --- |\n| Let 􀜺 and 􀜻 be sets. A (binary) relation from 􀢄 to 􀢅 is a subset of 􀢄 × 􀢅 . Given an ordered pair (􀝔, 􀝕) in 􀜺 × 􀜻 , 􀢞 is related to 􀢟 by 􀡾, or\u003Cbr>􀢞 is 􀡾-related to 􀢟, written 􀢞 􀡾 􀢟, iff (􀢞, 􀢟) ∈ 􀡾 . |\n\n􀜺 􀜴 1 􀜻  \n􀜺 􀜴 4 􀜻  \n􀜺 􀜴 2 􀜻  \n􀜺 􀜴 5 􀜻  \n􀜺 􀜴 3 􀜻  \n􀜺 􀜴 6 􀜻  \nDefinitions Injections, Surjections and Inverse Functions Composition of Functions  \n7.1 Definitions  \nDefinitions Injections, Surjections and Inverse Functions Composition of Functions  \nDefinitions: Function  \n7.1.1 Definitions  \n\n| Definition: Function |\n| --- |\n| A function 􀝂 from a set 􀜺 to a set 􀜻, denoted 􀝂: 􀜺 → 􀜻 , is a relation satisfying the following properties:\u003Cbr>(F1) ∀􀝔 ∈ 􀜺 ∃􀝕 ∈ 􀜻 􀝔 , 􀝕 ∈ 􀝂 .\u003Cbr>(F2) ∀􀝔 ∈ 􀜺 ∀􀝕1 , 􀝕2 ∈ 􀜻   􀝔 , 􀝕1 ∈ 􀝂 ∧ 􀝔 , 􀝕2 ∈ 􀝂  → 􀝕1 = 􀝕2 .(That is, the 􀝕 in (F1) is unique.)\u003Cbr>|\n\nOr alternatively,  \nLet 􀝂 be a relation on sets 􀜺 and 􀜻 , i.e. 􀝂 ⊆ 􀜺 × 􀜻 . Then 􀝂 is a  \nfunction from 􀜺 to 􀜻, denoted 􀝂: 􀜺 → 􀜻 , iff ∀􀝔 ∈ 􀜺 ∃! 􀝕 ∈ 􀜻 􀝔 , 􀝕 ∈ 􀝂 .  \nInformally,  \nA function from 􀜺 to 􀜻 is an assignment to each element of 􀜺 exactly one element of 􀜻 .  \n7  \nDefinitions Injections, Surjections and Inverse Functions Composition of Functions  \nDefinitions: Function  \nExample \\#1: A function 􀝂: ℝ → ℝ is defined as follows:∀􀝔 ∈ ℝ, 􀝂 (􀝔) is the real number 􀝕 such that 􀝔 2 + 􀝕 2 = 1 .  \nIs the above a function?  No!   \nTwo reasons. For almost all values of 􀝔 , either (1) there is no 􀝕 that satisfies the given equation (eg: when 􀝔 = 2), or (2) there are two different values of 􀝕 that satisfy the equation (eg: when 􀝔 = 0) .  \nDefinitions Injections, Surjections and Inverse Functions Composition of Functions  \nDefinitions: Arrow Diagrams  \nIf 􀜺 and 􀜻 are finite sets, you can define a function 􀝂 from 􀜺 to 􀜻 by drawing an arrow diagram.  \nFigure 7.1.1  \nThis arrow diagram defines a function because  \n1. Every element of 􀜺 has an arrow coming out of it.  \n2. No element of 􀜺 has two arrows coming out of it that point to two different elements of 􀜻 .  \nDefinitions Injections, Surjections and Inverse Functions Composition of Functions  \nArrow Diagrams 􀝂 is a function from 􀜺 to 􀜻, denoted 􀝂: 􀜺 → 􀜻 , iff  \n∀􀝔 ∈ 􀜺, ∃! 􀝕 ∈ 􀜻 such that 􀝔 , 􀝕 ∈ 􀝂 .  \nExample \\#2: Which of the following relations are functions and which are not? Why?  \n􀜺 􀜴 1 􀜻  \n􀜺 􀜴 4 􀜻  \n􀜺 􀜴 2 􀜻  \n􀜺 􀜴 5 􀜻  \n􀜺 􀜴 3 􀜻  \n􀜺 􀜴 6 􀜻  \n􀂖  \n10","cbCainrfREvwQg6M","https://ap.wps.com/l/cbCainrfREvwQg6M","pdf",2372539,59,"English","# 7.1 Definitions\n## Definition: Function\n## Example: Is the above a function?\n## Definitions: Arrow Diagrams\n## Example #2: Which relations are functions?","[{\"question\":\"What makes a relation a function from set A to set B?\",\"answer\":\"A relation is a function if every element of the domain has at least one related element in the codomain, and the related element is unique for each domain element.\"},{\"question\":\"Why is the example defined by x^2 + y^2 = 1 not always a function?\",\"answer\":\"For some x values there is no y satisfying the equation, and for other x values there are two different y values satisfying it, so uniqueness fails.\"},{\"question\":\"How do arrow diagrams help determine whether a mapping is a function?\",\"answer\":\"A diagram defines a function when every element in the domain has exactly one outgoing arrow to an element of the codomain, with no domain element pointing to two different codomain elements.\"}]","Lecture 7: Functions - Part 7.1 - Definitions | PDF",1792991552,149]