# Finding a normal (perpendicular) vector on a 2d plane

There are plenty of times when we need a normal vector in game dev and graphics programming (or if we are simply just learning vector math). It is relatively simple for you to find a normal (perpendicular) vector on a 2D plane. Swap the vector components and negate one, i.e. if the vector components are (u, v) swap it (-v, u) or (v, -u). Negating the first component will make the normal vector counter clock wise to the initial vector. Negating the 2nd term will make the normal clockwise to the initial vector.
{"ft_lang_label":"__label__en","ft_lang_prob":0.87303424,"math_prob":0.96927696,"size":514,"snap":"2022-40-2023-06","text_gpt3_token_len":120,"char_repetition_ratio":0.16862746,"word_repetition_ratio":0.0,"special_character_ratio":0.22762646,"punctuation_ratio":0.104761906,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.99307185,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2023-01-30T05:31:29Z\",\"WARC-Record-ID\":\"<urn:uuid:76ac59dc-d77d-4da5-8106-3c6193179889>\",\"Content-Length\":\"89107\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:c29d5b1a-ff2e-4ec1-af26-b958bcca64bd>\",\"WARC-Concurrent-To\":\"<urn:uuid:5f838238-2cd1-4968-b02d-e7c66a198763>\",\"WARC-IP-Address\":\"192.0.78.12\",\"WARC-Target-URI\":\"https://mackiemathew.wordpress.com/2014/03/01/finding-a-normal-perpendicular-vector-on-a-2d-plane/\",\"WARC-Payload-Digest\":\"sha1:5ZSPLZBC2RO35Q775OEUAJZ6WTPBL2HG\",\"WARC-Block-Digest\":\"sha1:FPEVHOR7XE46W7XQ6FPKB4FAZRPFOLKK\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2023/CC-MAIN-2023-06/CC-MAIN-2023-06_segments_1674764499801.40_warc_CC-MAIN-20230130034805-20230130064805-00182.warc.gz\"}"}