<?xml version="1.0" encoding="UTF-8"?>

<!--XBRL Document Created with the Workiva Platform-->
<!--Copyright 2024 Workiva-->
<!--r:8cdb58fd-4801-4927-8001-b7d32b49f943,g:f287e148-ef87-4472-bb01-3c8c361cfed7-->
<link:linkbase xmlns:link="http://www.xbrl.org/2003/linkbase" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xbrldt="http://xbrl.org/2005/xbrldt" xsi:schemaLocation="http://www.xbrl.org/2003/linkbase http://www.xbrl.org/2003/xbrl-linkbase-2003-12-31.xsd">
  <link:arcroleRef arcroleURI="http://xbrl.org/int/dim/arcrole/all" xlink:type="simple" xlink:href="http://www.xbrl.org/2005/xbrldt-2005.xsd#all"/>
  <link:arcroleRef arcroleURI="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:type="simple" xlink:href="http://www.xbrl.org/2005/xbrldt-2005.xsd#hypercube-dimension"/>
  <link:arcroleRef arcroleURI="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:type="simple" xlink:href="http://www.xbrl.org/2005/xbrldt-2005.xsd#dimension-default"/>
  <link:arcroleRef arcroleURI="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:type="simple" xlink:href="http://www.xbrl.org/2005/xbrldt-2005.xsd#dimension-domain"/>
  <link:arcroleRef arcroleURI="http://xbrl.org/int/dim/arcrole/domain-member" xlink:type="simple" xlink:href="http://www.xbrl.org/2005/xbrldt-2005.xsd#domain-member"/>
  <link:roleRef roleURI="http://www.farmermac.com/role/COVERPAGE" xlink:type="simple" xlink:href="agm-20240331.xsd#COVERPAGE"/>
  <link:definitionLink xlink:role="http://www.farmermac.com/role/COVERPAGE" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_dei_EntityInformationLineItems_bd5acb12-09f1-4fe2-b871-0c4d77812e67" xlink:href="https://xbrl.sec.gov/dei/2023/dei-2023.xsd#dei_EntityInformationLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_dei_EntitiesTable_26d41823-970c-4370-9a11-472fcff01242" xlink:href="https://xbrl.sec.gov/dei/2023/dei-2023.xsd#dei_EntitiesTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_dei_EntityInformationLineItems_bd5acb12-09f1-4fe2-b871-0c4d77812e67" xlink:to="loc_dei_EntitiesTable_26d41823-970c-4370-9a11-472fcff01242" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StatementClassOfStockAxis_e0761a6a-85ad-436c-8a88-2e83f3840040" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_StatementClassOfStockAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_dei_EntitiesTable_26d41823-970c-4370-9a11-472fcff01242" xlink:to="loc_us-gaap_StatementClassOfStockAxis_e0761a6a-85ad-436c-8a88-2e83f3840040" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ClassOfStockDomain_e0761a6a-85ad-436c-8a88-2e83f3840040_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ClassOfStockDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementClassOfStockAxis_e0761a6a-85ad-436c-8a88-2e83f3840040" xlink:to="loc_us-gaap_ClassOfStockDomain_e0761a6a-85ad-436c-8a88-2e83f3840040_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ClassOfStockDomain_cf695164-a019-4e5f-9d43-964b5df958b3" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ClassOfStockDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementClassOfStockAxis_e0761a6a-85ad-436c-8a88-2e83f3840040" xlink:to="loc_us-gaap_ClassOfStockDomain_cf695164-a019-4e5f-9d43-964b5df958b3" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CommonClassAMember_277dd95c-e489-4bfc-b737-ff8ced730639" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_CommonClassAMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockDomain_cf695164-a019-4e5f-9d43-964b5df958b3" xlink:to="loc_us-gaap_CommonClassAMember_277dd95c-e489-4bfc-b737-ff8ced730639" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CommonClassCMember_1c62efe3-8549-455c-9ed0-bfcef8807e45" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_CommonClassCMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockDomain_cf695164-a019-4e5f-9d43-964b5df958b3" xlink:to="loc_us-gaap_CommonClassCMember_1c62efe3-8549-455c-9ed0-bfcef8807e45" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SeriesCPreferredStockMember_06c33f10-cfc7-4fea-96a5-bba35fe7c9e0" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SeriesCPreferredStockMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockDomain_cf695164-a019-4e5f-9d43-964b5df958b3" xlink:to="loc_us-gaap_SeriesCPreferredStockMember_06c33f10-cfc7-4fea-96a5-bba35fe7c9e0" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SeriesDPreferredStockMember_fd5119cd-7cde-4021-a8da-ed943885dd81" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SeriesDPreferredStockMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockDomain_cf695164-a019-4e5f-9d43-964b5df958b3" xlink:to="loc_us-gaap_SeriesDPreferredStockMember_fd5119cd-7cde-4021-a8da-ed943885dd81" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SeriesEPreferredStockMember_858cf0f4-68f9-4aab-98ec-c759f4e27cb4" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SeriesEPreferredStockMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockDomain_cf695164-a019-4e5f-9d43-964b5df958b3" xlink:to="loc_us-gaap_SeriesEPreferredStockMember_858cf0f4-68f9-4aab-98ec-c759f4e27cb4" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SeriesFPreferredStockMember_594fb9d6-a9ac-4571-a9a0-d92ce7fcd4ba" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SeriesFPreferredStockMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockDomain_cf695164-a019-4e5f-9d43-964b5df958b3" xlink:to="loc_us-gaap_SeriesFPreferredStockMember_594fb9d6-a9ac-4571-a9a0-d92ce7fcd4ba" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SeriesGPreferredStockMember_9185a354-a51e-43a2-a018-7711e9c84aaa" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SeriesGPreferredStockMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockDomain_cf695164-a019-4e5f-9d43-964b5df958b3" xlink:to="loc_us-gaap_SeriesGPreferredStockMember_9185a354-a51e-43a2-a018-7711e9c84aaa" xlink:type="arc" order="6"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CommonClassBMember_67e53b86-5023-42fe-ab00-1e777b8a2fc1" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_CommonClassBMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockDomain_cf695164-a019-4e5f-9d43-964b5df958b3" xlink:to="loc_us-gaap_CommonClassBMember_67e53b86-5023-42fe-ab00-1e777b8a2fc1" xlink:type="arc" order="7"/>
    <link:loc xlink:type="locator" xlink:label="loc_dei_DocumentType_2d42ef81-df06-4631-b445-fffa0703242d" xlink:href="https://xbrl.sec.gov/dei/2023/dei-2023.xsd#dei_DocumentType"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_EntityInformationLineItems_bd5acb12-09f1-4fe2-b871-0c4d77812e67" xlink:to="loc_dei_DocumentType_2d42ef81-df06-4631-b445-fffa0703242d" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_dei_DocumentQuarterlyReport_290757f6-249d-4146-ba0e-a65c450ba91c" xlink:href="https://xbrl.sec.gov/dei/2023/dei-2023.xsd#dei_DocumentQuarterlyReport"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_EntityInformationLineItems_bd5acb12-09f1-4fe2-b871-0c4d77812e67" xlink:to="loc_dei_DocumentQuarterlyReport_290757f6-249d-4146-ba0e-a65c450ba91c" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_dei_DocumentPeriodEndDate_c3997e4c-9706-43df-8053-055b2c15f65e" xlink:href="https://xbrl.sec.gov/dei/2023/dei-2023.xsd#dei_DocumentPeriodEndDate"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_EntityInformationLineItems_bd5acb12-09f1-4fe2-b871-0c4d77812e67" xlink:to="loc_dei_DocumentPeriodEndDate_c3997e4c-9706-43df-8053-055b2c15f65e" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_dei_DocumentTransitionReport_674621ec-66bf-4528-942a-6fa6f53d9b5e" xlink:href="https://xbrl.sec.gov/dei/2023/dei-2023.xsd#dei_DocumentTransitionReport"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_EntityInformationLineItems_bd5acb12-09f1-4fe2-b871-0c4d77812e67" xlink:to="loc_dei_DocumentTransitionReport_674621ec-66bf-4528-942a-6fa6f53d9b5e" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_dei_EntityFileNumber_cf1bce77-8941-4121-9f9a-de45c0852250" xlink:href="https://xbrl.sec.gov/dei/2023/dei-2023.xsd#dei_EntityFileNumber"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_EntityInformationLineItems_bd5acb12-09f1-4fe2-b871-0c4d77812e67" xlink:to="loc_dei_EntityFileNumber_cf1bce77-8941-4121-9f9a-de45c0852250" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_dei_EntityRegistrantName_2d3294a4-ab56-406e-8233-e4738c7dc585" xlink:href="https://xbrl.sec.gov/dei/2023/dei-2023.xsd#dei_EntityRegistrantName"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_EntityInformationLineItems_bd5acb12-09f1-4fe2-b871-0c4d77812e67" xlink:to="loc_dei_EntityRegistrantName_2d3294a4-ab56-406e-8233-e4738c7dc585" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_dei_EntityIncorporationStateCountryCode_0d55e258-3e3d-4cf2-92ad-b6aa6a6a2570" xlink:href="https://xbrl.sec.gov/dei/2023/dei-2023.xsd#dei_EntityIncorporationStateCountryCode"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_EntityInformationLineItems_bd5acb12-09f1-4fe2-b871-0c4d77812e67" xlink:to="loc_dei_EntityIncorporationStateCountryCode_0d55e258-3e3d-4cf2-92ad-b6aa6a6a2570" xlink:type="arc" order="6"/>
    <link:loc xlink:type="locator" xlink:label="loc_dei_EntityTaxIdentificationNumber_adda23de-a204-4b73-8769-d035c10ae995" xlink:href="https://xbrl.sec.gov/dei/2023/dei-2023.xsd#dei_EntityTaxIdentificationNumber"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_EntityInformationLineItems_bd5acb12-09f1-4fe2-b871-0c4d77812e67" xlink:to="loc_dei_EntityTaxIdentificationNumber_adda23de-a204-4b73-8769-d035c10ae995" xlink:type="arc" order="7"/>
    <link:loc xlink:type="locator" xlink:label="loc_dei_EntityAddressAddressLine1_d2a64104-5c84-498c-bad7-19452053bbf0" xlink:href="https://xbrl.sec.gov/dei/2023/dei-2023.xsd#dei_EntityAddressAddressLine1"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_EntityInformationLineItems_bd5acb12-09f1-4fe2-b871-0c4d77812e67" xlink:to="loc_dei_EntityAddressAddressLine1_d2a64104-5c84-498c-bad7-19452053bbf0" xlink:type="arc" order="8"/>
    <link:loc xlink:type="locator" xlink:label="loc_dei_EntityAddressAddressLine2_2576e09b-7afc-4de9-89dc-89aad1f75a48" xlink:href="https://xbrl.sec.gov/dei/2023/dei-2023.xsd#dei_EntityAddressAddressLine2"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_EntityInformationLineItems_bd5acb12-09f1-4fe2-b871-0c4d77812e67" xlink:to="loc_dei_EntityAddressAddressLine2_2576e09b-7afc-4de9-89dc-89aad1f75a48" xlink:type="arc" order="9"/>
    <link:loc xlink:type="locator" xlink:label="loc_dei_EntityAddressCityOrTown_874cb162-b370-45d8-94ea-ac0e9972d41f" xlink:href="https://xbrl.sec.gov/dei/2023/dei-2023.xsd#dei_EntityAddressCityOrTown"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_EntityInformationLineItems_bd5acb12-09f1-4fe2-b871-0c4d77812e67" xlink:to="loc_dei_EntityAddressCityOrTown_874cb162-b370-45d8-94ea-ac0e9972d41f" xlink:type="arc" order="10"/>
    <link:loc xlink:type="locator" xlink:label="loc_dei_EntityAddressStateOrProvince_0ca85cdb-cd86-41b5-b398-9a938e1c80e5" xlink:href="https://xbrl.sec.gov/dei/2023/dei-2023.xsd#dei_EntityAddressStateOrProvince"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_EntityInformationLineItems_bd5acb12-09f1-4fe2-b871-0c4d77812e67" xlink:to="loc_dei_EntityAddressStateOrProvince_0ca85cdb-cd86-41b5-b398-9a938e1c80e5" xlink:type="arc" order="11"/>
    <link:loc xlink:type="locator" xlink:label="loc_dei_EntityAddressPostalZipCode_26b0f94c-35ef-4c34-aa47-fe84e3bb01e8" xlink:href="https://xbrl.sec.gov/dei/2023/dei-2023.xsd#dei_EntityAddressPostalZipCode"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_EntityInformationLineItems_bd5acb12-09f1-4fe2-b871-0c4d77812e67" xlink:to="loc_dei_EntityAddressPostalZipCode_26b0f94c-35ef-4c34-aa47-fe84e3bb01e8" xlink:type="arc" order="12"/>
    <link:loc xlink:type="locator" xlink:label="loc_dei_CityAreaCode_f4d9d507-d0a5-439a-bc94-8228d03db3b3" xlink:href="https://xbrl.sec.gov/dei/2023/dei-2023.xsd#dei_CityAreaCode"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_EntityInformationLineItems_bd5acb12-09f1-4fe2-b871-0c4d77812e67" xlink:to="loc_dei_CityAreaCode_f4d9d507-d0a5-439a-bc94-8228d03db3b3" xlink:type="arc" order="13"/>
    <link:loc xlink:type="locator" xlink:label="loc_dei_LocalPhoneNumber_3ba8e213-1de3-4c26-ac97-db90a2c81eb1" xlink:href="https://xbrl.sec.gov/dei/2023/dei-2023.xsd#dei_LocalPhoneNumber"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_EntityInformationLineItems_bd5acb12-09f1-4fe2-b871-0c4d77812e67" xlink:to="loc_dei_LocalPhoneNumber_3ba8e213-1de3-4c26-ac97-db90a2c81eb1" xlink:type="arc" order="14"/>
    <link:loc xlink:type="locator" xlink:label="loc_dei_Security12bTitle_4e2733b2-542e-4667-8bfa-585ceb468213" xlink:href="https://xbrl.sec.gov/dei/2023/dei-2023.xsd#dei_Security12bTitle"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_EntityInformationLineItems_bd5acb12-09f1-4fe2-b871-0c4d77812e67" xlink:to="loc_dei_Security12bTitle_4e2733b2-542e-4667-8bfa-585ceb468213" xlink:type="arc" order="15"/>
    <link:loc xlink:type="locator" xlink:label="loc_dei_TradingSymbol_7953e543-0e08-49e8-8e17-d5f68f4c602d" xlink:href="https://xbrl.sec.gov/dei/2023/dei-2023.xsd#dei_TradingSymbol"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_EntityInformationLineItems_bd5acb12-09f1-4fe2-b871-0c4d77812e67" xlink:to="loc_dei_TradingSymbol_7953e543-0e08-49e8-8e17-d5f68f4c602d" xlink:type="arc" order="16"/>
    <link:loc xlink:type="locator" xlink:label="loc_dei_SecurityExchangeName_31d5b0e5-faa6-4a2b-9b8b-0dfe39cc8481" xlink:href="https://xbrl.sec.gov/dei/2023/dei-2023.xsd#dei_SecurityExchangeName"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_EntityInformationLineItems_bd5acb12-09f1-4fe2-b871-0c4d77812e67" xlink:to="loc_dei_SecurityExchangeName_31d5b0e5-faa6-4a2b-9b8b-0dfe39cc8481" xlink:type="arc" order="17"/>
    <link:loc xlink:type="locator" xlink:label="loc_dei_Security12gTitle_1b085449-32cf-4e3b-9641-cd330c07acb7" xlink:href="https://xbrl.sec.gov/dei/2023/dei-2023.xsd#dei_Security12gTitle"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_EntityInformationLineItems_bd5acb12-09f1-4fe2-b871-0c4d77812e67" xlink:to="loc_dei_Security12gTitle_1b085449-32cf-4e3b-9641-cd330c07acb7" xlink:type="arc" order="18"/>
    <link:loc xlink:type="locator" xlink:label="loc_dei_EntityCurrentReportingStatus_4addfaa7-5046-4ccd-a771-49bdf33a4afe" xlink:href="https://xbrl.sec.gov/dei/2023/dei-2023.xsd#dei_EntityCurrentReportingStatus"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_EntityInformationLineItems_bd5acb12-09f1-4fe2-b871-0c4d77812e67" xlink:to="loc_dei_EntityCurrentReportingStatus_4addfaa7-5046-4ccd-a771-49bdf33a4afe" xlink:type="arc" order="19"/>
    <link:loc xlink:type="locator" xlink:label="loc_dei_EntityInteractiveDataCurrent_06ca7b2f-836e-4855-868c-4fea334c27da" xlink:href="https://xbrl.sec.gov/dei/2023/dei-2023.xsd#dei_EntityInteractiveDataCurrent"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_EntityInformationLineItems_bd5acb12-09f1-4fe2-b871-0c4d77812e67" xlink:to="loc_dei_EntityInteractiveDataCurrent_06ca7b2f-836e-4855-868c-4fea334c27da" xlink:type="arc" order="20"/>
    <link:loc xlink:type="locator" xlink:label="loc_dei_EntityFilerCategory_7bd04a30-06e1-4e40-8e3c-f152a0dbb7a4" xlink:href="https://xbrl.sec.gov/dei/2023/dei-2023.xsd#dei_EntityFilerCategory"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_EntityInformationLineItems_bd5acb12-09f1-4fe2-b871-0c4d77812e67" xlink:to="loc_dei_EntityFilerCategory_7bd04a30-06e1-4e40-8e3c-f152a0dbb7a4" xlink:type="arc" order="21"/>
    <link:loc xlink:type="locator" xlink:label="loc_dei_EntitySmallBusiness_51d9a5f8-6dd2-43f3-a903-85b8d12e4eb1" xlink:href="https://xbrl.sec.gov/dei/2023/dei-2023.xsd#dei_EntitySmallBusiness"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_EntityInformationLineItems_bd5acb12-09f1-4fe2-b871-0c4d77812e67" xlink:to="loc_dei_EntitySmallBusiness_51d9a5f8-6dd2-43f3-a903-85b8d12e4eb1" xlink:type="arc" order="22"/>
    <link:loc xlink:type="locator" xlink:label="loc_dei_EntityEmergingGrowthCompany_ef06e99c-ea5b-4ef4-a904-cf563ca090ba" xlink:href="https://xbrl.sec.gov/dei/2023/dei-2023.xsd#dei_EntityEmergingGrowthCompany"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_EntityInformationLineItems_bd5acb12-09f1-4fe2-b871-0c4d77812e67" xlink:to="loc_dei_EntityEmergingGrowthCompany_ef06e99c-ea5b-4ef4-a904-cf563ca090ba" xlink:type="arc" order="23"/>
    <link:loc xlink:type="locator" xlink:label="loc_dei_EntityShellCompany_919834d3-da85-468b-a67b-5401c5314446" xlink:href="https://xbrl.sec.gov/dei/2023/dei-2023.xsd#dei_EntityShellCompany"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_EntityInformationLineItems_bd5acb12-09f1-4fe2-b871-0c4d77812e67" xlink:to="loc_dei_EntityShellCompany_919834d3-da85-468b-a67b-5401c5314446" xlink:type="arc" order="24"/>
    <link:loc xlink:type="locator" xlink:label="loc_dei_EntityCommonStockSharesOutstanding_106f84ae-21a9-4d0c-9b2f-2f37467d137c" xlink:href="https://xbrl.sec.gov/dei/2023/dei-2023.xsd#dei_EntityCommonStockSharesOutstanding"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_EntityInformationLineItems_bd5acb12-09f1-4fe2-b871-0c4d77812e67" xlink:to="loc_dei_EntityCommonStockSharesOutstanding_106f84ae-21a9-4d0c-9b2f-2f37467d137c" xlink:type="arc" order="25"/>
    <link:loc xlink:type="locator" xlink:label="loc_dei_EntityCentralIndexKey_81793117-9ba7-49a1-b4ea-3cdd25be1161" xlink:href="https://xbrl.sec.gov/dei/2023/dei-2023.xsd#dei_EntityCentralIndexKey"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_EntityInformationLineItems_bd5acb12-09f1-4fe2-b871-0c4d77812e67" xlink:to="loc_dei_EntityCentralIndexKey_81793117-9ba7-49a1-b4ea-3cdd25be1161" xlink:type="arc" order="26"/>
    <link:loc xlink:type="locator" xlink:label="loc_dei_DocumentFiscalYearFocus_2aee7b77-577f-49d7-923a-c1e9b41909d6" xlink:href="https://xbrl.sec.gov/dei/2023/dei-2023.xsd#dei_DocumentFiscalYearFocus"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_EntityInformationLineItems_bd5acb12-09f1-4fe2-b871-0c4d77812e67" xlink:to="loc_dei_DocumentFiscalYearFocus_2aee7b77-577f-49d7-923a-c1e9b41909d6" xlink:type="arc" order="27"/>
    <link:loc xlink:type="locator" xlink:label="loc_dei_DocumentFiscalPeriodFocus_d1455297-be0b-49ed-9ff8-f4e1740e3c0f" xlink:href="https://xbrl.sec.gov/dei/2023/dei-2023.xsd#dei_DocumentFiscalPeriodFocus"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_EntityInformationLineItems_bd5acb12-09f1-4fe2-b871-0c4d77812e67" xlink:to="loc_dei_DocumentFiscalPeriodFocus_d1455297-be0b-49ed-9ff8-f4e1740e3c0f" xlink:type="arc" order="28"/>
    <link:loc xlink:type="locator" xlink:label="loc_dei_AmendmentFlag_00c5679c-cc3e-4f24-8f55-9d644d48af66" xlink:href="https://xbrl.sec.gov/dei/2023/dei-2023.xsd#dei_AmendmentFlag"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_EntityInformationLineItems_bd5acb12-09f1-4fe2-b871-0c4d77812e67" xlink:to="loc_dei_AmendmentFlag_00c5679c-cc3e-4f24-8f55-9d644d48af66" xlink:type="arc" order="29"/>
    <link:loc xlink:type="locator" xlink:label="loc_dei_CurrentFiscalYearEndDate_add52e5a-e699-4541-b0ba-813c4944fcb0" xlink:href="https://xbrl.sec.gov/dei/2023/dei-2023.xsd#dei_CurrentFiscalYearEndDate"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_EntityInformationLineItems_bd5acb12-09f1-4fe2-b871-0c4d77812e67" xlink:to="loc_dei_CurrentFiscalYearEndDate_add52e5a-e699-4541-b0ba-813c4944fcb0" xlink:type="arc" order="30"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.farmermac.com/role/CONSOLIDATEDBALANCESHEETSunaudited" xlink:type="simple" xlink:href="agm-20240331.xsd#CONSOLIDATEDBALANCESHEETSunaudited"/>
  <link:definitionLink xlink:role="http://www.farmermac.com/role/CONSOLIDATEDBALANCESHEETSunaudited" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StatementLineItems_8e03c637-7752-431f-a901-dd4ac22e8b6f" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_StatementLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StatementTable_5411fea1-bf44-4ec0-90a8-b2c6ee104e61" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_StatementTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_StatementLineItems_8e03c637-7752-431f-a901-dd4ac22e8b6f" xlink:to="loc_us-gaap_StatementTable_5411fea1-bf44-4ec0-90a8-b2c6ee104e61" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinancialInstrumentAxis_d389fd84-d42f-4e1f-addc-577af6db3fc6" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FinancialInstrumentAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_StatementTable_5411fea1-bf44-4ec0-90a8-b2c6ee104e61" xlink:to="loc_us-gaap_FinancialInstrumentAxis_d389fd84-d42f-4e1f-addc-577af6db3fc6" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_d389fd84-d42f-4e1f-addc-577af6db3fc6_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_FinancialInstrumentAxis_d389fd84-d42f-4e1f-addc-577af6db3fc6" xlink:to="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_d389fd84-d42f-4e1f-addc-577af6db3fc6_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_ce983c18-15cc-4865-a9eb-6d3013a70f8d" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_FinancialInstrumentAxis_d389fd84-d42f-4e1f-addc-577af6db3fc6" xlink:to="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_ce983c18-15cc-4865-a9eb-6d3013a70f8d" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesMember_786faf1b-8536-4433-bd67-5a31fc86dedc" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtSecuritiesMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_ce983c18-15cc-4865-a9eb-6d3013a70f8d" xlink:to="loc_us-gaap_DebtSecuritiesMember_786faf1b-8536-4433-bd67-5a31fc86dedc" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_MortgageBackedSecuritiesIssuedByUSGovernmentSponsoredEnterprisesMember_19b24d2e-f79e-49e6-92a8-a860fcbd7059" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_MortgageBackedSecuritiesIssuedByUSGovernmentSponsoredEnterprisesMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_ce983c18-15cc-4865-a9eb-6d3013a70f8d" xlink:to="loc_us-gaap_MortgageBackedSecuritiesIssuedByUSGovernmentSponsoredEnterprisesMember_19b24d2e-f79e-49e6-92a8-a860fcbd7059" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_USGovernmentAgenciesDebtSecuritiesMember_e10d4c92-7481-4985-8793-dcc5c3e7fbcf" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_USGovernmentAgenciesDebtSecuritiesMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_ce983c18-15cc-4865-a9eb-6d3013a70f8d" xlink:to="loc_us-gaap_USGovernmentAgenciesDebtSecuritiesMember_e10d4c92-7481-4985-8793-dcc5c3e7fbcf" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StatementClassOfStockAxis_5f9ec154-215e-4b09-84e2-2dd6f7176fde" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_StatementClassOfStockAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_StatementTable_5411fea1-bf44-4ec0-90a8-b2c6ee104e61" xlink:to="loc_us-gaap_StatementClassOfStockAxis_5f9ec154-215e-4b09-84e2-2dd6f7176fde" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ClassOfStockDomain_5f9ec154-215e-4b09-84e2-2dd6f7176fde_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ClassOfStockDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementClassOfStockAxis_5f9ec154-215e-4b09-84e2-2dd6f7176fde" xlink:to="loc_us-gaap_ClassOfStockDomain_5f9ec154-215e-4b09-84e2-2dd6f7176fde_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ClassOfStockDomain_3deb6613-7a98-469d-94c6-ebd2a085fe98" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ClassOfStockDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementClassOfStockAxis_5f9ec154-215e-4b09-84e2-2dd6f7176fde" xlink:to="loc_us-gaap_ClassOfStockDomain_3deb6613-7a98-469d-94c6-ebd2a085fe98" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SeriesCPreferredStockMember_59638cb1-4e67-4061-9266-8501623fd958" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SeriesCPreferredStockMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockDomain_3deb6613-7a98-469d-94c6-ebd2a085fe98" xlink:to="loc_us-gaap_SeriesCPreferredStockMember_59638cb1-4e67-4061-9266-8501623fd958" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SeriesDPreferredStockMember_fe8f7b4c-a273-4bb5-b7e8-5bb7de2f800d" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SeriesDPreferredStockMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockDomain_3deb6613-7a98-469d-94c6-ebd2a085fe98" xlink:to="loc_us-gaap_SeriesDPreferredStockMember_fe8f7b4c-a273-4bb5-b7e8-5bb7de2f800d" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SeriesEPreferredStockMember_3fa84a59-b6e2-4120-8ac7-639e8ad67cc7" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SeriesEPreferredStockMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockDomain_3deb6613-7a98-469d-94c6-ebd2a085fe98" xlink:to="loc_us-gaap_SeriesEPreferredStockMember_3fa84a59-b6e2-4120-8ac7-639e8ad67cc7" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SeriesFPreferredStockMember_9a2edeab-14bc-4ccf-9f99-7182c2347bef" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SeriesFPreferredStockMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockDomain_3deb6613-7a98-469d-94c6-ebd2a085fe98" xlink:to="loc_us-gaap_SeriesFPreferredStockMember_9a2edeab-14bc-4ccf-9f99-7182c2347bef" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SeriesGPreferredStockMember_49393adc-24fa-48ea-9dd5-4ba26360e46f" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SeriesGPreferredStockMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockDomain_3deb6613-7a98-469d-94c6-ebd2a085fe98" xlink:to="loc_us-gaap_SeriesGPreferredStockMember_49393adc-24fa-48ea-9dd5-4ba26360e46f" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CommonClassAMember_3a454ca3-b469-43b6-b85f-c033d1242c33" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_CommonClassAMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockDomain_3deb6613-7a98-469d-94c6-ebd2a085fe98" xlink:to="loc_us-gaap_CommonClassAMember_3a454ca3-b469-43b6-b85f-c033d1242c33" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CommonClassBMember_7fc96e88-45dd-4d82-bbc3-f3bf6d5b15b4" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_CommonClassBMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockDomain_3deb6613-7a98-469d-94c6-ebd2a085fe98" xlink:to="loc_us-gaap_CommonClassBMember_7fc96e88-45dd-4d82-bbc3-f3bf6d5b15b4" xlink:type="arc" order="6"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CommonClassCMember_99d8f122-bcfb-4fdb-a4f4-bb211a0101bc" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_CommonClassCMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockDomain_3deb6613-7a98-469d-94c6-ebd2a085fe98" xlink:to="loc_us-gaap_CommonClassCMember_99d8f122-bcfb-4fdb-a4f4-bb211a0101bc" xlink:type="arc" order="7"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AssetsAbstract_3bfdf009-65a6-4cc5-af0c-7ec2be5d66fb" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AssetsAbstract"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_8e03c637-7752-431f-a901-dd4ac22e8b6f" xlink:to="loc_us-gaap_AssetsAbstract_3bfdf009-65a6-4cc5-af0c-7ec2be5d66fb" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CashAndCashEquivalentsAtCarryingValue_7eb30725-eb97-48e4-8224-bac29b18dd31" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_CashAndCashEquivalentsAtCarryingValue"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AssetsAbstract_3bfdf009-65a6-4cc5-af0c-7ec2be5d66fb" xlink:to="loc_us-gaap_CashAndCashEquivalentsAtCarryingValue_7eb30725-eb97-48e4-8224-bac29b18dd31" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleExcludingAccruedInterest_205a39bc-d5c8-49f3-ab07-86fd9ed5c3aa" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtSecuritiesAvailableForSaleExcludingAccruedInterest"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AssetsAbstract_3bfdf009-65a6-4cc5-af0c-7ec2be5d66fb" xlink:to="loc_us-gaap_DebtSecuritiesAvailableForSaleExcludingAccruedInterest_205a39bc-d5c8-49f3-ab07-86fd9ed5c3aa" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TradingSecurities_f539718f-45e6-46bb-9811-f4607e21c64f" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_TradingSecurities"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AssetsAbstract_3bfdf009-65a6-4cc5-af0c-7ec2be5d66fb" xlink:to="loc_us-gaap_TradingSecurities_f539718f-45e6-46bb-9811-f4607e21c64f" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_DebtSecuritiesHeldToMaturityAmortizedCostExcludingAccruedInterestBeforeAllowanceForCreditLoss_5da00e5d-ebc5-4320-b94c-879cfc69bdba" xlink:href="agm-20240331.xsd#agm_DebtSecuritiesHeldToMaturityAmortizedCostExcludingAccruedInterestBeforeAllowanceForCreditLoss"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AssetsAbstract_3bfdf009-65a6-4cc5-af0c-7ec2be5d66fb" xlink:to="loc_agm_DebtSecuritiesHeldToMaturityAmortizedCostExcludingAccruedInterestBeforeAllowanceForCreditLoss_5da00e5d-ebc5-4320-b94c-879cfc69bdba" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherInvestments_97b78bef-0fec-4a71-aeef-6d6d8031ff2d" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherInvestments"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AssetsAbstract_3bfdf009-65a6-4cc5-af0c-7ec2be5d66fb" xlink:to="loc_us-gaap_OtherInvestments_97b78bef-0fec-4a71-aeef-6d6d8031ff2d" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_MarketableSecurities_365ccc58-8233-4aeb-a7fc-4e5d25c83d0b" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_MarketableSecurities"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AssetsAbstract_3bfdf009-65a6-4cc5-af0c-7ec2be5d66fb" xlink:to="loc_us-gaap_MarketableSecurities_365ccc58-8233-4aeb-a7fc-4e5d25c83d0b" xlink:type="arc" order="6"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NotesReceivableNetAbstract_cd3e32f6-edc3-4923-9767-63686d40d6db" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_NotesReceivableNetAbstract"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AssetsAbstract_3bfdf009-65a6-4cc5-af0c-7ec2be5d66fb" xlink:to="loc_us-gaap_NotesReceivableNetAbstract_cd3e32f6-edc3-4923-9767-63686d40d6db" xlink:type="arc" order="7"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinancingReceivableExcludingAccruedInterestBeforeAllowanceForCreditLoss_7c86bb95-99cf-4531-9a9b-10075095f1c6" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FinancingReceivableExcludingAccruedInterestBeforeAllowanceForCreditLoss"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_NotesReceivableNetAbstract_cd3e32f6-edc3-4923-9767-63686d40d6db" xlink:to="loc_us-gaap_FinancingReceivableExcludingAccruedInterestBeforeAllowanceForCreditLoss_7c86bb95-99cf-4531-9a9b-10075095f1c6" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_FinancingReceivableExcludingAccruedInterestBeforeAllowanceForCreditLossHeldInTrust_00592b79-01cd-4d9a-bc73-73c2b8b20636" xlink:href="agm-20240331.xsd#agm_FinancingReceivableExcludingAccruedInterestBeforeAllowanceForCreditLossHeldInTrust"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_NotesReceivableNetAbstract_cd3e32f6-edc3-4923-9767-63686d40d6db" xlink:to="loc_agm_FinancingReceivableExcludingAccruedInterestBeforeAllowanceForCreditLossHeldInTrust_00592b79-01cd-4d9a-bc73-73c2b8b20636" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinancingReceivableAllowanceForCreditLossExcludingAccruedInterest_cb46a14e-b3b2-465e-9b61-6553728497b4" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FinancingReceivableAllowanceForCreditLossExcludingAccruedInterest"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_NotesReceivableNetAbstract_cd3e32f6-edc3-4923-9767-63686d40d6db" xlink:to="loc_us-gaap_FinancingReceivableAllowanceForCreditLossExcludingAccruedInterest_cb46a14e-b3b2-465e-9b61-6553728497b4" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinancingReceivableExcludingAccruedInterestAfterAllowanceForCreditLoss_138a52b9-4f8f-4abc-bacf-a08d92927208" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FinancingReceivableExcludingAccruedInterestAfterAllowanceForCreditLoss"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AssetsAbstract_3bfdf009-65a6-4cc5-af0c-7ec2be5d66fb" xlink:to="loc_us-gaap_FinancingReceivableExcludingAccruedInterestAfterAllowanceForCreditLoss_138a52b9-4f8f-4abc-bacf-a08d92927208" xlink:type="arc" order="8"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeAssets_963d3f61-b1d9-4e71-bfb4-65d0d9316b30" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DerivativeAssets"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AssetsAbstract_3bfdf009-65a6-4cc5-af0c-7ec2be5d66fb" xlink:to="loc_us-gaap_DerivativeAssets_963d3f61-b1d9-4e71-bfb4-65d0d9316b30" xlink:type="arc" order="9"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InterestReceivable_3a4a504b-dd0b-4f88-95dc-73158e343e96" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_InterestReceivable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AssetsAbstract_3bfdf009-65a6-4cc5-af0c-7ec2be5d66fb" xlink:to="loc_us-gaap_InterestReceivable_3a4a504b-dd0b-4f88-95dc-73158e343e96" xlink:type="arc" order="10"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_GuarantyAssets_6155735f-371f-4504-b639-ce36ea5df70b" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_GuarantyAssets"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AssetsAbstract_3bfdf009-65a6-4cc5-af0c-7ec2be5d66fb" xlink:to="loc_us-gaap_GuarantyAssets_6155735f-371f-4504-b639-ce36ea5df70b" xlink:type="arc" order="11"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredIncomeTaxAssetsNet_35050cf0-998e-47b9-a9d0-5cf561d73483" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DeferredIncomeTaxAssetsNet"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AssetsAbstract_3bfdf009-65a6-4cc5-af0c-7ec2be5d66fb" xlink:to="loc_us-gaap_DeferredIncomeTaxAssetsNet_35050cf0-998e-47b9-a9d0-5cf561d73483" xlink:type="arc" order="12"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PrepaidExpenseAndOtherAssets_4537c83d-edd2-4d5b-b8c6-2fbe5841b77a" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PrepaidExpenseAndOtherAssets"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AssetsAbstract_3bfdf009-65a6-4cc5-af0c-7ec2be5d66fb" xlink:to="loc_us-gaap_PrepaidExpenseAndOtherAssets_4537c83d-edd2-4d5b-b8c6-2fbe5841b77a" xlink:type="arc" order="13"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Assets_6758c8fc-8905-4d8c-8bbf-627c4af34122" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_Assets"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AssetsAbstract_3bfdf009-65a6-4cc5-af0c-7ec2be5d66fb" xlink:to="loc_us-gaap_Assets_6758c8fc-8905-4d8c-8bbf-627c4af34122" xlink:type="arc" order="14"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LiabilitiesAndStockholdersEquityAbstract_98acb4bd-5bef-498a-853a-436e14049844" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LiabilitiesAndStockholdersEquityAbstract"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_8e03c637-7752-431f-a901-dd4ac22e8b6f" xlink:to="loc_us-gaap_LiabilitiesAndStockholdersEquityAbstract_98acb4bd-5bef-498a-853a-436e14049844" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LiabilitiesAbstract_98321347-9033-4a79-a5d1-46c1723dd9b8" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LiabilitiesAbstract"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LiabilitiesAndStockholdersEquityAbstract_98acb4bd-5bef-498a-853a-436e14049844" xlink:to="loc_us-gaap_LiabilitiesAbstract_98321347-9033-4a79-a5d1-46c1723dd9b8" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_LongTermDebtNetOfHedgingAdjustments_d013e69a-2d49-4376-93b2-b01cc6d966d7" xlink:href="agm-20240331.xsd#agm_LongTermDebtNetOfHedgingAdjustments"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LiabilitiesAbstract_98321347-9033-4a79-a5d1-46c1723dd9b8" xlink:to="loc_agm_LongTermDebtNetOfHedgingAdjustments_d013e69a-2d49-4376-93b2-b01cc6d966d7" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_LiabilitiesHeldInTrust_43ad2d30-df62-4b51-b991-66ce88694b98" xlink:href="agm-20240331.xsd#agm_LiabilitiesHeldInTrust"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LiabilitiesAbstract_98321347-9033-4a79-a5d1-46c1723dd9b8" xlink:to="loc_agm_LiabilitiesHeldInTrust_43ad2d30-df62-4b51-b991-66ce88694b98" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeLiabilities_30750ba2-479c-4191-8a33-734d1043f915" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DerivativeLiabilities"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LiabilitiesAbstract_98321347-9033-4a79-a5d1-46c1723dd9b8" xlink:to="loc_us-gaap_DerivativeLiabilities_30750ba2-479c-4191-8a33-734d1043f915" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InterestPayableCurrentAndNoncurrent_a7e70baa-b61f-4474-8a9e-f42b81b9ca2a" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_InterestPayableCurrentAndNoncurrent"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LiabilitiesAbstract_98321347-9033-4a79-a5d1-46c1723dd9b8" xlink:to="loc_us-gaap_InterestPayableCurrentAndNoncurrent_a7e70baa-b61f-4474-8a9e-f42b81b9ca2a" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_GuarantyLiabilities_799bd487-5d5b-45b4-8a78-d19eeeb54cc8" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_GuarantyLiabilities"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LiabilitiesAbstract_98321347-9033-4a79-a5d1-46c1723dd9b8" xlink:to="loc_us-gaap_GuarantyLiabilities_799bd487-5d5b-45b4-8a78-d19eeeb54cc8" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccountsPayableAndOtherAccruedLiabilities_bf8dc52f-26d7-46ee-9153-e8ec414ddebf" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AccountsPayableAndOtherAccruedLiabilities"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LiabilitiesAbstract_98321347-9033-4a79-a5d1-46c1723dd9b8" xlink:to="loc_us-gaap_AccountsPayableAndOtherAccruedLiabilities_bf8dc52f-26d7-46ee-9153-e8ec414ddebf" xlink:type="arc" order="6"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredIncomeTaxLiabilitiesNet_8e7e0547-8a0c-41d3-90e9-dd9c2620b8e6" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DeferredIncomeTaxLiabilitiesNet"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LiabilitiesAbstract_98321347-9033-4a79-a5d1-46c1723dd9b8" xlink:to="loc_us-gaap_DeferredIncomeTaxLiabilitiesNet_8e7e0547-8a0c-41d3-90e9-dd9c2620b8e6" xlink:type="arc" order="7"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_ReserveForLosses_892e4105-1593-495e-95b0-5136868a80c8" xlink:href="agm-20240331.xsd#agm_ReserveForLosses"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LiabilitiesAbstract_98321347-9033-4a79-a5d1-46c1723dd9b8" xlink:to="loc_agm_ReserveForLosses_892e4105-1593-495e-95b0-5136868a80c8" xlink:type="arc" order="8"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Liabilities_21b8c750-524b-413a-84df-887b76d4f923" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_Liabilities"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LiabilitiesAbstract_98321347-9033-4a79-a5d1-46c1723dd9b8" xlink:to="loc_us-gaap_Liabilities_21b8c750-524b-413a-84df-887b76d4f923" xlink:type="arc" order="9"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CommitmentsAndContingencies_312985d7-da70-45ec-a53e-ee6933bcf211" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_CommitmentsAndContingencies"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LiabilitiesAndStockholdersEquityAbstract_98acb4bd-5bef-498a-853a-436e14049844" xlink:to="loc_us-gaap_CommitmentsAndContingencies_312985d7-da70-45ec-a53e-ee6933bcf211" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterestAbstract_3668e28b-024c-43cc-b960-da42bdd5d6ec" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterestAbstract"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LiabilitiesAndStockholdersEquityAbstract_98acb4bd-5bef-498a-853a-436e14049844" xlink:to="loc_us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterestAbstract_3668e28b-024c-43cc-b960-da42bdd5d6ec" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PreferredStockNumberOfSharesParValueAndOtherDisclosuresAbstract_a5b2e48b-428e-4537-907d-6ffdd20f21fb" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PreferredStockNumberOfSharesParValueAndOtherDisclosuresAbstract"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterestAbstract_3668e28b-024c-43cc-b960-da42bdd5d6ec" xlink:to="loc_us-gaap_PreferredStockNumberOfSharesParValueAndOtherDisclosuresAbstract_a5b2e48b-428e-4537-907d-6ffdd20f21fb" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PreferredStockValue_6db79c2c-846b-4278-9f9a-88b44d78f8af" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PreferredStockValue"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_PreferredStockNumberOfSharesParValueAndOtherDisclosuresAbstract_a5b2e48b-428e-4537-907d-6ffdd20f21fb" xlink:to="loc_us-gaap_PreferredStockValue_6db79c2c-846b-4278-9f9a-88b44d78f8af" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CommonStockNumberOfSharesParValueAndOtherDisclosuresAbstract_f24c78f6-d4ee-4941-b951-22c27df8f1f5" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_CommonStockNumberOfSharesParValueAndOtherDisclosuresAbstract"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterestAbstract_3668e28b-024c-43cc-b960-da42bdd5d6ec" xlink:to="loc_us-gaap_CommonStockNumberOfSharesParValueAndOtherDisclosuresAbstract_f24c78f6-d4ee-4941-b951-22c27df8f1f5" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CommonStockValue_953d0376-9caf-47c7-ade1-f660bff189ca" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_CommonStockValue"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_CommonStockNumberOfSharesParValueAndOtherDisclosuresAbstract_f24c78f6-d4ee-4941-b951-22c27df8f1f5" xlink:to="loc_us-gaap_CommonStockValue_953d0376-9caf-47c7-ade1-f660bff189ca" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AdditionalPaidInCapital_33351afa-f887-4e7a-a42d-bc6edec7039d" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AdditionalPaidInCapital"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterestAbstract_3668e28b-024c-43cc-b960-da42bdd5d6ec" xlink:to="loc_us-gaap_AdditionalPaidInCapital_33351afa-f887-4e7a-a42d-bc6edec7039d" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossNetOfTax_0cfd1a05-9044-4fb6-b52b-a326f87040de" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AccumulatedOtherComprehensiveIncomeLossNetOfTax"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterestAbstract_3668e28b-024c-43cc-b960-da42bdd5d6ec" xlink:to="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossNetOfTax_0cfd1a05-9044-4fb6-b52b-a326f87040de" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RetainedEarningsAccumulatedDeficit_f6e3f89c-acea-4e19-b58b-3672e0023834" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_RetainedEarningsAccumulatedDeficit"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterestAbstract_3668e28b-024c-43cc-b960-da42bdd5d6ec" xlink:to="loc_us-gaap_RetainedEarningsAccumulatedDeficit_f6e3f89c-acea-4e19-b58b-3672e0023834" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StockholdersEquity_53312835-44e2-44d0-a4ec-bd5a2976db4c" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_StockholdersEquity"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterestAbstract_3668e28b-024c-43cc-b960-da42bdd5d6ec" xlink:to="loc_us-gaap_StockholdersEquity_53312835-44e2-44d0-a4ec-bd5a2976db4c" xlink:type="arc" order="6"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LiabilitiesAndStockholdersEquity_17b98693-9a08-4dad-9168-5beb89efe0ed" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LiabilitiesAndStockholdersEquity"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LiabilitiesAndStockholdersEquityAbstract_98acb4bd-5bef-498a-853a-436e14049844" xlink:to="loc_us-gaap_LiabilitiesAndStockholdersEquity_17b98693-9a08-4dad-9168-5beb89efe0ed" xlink:type="arc" order="4"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.farmermac.com/role/CONSOLIDATEDBALANCESHEETSunauditedParenthetical" xlink:type="simple" xlink:href="agm-20240331.xsd#CONSOLIDATEDBALANCESHEETSunauditedParenthetical"/>
  <link:definitionLink xlink:role="http://www.farmermac.com/role/CONSOLIDATEDBALANCESHEETSunauditedParenthetical" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StatementLineItems_ac413d5c-6c24-4d21-8ddb-48a09c158501" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_StatementLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StatementTable_e827ced7-40d6-4261-97ee-5886926d7962" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_StatementTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_StatementLineItems_ac413d5c-6c24-4d21-8ddb-48a09c158501" xlink:to="loc_us-gaap_StatementTable_e827ced7-40d6-4261-97ee-5886926d7962" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinancialInstrumentAxis_ab02e023-da6a-4468-a794-97bfc5546111" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FinancialInstrumentAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_StatementTable_e827ced7-40d6-4261-97ee-5886926d7962" xlink:to="loc_us-gaap_FinancialInstrumentAxis_ab02e023-da6a-4468-a794-97bfc5546111" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_ab02e023-da6a-4468-a794-97bfc5546111_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_FinancialInstrumentAxis_ab02e023-da6a-4468-a794-97bfc5546111" xlink:to="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_ab02e023-da6a-4468-a794-97bfc5546111_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_c53addeb-5596-418a-a276-7053d83adeb0" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_FinancialInstrumentAxis_ab02e023-da6a-4468-a794-97bfc5546111" xlink:to="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_c53addeb-5596-418a-a276-7053d83adeb0" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_DebtSecuritiesAvailableForSaleMember_385cc56a-44ef-4d39-b7c1-e56fd89d0877" xlink:href="agm-20240331.xsd#agm_DebtSecuritiesAvailableForSaleMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_c53addeb-5596-418a-a276-7053d83adeb0" xlink:to="loc_agm_DebtSecuritiesAvailableForSaleMember_385cc56a-44ef-4d39-b7c1-e56fd89d0877" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_MortgageBackedSecuritiesIssuedByUSGovernmentSponsoredEnterprisesMember_a9f89210-91ff-479c-928f-30889c9156d5" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_MortgageBackedSecuritiesIssuedByUSGovernmentSponsoredEnterprisesMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_c53addeb-5596-418a-a276-7053d83adeb0" xlink:to="loc_us-gaap_MortgageBackedSecuritiesIssuedByUSGovernmentSponsoredEnterprisesMember_a9f89210-91ff-479c-928f-30889c9156d5" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_ConsolidatedEntitiesAxis_4d00464e-0815-4c06-914b-e433e82780bf" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_ConsolidatedEntitiesAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_StatementTable_e827ced7-40d6-4261-97ee-5886926d7962" xlink:to="loc_srt_ConsolidatedEntitiesAxis_4d00464e-0815-4c06-914b-e433e82780bf" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_ConsolidatedEntitiesDomain_4d00464e-0815-4c06-914b-e433e82780bf_default" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_ConsolidatedEntitiesDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_srt_ConsolidatedEntitiesAxis_4d00464e-0815-4c06-914b-e433e82780bf" xlink:to="loc_srt_ConsolidatedEntitiesDomain_4d00464e-0815-4c06-914b-e433e82780bf_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_ConsolidatedEntitiesDomain_b5dcd7d3-441d-4e0e-b4ac-2e52fe8d5f6a" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_ConsolidatedEntitiesDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_srt_ConsolidatedEntitiesAxis_4d00464e-0815-4c06-914b-e433e82780bf" xlink:to="loc_srt_ConsolidatedEntitiesDomain_b5dcd7d3-441d-4e0e-b4ac-2e52fe8d5f6a" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_VariableInterestEntityPrimaryBeneficiaryMember_810856c6-8b4d-426f-b76c-2cca85368244" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_VariableInterestEntityPrimaryBeneficiaryMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_ConsolidatedEntitiesDomain_b5dcd7d3-441d-4e0e-b4ac-2e52fe8d5f6a" xlink:to="loc_us-gaap_VariableInterestEntityPrimaryBeneficiaryMember_810856c6-8b4d-426f-b76c-2cca85368244" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StatementClassOfStockAxis_4f05bdc4-abc5-4569-97fc-8715eb6cf84a" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_StatementClassOfStockAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_StatementTable_e827ced7-40d6-4261-97ee-5886926d7962" xlink:to="loc_us-gaap_StatementClassOfStockAxis_4f05bdc4-abc5-4569-97fc-8715eb6cf84a" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ClassOfStockDomain_4f05bdc4-abc5-4569-97fc-8715eb6cf84a_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ClassOfStockDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementClassOfStockAxis_4f05bdc4-abc5-4569-97fc-8715eb6cf84a" xlink:to="loc_us-gaap_ClassOfStockDomain_4f05bdc4-abc5-4569-97fc-8715eb6cf84a_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ClassOfStockDomain_ef526b62-4f27-44ba-9652-d2a1548c1a57" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ClassOfStockDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementClassOfStockAxis_4f05bdc4-abc5-4569-97fc-8715eb6cf84a" xlink:to="loc_us-gaap_ClassOfStockDomain_ef526b62-4f27-44ba-9652-d2a1548c1a57" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SeriesCPreferredStockMember_7a365103-5a10-4ca1-8963-d229f0c3c570" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SeriesCPreferredStockMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockDomain_ef526b62-4f27-44ba-9652-d2a1548c1a57" xlink:to="loc_us-gaap_SeriesCPreferredStockMember_7a365103-5a10-4ca1-8963-d229f0c3c570" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SeriesDPreferredStockMember_f94f7f29-a353-47eb-8f0c-43699b50f8ba" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SeriesDPreferredStockMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockDomain_ef526b62-4f27-44ba-9652-d2a1548c1a57" xlink:to="loc_us-gaap_SeriesDPreferredStockMember_f94f7f29-a353-47eb-8f0c-43699b50f8ba" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SeriesEPreferredStockMember_fe5af768-5222-4f13-8ed0-b9309fdc5904" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SeriesEPreferredStockMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockDomain_ef526b62-4f27-44ba-9652-d2a1548c1a57" xlink:to="loc_us-gaap_SeriesEPreferredStockMember_fe5af768-5222-4f13-8ed0-b9309fdc5904" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SeriesFPreferredStockMember_8d87980e-04e2-4acf-8d2e-5fc2a36adc14" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SeriesFPreferredStockMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockDomain_ef526b62-4f27-44ba-9652-d2a1548c1a57" xlink:to="loc_us-gaap_SeriesFPreferredStockMember_8d87980e-04e2-4acf-8d2e-5fc2a36adc14" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SeriesGPreferredStockMember_d0b2bc7f-a969-48f8-b20a-ce585dbff3a8" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SeriesGPreferredStockMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockDomain_ef526b62-4f27-44ba-9652-d2a1548c1a57" xlink:to="loc_us-gaap_SeriesGPreferredStockMember_d0b2bc7f-a969-48f8-b20a-ce585dbff3a8" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CommonClassAMember_49a32a67-5467-4bc0-b88e-c30d4cb63213" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_CommonClassAMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockDomain_ef526b62-4f27-44ba-9652-d2a1548c1a57" xlink:to="loc_us-gaap_CommonClassAMember_49a32a67-5467-4bc0-b88e-c30d4cb63213" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CommonClassBMember_70c9a2b1-4be9-491c-824e-2e4e7b3098a8" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_CommonClassBMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockDomain_ef526b62-4f27-44ba-9652-d2a1548c1a57" xlink:to="loc_us-gaap_CommonClassBMember_70c9a2b1-4be9-491c-824e-2e4e7b3098a8" xlink:type="arc" order="6"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CommonClassCMember_9360ca41-63c5-4a85-a19c-148e8084c88f" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_CommonClassCMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockDomain_ef526b62-4f27-44ba-9652-d2a1548c1a57" xlink:to="loc_us-gaap_CommonClassCMember_9360ca41-63c5-4a85-a19c-148e8084c88f" xlink:type="arc" order="7"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleAmortizedCostExcludingAccruedInterestBeforeAllowanceForCreditLoss_72171147-355d-43f1-8571-b22b2d9a90e3" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtSecuritiesAvailableForSaleAmortizedCostExcludingAccruedInterestBeforeAllowanceForCreditLoss"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_ac413d5c-6c24-4d21-8ddb-48a09c158501" xlink:to="loc_us-gaap_DebtSecuritiesAvailableForSaleAmortizedCostExcludingAccruedInterestBeforeAllowanceForCreditLoss_72171147-355d-43f1-8571-b22b2d9a90e3" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InterestReceivable_97895541-7632-4c23-acbf-88a951c9303f" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_InterestReceivable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_ac413d5c-6c24-4d21-8ddb-48a09c158501" xlink:to="loc_us-gaap_InterestReceivable_97895541-7632-4c23-acbf-88a951c9303f" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InterestPayableCurrentAndNoncurrent_0d084586-09e4-47cf-9722-9dc9bbcd783b" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_InterestPayableCurrentAndNoncurrent"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_ac413d5c-6c24-4d21-8ddb-48a09c158501" xlink:to="loc_us-gaap_InterestPayableCurrentAndNoncurrent_0d084586-09e4-47cf-9722-9dc9bbcd783b" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PreferredStockParOrStatedValuePerShare_eec25e04-7841-44cf-9b66-d422dec749e8" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PreferredStockParOrStatedValuePerShare"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_ac413d5c-6c24-4d21-8ddb-48a09c158501" xlink:to="loc_us-gaap_PreferredStockParOrStatedValuePerShare_eec25e04-7841-44cf-9b66-d422dec749e8" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PreferredStockSharesAuthorized_1465953d-ea7b-4a52-b3ff-cea397df271a" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PreferredStockSharesAuthorized"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_ac413d5c-6c24-4d21-8ddb-48a09c158501" xlink:to="loc_us-gaap_PreferredStockSharesAuthorized_1465953d-ea7b-4a52-b3ff-cea397df271a" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PreferredStockSharesIssued_f77113a3-6e6a-46e9-9610-c3dfc2dace5a" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PreferredStockSharesIssued"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_ac413d5c-6c24-4d21-8ddb-48a09c158501" xlink:to="loc_us-gaap_PreferredStockSharesIssued_f77113a3-6e6a-46e9-9610-c3dfc2dace5a" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PreferredStockSharesOutstanding_b82207b1-1b1a-449f-a188-0412dd8b5098" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PreferredStockSharesOutstanding"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_ac413d5c-6c24-4d21-8ddb-48a09c158501" xlink:to="loc_us-gaap_PreferredStockSharesOutstanding_b82207b1-1b1a-449f-a188-0412dd8b5098" xlink:type="arc" order="6"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CommonStockParOrStatedValuePerShare_b05631fb-fbcf-4980-88b2-285f52bac9be" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_CommonStockParOrStatedValuePerShare"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_ac413d5c-6c24-4d21-8ddb-48a09c158501" xlink:to="loc_us-gaap_CommonStockParOrStatedValuePerShare_b05631fb-fbcf-4980-88b2-285f52bac9be" xlink:type="arc" order="7"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CommonStockSharesOutstanding_50158559-3de2-40f5-9c9a-3fd6af910006" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_CommonStockSharesOutstanding"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_ac413d5c-6c24-4d21-8ddb-48a09c158501" xlink:to="loc_us-gaap_CommonStockSharesOutstanding_50158559-3de2-40f5-9c9a-3fd6af910006" xlink:type="arc" order="8"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.farmermac.com/role/CONSOLIDATEDSTATEMENTSOFEQUITYunaudited" xlink:type="simple" xlink:href="agm-20240331.xsd#CONSOLIDATEDSTATEMENTSOFEQUITYunaudited"/>
  <link:definitionLink xlink:role="http://www.farmermac.com/role/CONSOLIDATEDSTATEMENTSOFEQUITYunaudited" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StatementLineItems_2b642128-0090-495a-aa5d-67e14d4cd1df" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_StatementLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StatementTable_d5afda46-59b4-4cd4-803e-bcd4d2859240" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_StatementTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_StatementLineItems_2b642128-0090-495a-aa5d-67e14d4cd1df" xlink:to="loc_us-gaap_StatementTable_d5afda46-59b4-4cd4-803e-bcd4d2859240" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StatementEquityComponentsAxis_56fa1966-2247-4c76-8a1d-ddc658656d61" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_StatementEquityComponentsAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_StatementTable_d5afda46-59b4-4cd4-803e-bcd4d2859240" xlink:to="loc_us-gaap_StatementEquityComponentsAxis_56fa1966-2247-4c76-8a1d-ddc658656d61" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EquityComponentDomain_56fa1966-2247-4c76-8a1d-ddc658656d61_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_EquityComponentDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementEquityComponentsAxis_56fa1966-2247-4c76-8a1d-ddc658656d61" xlink:to="loc_us-gaap_EquityComponentDomain_56fa1966-2247-4c76-8a1d-ddc658656d61_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EquityComponentDomain_8910070c-f3b0-4d81-9baf-f248d1499361" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_EquityComponentDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementEquityComponentsAxis_56fa1966-2247-4c76-8a1d-ddc658656d61" xlink:to="loc_us-gaap_EquityComponentDomain_8910070c-f3b0-4d81-9baf-f248d1499361" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PreferredStockMember_492e1b5c-0ef0-4995-861e-c3300ae1381b" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PreferredStockMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EquityComponentDomain_8910070c-f3b0-4d81-9baf-f248d1499361" xlink:to="loc_us-gaap_PreferredStockMember_492e1b5c-0ef0-4995-861e-c3300ae1381b" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CommonStockMember_b03ddd03-bda8-4288-bc10-6fabd8bbf424" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_CommonStockMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EquityComponentDomain_8910070c-f3b0-4d81-9baf-f248d1499361" xlink:to="loc_us-gaap_CommonStockMember_b03ddd03-bda8-4288-bc10-6fabd8bbf424" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AdditionalPaidInCapitalMember_85a75ac5-1574-4591-932d-20f9b428c27e" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AdditionalPaidInCapitalMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EquityComponentDomain_8910070c-f3b0-4d81-9baf-f248d1499361" xlink:to="loc_us-gaap_AdditionalPaidInCapitalMember_85a75ac5-1574-4591-932d-20f9b428c27e" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccumulatedOtherComprehensiveIncomeMember_9b602466-c9a4-40e4-970d-87331d39464f" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AccumulatedOtherComprehensiveIncomeMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EquityComponentDomain_8910070c-f3b0-4d81-9baf-f248d1499361" xlink:to="loc_us-gaap_AccumulatedOtherComprehensiveIncomeMember_9b602466-c9a4-40e4-970d-87331d39464f" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RetainedEarningsMember_26605209-f587-48e4-ba37-e478e28796be" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_RetainedEarningsMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EquityComponentDomain_8910070c-f3b0-4d81-9baf-f248d1499361" xlink:to="loc_us-gaap_RetainedEarningsMember_26605209-f587-48e4-ba37-e478e28796be" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_b8a5de3c-91e4-4666-ba20-2ae443c02522" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_IncreaseDecreaseInStockholdersEquityRollForward"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_2b642128-0090-495a-aa5d-67e14d4cd1df" xlink:to="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_b8a5de3c-91e4-4666-ba20-2ae443c02522" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SharesOutstanding_64b6593d-ff85-4d2c-834d-7bce746e7bef" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SharesOutstanding"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_b8a5de3c-91e4-4666-ba20-2ae443c02522" xlink:to="loc_us-gaap_SharesOutstanding_64b6593d-ff85-4d2c-834d-7bce746e7bef" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StockholdersEquity_e774a7d2-b6c0-453c-a7ce-76bedd9e34a9" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_StockholdersEquity"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_b8a5de3c-91e4-4666-ba20-2ae443c02522" xlink:to="loc_us-gaap_StockholdersEquity_e774a7d2-b6c0-453c-a7ce-76bedd9e34a9" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetIncomeLoss_50595d38-bcac-43cc-bca4-1de73dacae9e" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_NetIncomeLoss"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_b8a5de3c-91e4-4666-ba20-2ae443c02522" xlink:to="loc_us-gaap_NetIncomeLoss_50595d38-bcac-43cc-bca4-1de73dacae9e" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTax_be6b8769-d1af-4b93-a224-08018541dd3f" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherComprehensiveIncomeLossNetOfTax"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_b8a5de3c-91e4-4666-ba20-2ae443c02522" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTax_be6b8769-d1af-4b93-a224-08018541dd3f" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DividendsPreferredStockCash_68af3013-d67d-443f-97a3-335e4d057457" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DividendsPreferredStockCash"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_b8a5de3c-91e4-4666-ba20-2ae443c02522" xlink:to="loc_us-gaap_DividendsPreferredStockCash_68af3013-d67d-443f-97a3-335e4d057457" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DividendsCommonStockCash_67b25c04-8307-49fd-a4d3-b537cdbd9632" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DividendsCommonStockCash"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_b8a5de3c-91e4-4666-ba20-2ae443c02522" xlink:to="loc_us-gaap_DividendsCommonStockCash_67b25c04-8307-49fd-a4d3-b537cdbd9632" xlink:type="arc" order="6"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StockIssuedDuringPeriodSharesNewIssues_e63fbfc2-70b9-4064-ab8d-12d2d68353b0" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_StockIssuedDuringPeriodSharesNewIssues"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_b8a5de3c-91e4-4666-ba20-2ae443c02522" xlink:to="loc_us-gaap_StockIssuedDuringPeriodSharesNewIssues_e63fbfc2-70b9-4064-ab8d-12d2d68353b0" xlink:type="arc" order="7"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StockIssuedDuringPeriodValueNewIssues_a2a878e6-78db-4be0-8288-9cdafe060014" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_StockIssuedDuringPeriodValueNewIssues"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_b8a5de3c-91e4-4666-ba20-2ae443c02522" xlink:to="loc_us-gaap_StockIssuedDuringPeriodValueNewIssues_a2a878e6-78db-4be0-8288-9cdafe060014" xlink:type="arc" order="8"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AdjustmentsToAdditionalPaidInCapitalSharebasedCompensationRequisiteServicePeriodRecognitionValue_fb598bba-301e-4ce5-b620-00c36c64df9e" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AdjustmentsToAdditionalPaidInCapitalSharebasedCompensationRequisiteServicePeriodRecognitionValue"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_b8a5de3c-91e4-4666-ba20-2ae443c02522" xlink:to="loc_us-gaap_AdjustmentsToAdditionalPaidInCapitalSharebasedCompensationRequisiteServicePeriodRecognitionValue_fb598bba-301e-4ce5-b620-00c36c64df9e" xlink:type="arc" order="9"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AdjustmentsToAdditionalPaidInCapitalSharebasedCompensationOtherLongtermIncentivePlansRequisiteServicePeriodRecognition_793de318-838d-4e6d-8108-3eb568d63b0e" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AdjustmentsToAdditionalPaidInCapitalSharebasedCompensationOtherLongtermIncentivePlansRequisiteServicePeriodRecognition"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_b8a5de3c-91e4-4666-ba20-2ae443c02522" xlink:to="loc_us-gaap_AdjustmentsToAdditionalPaidInCapitalSharebasedCompensationOtherLongtermIncentivePlansRequisiteServicePeriodRecognition_793de318-838d-4e6d-8108-3eb568d63b0e" xlink:type="arc" order="10"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SharesOutstanding_e348ab58-67a4-41cb-9c25-86675ad903f3" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SharesOutstanding"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StockholdersEquity_9b1186ff-4e7b-4729-9888-9cd75d386841" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_StockholdersEquity"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.farmermac.com/role/CONSOLIDATEDSTATEMENTSOFCASHFLOWSunaudited" xlink:type="simple" xlink:href="agm-20240331.xsd#CONSOLIDATEDSTATEMENTSOFCASHFLOWSunaudited"/>
  <link:definitionLink xlink:role="http://www.farmermac.com/role/CONSOLIDATEDSTATEMENTSOFCASHFLOWSunaudited" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StatementLineItems_b8798eb1-036a-4efe-9bdf-6b10da6fffb9" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_StatementLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StatementTable_225f54d7-bb59-47c8-aea5-a19751eaa079" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_StatementTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_StatementLineItems_b8798eb1-036a-4efe-9bdf-6b10da6fffb9" xlink:to="loc_us-gaap_StatementTable_225f54d7-bb59-47c8-aea5-a19751eaa079" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinancialInstrumentAxis_c80b97ae-15ed-4b00-9cf5-8fbee10805f9" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FinancialInstrumentAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_StatementTable_225f54d7-bb59-47c8-aea5-a19751eaa079" xlink:to="loc_us-gaap_FinancialInstrumentAxis_c80b97ae-15ed-4b00-9cf5-8fbee10805f9" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_c80b97ae-15ed-4b00-9cf5-8fbee10805f9_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_FinancialInstrumentAxis_c80b97ae-15ed-4b00-9cf5-8fbee10805f9" xlink:to="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_c80b97ae-15ed-4b00-9cf5-8fbee10805f9_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_f333d01b-8728-4f0e-a2c2-7429db3412df" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_FinancialInstrumentAxis_c80b97ae-15ed-4b00-9cf5-8fbee10805f9" xlink:to="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_f333d01b-8728-4f0e-a2c2-7429db3412df" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesMember_3aa899c8-693d-4791-9662-ed651a9eaff5" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtSecuritiesMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_f333d01b-8728-4f0e-a2c2-7429db3412df" xlink:to="loc_us-gaap_DebtSecuritiesMember_3aa899c8-693d-4791-9662-ed651a9eaff5" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_FarmerMacAndUsdaGuaranteedSecuritiesMember_0606a378-16a4-4c63-8725-c10156c53629" xlink:href="agm-20240331.xsd#agm_FarmerMacAndUsdaGuaranteedSecuritiesMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_f333d01b-8728-4f0e-a2c2-7429db3412df" xlink:to="loc_agm_FarmerMacAndUsdaGuaranteedSecuritiesMember_0606a378-16a4-4c63-8725-c10156c53629" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetCashProvidedByUsedInOperatingActivitiesAbstract_2447d34d-5c2c-428c-8cd1-39fa9e51bde0" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_NetCashProvidedByUsedInOperatingActivitiesAbstract"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_b8798eb1-036a-4efe-9bdf-6b10da6fffb9" xlink:to="loc_us-gaap_NetCashProvidedByUsedInOperatingActivitiesAbstract_2447d34d-5c2c-428c-8cd1-39fa9e51bde0" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProfitLoss_dbca77d0-22d1-4c7f-ab9d-dc4b2441532c" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ProfitLoss"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivitiesAbstract_2447d34d-5c2c-428c-8cd1-39fa9e51bde0" xlink:to="loc_us-gaap_ProfitLoss_dbca77d0-22d1-4c7f-ab9d-dc4b2441532c" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AdjustmentsToReconcileNetIncomeLossToCashProvidedByUsedInOperatingActivitiesAbstract_e7602a15-537e-48dd-b745-3194e9a64ab2" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AdjustmentsToReconcileNetIncomeLossToCashProvidedByUsedInOperatingActivitiesAbstract"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivitiesAbstract_2447d34d-5c2c-428c-8cd1-39fa9e51bde0" xlink:to="loc_us-gaap_AdjustmentsToReconcileNetIncomeLossToCashProvidedByUsedInOperatingActivitiesAbstract_e7602a15-537e-48dd-b745-3194e9a64ab2" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccretionAmortizationOfDiscountsAndPremiumsInvestments_e9a15a13-5704-4297-8d51-0cbe9e9e4607" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AccretionAmortizationOfDiscountsAndPremiumsInvestments"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AdjustmentsToReconcileNetIncomeLossToCashProvidedByUsedInOperatingActivitiesAbstract_e7602a15-537e-48dd-b745-3194e9a64ab2" xlink:to="loc_us-gaap_AccretionAmortizationOfDiscountsAndPremiumsInvestments_e9a15a13-5704-4297-8d51-0cbe9e9e4607" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AmortizationOfFinancingCostsAndDiscounts_6adbfc0c-1685-4b88-8384-a336b762ad63" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AmortizationOfFinancingCostsAndDiscounts"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AdjustmentsToReconcileNetIncomeLossToCashProvidedByUsedInOperatingActivitiesAbstract_e7602a15-537e-48dd-b745-3194e9a64ab2" xlink:to="loc_us-gaap_AmortizationOfFinancingCostsAndDiscounts_6adbfc0c-1685-4b88-8384-a336b762ad63" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_NetChangeInFairValueTradingSecuritiesHedgedAssetsFinancialDerivativesAndLoansHeldForSale_d9d4a0ce-cba0-45c2-bd02-ba00c3339391" xlink:href="agm-20240331.xsd#agm_NetChangeInFairValueTradingSecuritiesHedgedAssetsFinancialDerivativesAndLoansHeldForSale"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AdjustmentsToReconcileNetIncomeLossToCashProvidedByUsedInOperatingActivitiesAbstract_e7602a15-537e-48dd-b745-3194e9a64ab2" xlink:to="loc_agm_NetChangeInFairValueTradingSecuritiesHedgedAssetsFinancialDerivativesAndLoansHeldForSale_d9d4a0ce-cba0-45c2-bd02-ba00c3339391" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProvisionForLoanLeaseAndOtherLosses_34fd84cd-2532-4cdd-810f-7ad98fcb12c1" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ProvisionForLoanLeaseAndOtherLosses"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AdjustmentsToReconcileNetIncomeLossToCashProvidedByUsedInOperatingActivitiesAbstract_e7602a15-537e-48dd-b745-3194e9a64ab2" xlink:to="loc_us-gaap_ProvisionForLoanLeaseAndOtherLosses_34fd84cd-2532-4cdd-810f-7ad98fcb12c1" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_ExcessTaxBenefitsFromShareBasedCompensation_f3d9bafe-f4cf-46b0-9c7b-6f4f52a0f016" xlink:href="agm-20240331.xsd#agm_ExcessTaxBenefitsFromShareBasedCompensation"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AdjustmentsToReconcileNetIncomeLossToCashProvidedByUsedInOperatingActivitiesAbstract_e7602a15-537e-48dd-b745-3194e9a64ab2" xlink:to="loc_agm_ExcessTaxBenefitsFromShareBasedCompensation_f3d9bafe-f4cf-46b0-9c7b-6f4f52a0f016" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredIncomeTaxExpenseBenefit_0256bd94-99ed-4e68-a8f3-6f6ae2c6107e" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DeferredIncomeTaxExpenseBenefit"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AdjustmentsToReconcileNetIncomeLossToCashProvidedByUsedInOperatingActivitiesAbstract_e7602a15-537e-48dd-b745-3194e9a64ab2" xlink:to="loc_us-gaap_DeferredIncomeTaxExpenseBenefit_0256bd94-99ed-4e68-a8f3-6f6ae2c6107e" xlink:type="arc" order="6"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensation_d54693b0-15a7-4d34-809d-20d977fb877b" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ShareBasedCompensation"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AdjustmentsToReconcileNetIncomeLossToCashProvidedByUsedInOperatingActivitiesAbstract_e7602a15-537e-48dd-b745-3194e9a64ab2" xlink:to="loc_us-gaap_ShareBasedCompensation_d54693b0-15a7-4d34-809d-20d977fb877b" xlink:type="arc" order="7"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProceedsFromCollectionOfLoansHeldForSale_351aafb3-30a6-4d68-9081-4a724f198e22" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ProceedsFromCollectionOfLoansHeldForSale"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AdjustmentsToReconcileNetIncomeLossToCashProvidedByUsedInOperatingActivitiesAbstract_e7602a15-537e-48dd-b745-3194e9a64ab2" xlink:to="loc_us-gaap_ProceedsFromCollectionOfLoansHeldForSale_351aafb3-30a6-4d68-9081-4a724f198e22" xlink:type="arc" order="8"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInOperatingCapitalAbstract_66369fe5-1f1b-49ad-a640-90ba6cf6b9af" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_IncreaseDecreaseInOperatingCapitalAbstract"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivitiesAbstract_2447d34d-5c2c-428c-8cd1-39fa9e51bde0" xlink:to="loc_us-gaap_IncreaseDecreaseInOperatingCapitalAbstract_66369fe5-1f1b-49ad-a640-90ba6cf6b9af" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInAccruedInterestReceivableNet_2d5f08ee-d3d3-4440-b4d7-f6b48b01516a" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_IncreaseDecreaseInAccruedInterestReceivableNet"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInOperatingCapitalAbstract_66369fe5-1f1b-49ad-a640-90ba6cf6b9af" xlink:to="loc_us-gaap_IncreaseDecreaseInAccruedInterestReceivableNet_2d5f08ee-d3d3-4440-b4d7-f6b48b01516a" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInOtherReceivables_a61d2791-446b-46d0-88bc-cc882299f76d" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_IncreaseDecreaseInOtherReceivables"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInOperatingCapitalAbstract_66369fe5-1f1b-49ad-a640-90ba6cf6b9af" xlink:to="loc_us-gaap_IncreaseDecreaseInOtherReceivables_a61d2791-446b-46d0-88bc-cc882299f76d" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInOtherOperatingAssets_a68b8f5d-59bd-4825-9658-e3ecdb376332" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_IncreaseDecreaseInOtherOperatingAssets"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInOperatingCapitalAbstract_66369fe5-1f1b-49ad-a640-90ba6cf6b9af" xlink:to="loc_us-gaap_IncreaseDecreaseInOtherOperatingAssets_a68b8f5d-59bd-4825-9658-e3ecdb376332" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInAccruedLiabilities_8142985b-7293-4a0e-8b93-ff4eb9d5a710" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_IncreaseDecreaseInAccruedLiabilities"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInOperatingCapitalAbstract_66369fe5-1f1b-49ad-a640-90ba6cf6b9af" xlink:to="loc_us-gaap_IncreaseDecreaseInAccruedLiabilities_8142985b-7293-4a0e-8b93-ff4eb9d5a710" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInContractWithCustomerLiability_25b256c6-30cf-4da9-94e1-9a550b8656cd" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_IncreaseDecreaseInContractWithCustomerLiability"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInOperatingCapitalAbstract_66369fe5-1f1b-49ad-a640-90ba6cf6b9af" xlink:to="loc_us-gaap_IncreaseDecreaseInContractWithCustomerLiability_25b256c6-30cf-4da9-94e1-9a550b8656cd" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInOtherOperatingLiabilities_e4fca01d-ea3e-4c86-9ab8-93ac5d6bb3b9" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_IncreaseDecreaseInOtherOperatingLiabilities"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInOperatingCapitalAbstract_66369fe5-1f1b-49ad-a640-90ba6cf6b9af" xlink:to="loc_us-gaap_IncreaseDecreaseInOtherOperatingLiabilities_e4fca01d-ea3e-4c86-9ab8-93ac5d6bb3b9" xlink:type="arc" order="6"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_427ed5ee-0aec-49ad-850c-f72291690d0e" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_NetCashProvidedByUsedInOperatingActivities"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivitiesAbstract_2447d34d-5c2c-428c-8cd1-39fa9e51bde0" xlink:to="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_427ed5ee-0aec-49ad-850c-f72291690d0e" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetCashProvidedByUsedInInvestingActivitiesAbstract_946c9e2c-3a47-458f-8a90-a0bdb368e4bc" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_NetCashProvidedByUsedInInvestingActivitiesAbstract"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_b8798eb1-036a-4efe-9bdf-6b10da6fffb9" xlink:to="loc_us-gaap_NetCashProvidedByUsedInInvestingActivitiesAbstract_946c9e2c-3a47-458f-8a90-a0bdb368e4bc" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PaymentsToAcquireProductiveAssets_590cddbb-530c-4b0b-b740-f4baa74d1f69" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PaymentsToAcquireProductiveAssets"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_NetCashProvidedByUsedInInvestingActivitiesAbstract_946c9e2c-3a47-458f-8a90-a0bdb368e4bc" xlink:to="loc_us-gaap_PaymentsToAcquireProductiveAssets_590cddbb-530c-4b0b-b740-f4baa74d1f69" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_PaymentsToAcquireDebtSecuritiesAvailableForSaleAndHeldToMaturity_97f23b16-a838-4039-ba44-e2c850cb7a79" xlink:href="agm-20240331.xsd#agm_PaymentsToAcquireDebtSecuritiesAvailableForSaleAndHeldToMaturity"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_NetCashProvidedByUsedInInvestingActivitiesAbstract_946c9e2c-3a47-458f-8a90-a0bdb368e4bc" xlink:to="loc_agm_PaymentsToAcquireDebtSecuritiesAvailableForSaleAndHeldToMaturity_97f23b16-a838-4039-ba44-e2c850cb7a79" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PaymentsToAcquireOtherInvestments_e0ae4d2a-85c0-4d2c-9eb7-8d9769081c8e" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PaymentsToAcquireOtherInvestments"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_NetCashProvidedByUsedInInvestingActivitiesAbstract_946c9e2c-3a47-458f-8a90-a0bdb368e4bc" xlink:to="loc_us-gaap_PaymentsToAcquireOtherInvestments_e0ae4d2a-85c0-4d2c-9eb7-8d9769081c8e" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PaymentsToAcquireAvailableForSaleSecuritiesDebt_2bbc76b1-1243-4a6a-9169-eac8d7462987" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PaymentsToAcquireAvailableForSaleSecuritiesDebt"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_NetCashProvidedByUsedInInvestingActivitiesAbstract_946c9e2c-3a47-458f-8a90-a0bdb368e4bc" xlink:to="loc_us-gaap_PaymentsToAcquireAvailableForSaleSecuritiesDebt_2bbc76b1-1243-4a6a-9169-eac8d7462987" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PaymentsToAcquireLoansHeldForInvestment_a3dcba80-8d99-422f-b85a-de14c6a2ac8f" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PaymentsToAcquireLoansHeldForInvestment"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_NetCashProvidedByUsedInInvestingActivitiesAbstract_946c9e2c-3a47-458f-8a90-a0bdb368e4bc" xlink:to="loc_us-gaap_PaymentsToAcquireLoansHeldForInvestment_a3dcba80-8d99-422f-b85a-de14c6a2ac8f" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_ProceedsFromMaturitiesPrepaymentsAndCallsOfDebtSecuritiesAvailableForSaleAndHeldToMaturity_71aa59ab-1e80-4bab-b0ac-11385f1b433f" xlink:href="agm-20240331.xsd#agm_ProceedsFromMaturitiesPrepaymentsAndCallsOfDebtSecuritiesAvailableForSaleAndHeldToMaturity"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_NetCashProvidedByUsedInInvestingActivitiesAbstract_946c9e2c-3a47-458f-8a90-a0bdb368e4bc" xlink:to="loc_agm_ProceedsFromMaturitiesPrepaymentsAndCallsOfDebtSecuritiesAvailableForSaleAndHeldToMaturity_71aa59ab-1e80-4bab-b0ac-11385f1b433f" xlink:type="arc" order="6"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProceedsFromMaturitiesPrepaymentsAndCallsOfAvailableForSaleSecurities_25aef7f3-f723-4acb-bd86-5bea1d71b793" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ProceedsFromMaturitiesPrepaymentsAndCallsOfAvailableForSaleSecurities"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_NetCashProvidedByUsedInInvestingActivitiesAbstract_946c9e2c-3a47-458f-8a90-a0bdb368e4bc" xlink:to="loc_us-gaap_ProceedsFromMaturitiesPrepaymentsAndCallsOfAvailableForSaleSecurities_25aef7f3-f723-4acb-bd86-5bea1d71b793" xlink:type="arc" order="7"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProceedsFromPrincipalRepaymentsOnLoansAndLeasesHeldForInvestment_b23dce6d-207a-4144-88a5-cfd4ba55be87" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ProceedsFromPrincipalRepaymentsOnLoansAndLeasesHeldForInvestment"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_NetCashProvidedByUsedInInvestingActivitiesAbstract_946c9e2c-3a47-458f-8a90-a0bdb368e4bc" xlink:to="loc_us-gaap_ProceedsFromPrincipalRepaymentsOnLoansAndLeasesHeldForInvestment_b23dce6d-207a-4144-88a5-cfd4ba55be87" xlink:type="arc" order="8"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_0d6ec6b5-40fd-4522-b8ee-c966e6e872d7" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_NetCashProvidedByUsedInInvestingActivities"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_NetCashProvidedByUsedInInvestingActivitiesAbstract_946c9e2c-3a47-458f-8a90-a0bdb368e4bc" xlink:to="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_0d6ec6b5-40fd-4522-b8ee-c966e6e872d7" xlink:type="arc" order="9"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetCashProvidedByUsedInFinancingActivitiesAbstract_babe481c-daf8-4e44-8e83-4ace5f1e501a" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_NetCashProvidedByUsedInFinancingActivitiesAbstract"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_b8798eb1-036a-4efe-9bdf-6b10da6fffb9" xlink:to="loc_us-gaap_NetCashProvidedByUsedInFinancingActivitiesAbstract_babe481c-daf8-4e44-8e83-4ace5f1e501a" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProceedsFromShortTermDebt_43b362cc-a255-46e5-a1ab-c63afff8cf2b" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ProceedsFromShortTermDebt"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivitiesAbstract_babe481c-daf8-4e44-8e83-4ace5f1e501a" xlink:to="loc_us-gaap_ProceedsFromShortTermDebt_43b362cc-a255-46e5-a1ab-c63afff8cf2b" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProceedsFromIssuanceOfMediumTermNotes_f5e41c7d-667a-45a8-becd-b6402351e8bd" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ProceedsFromIssuanceOfMediumTermNotes"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivitiesAbstract_babe481c-daf8-4e44-8e83-4ace5f1e501a" xlink:to="loc_us-gaap_ProceedsFromIssuanceOfMediumTermNotes_f5e41c7d-667a-45a8-becd-b6402351e8bd" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProceedsFromIssuanceOfTrustPreferredSecurities_16444e16-0f57-41c4-847f-4841eb9d05c5" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ProceedsFromIssuanceOfTrustPreferredSecurities"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivitiesAbstract_babe481c-daf8-4e44-8e83-4ace5f1e501a" xlink:to="loc_us-gaap_ProceedsFromIssuanceOfTrustPreferredSecurities_16444e16-0f57-41c4-847f-4841eb9d05c5" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RepaymentsOfShortTermDebt_ab47e3b3-6c71-464c-93fb-4fc18b26d412" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_RepaymentsOfShortTermDebt"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivitiesAbstract_babe481c-daf8-4e44-8e83-4ace5f1e501a" xlink:to="loc_us-gaap_RepaymentsOfShortTermDebt_ab47e3b3-6c71-464c-93fb-4fc18b26d412" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RepaymentsOfLongTermDebt_1b6928be-064a-444b-b22e-e94400391eb5" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_RepaymentsOfLongTermDebt"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivitiesAbstract_babe481c-daf8-4e44-8e83-4ace5f1e501a" xlink:to="loc_us-gaap_RepaymentsOfLongTermDebt_1b6928be-064a-444b-b22e-e94400391eb5" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_PaymentsToThirdPartiesOnDebtSecuritiesOfConsolidatedTrusts_51649e2c-0a76-4f51-a82e-e263b43a9f1f" xlink:href="agm-20240331.xsd#agm_PaymentsToThirdPartiesOnDebtSecuritiesOfConsolidatedTrusts"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivitiesAbstract_babe481c-daf8-4e44-8e83-4ace5f1e501a" xlink:to="loc_agm_PaymentsToThirdPartiesOnDebtSecuritiesOfConsolidatedTrusts_51649e2c-0a76-4f51-a82e-e263b43a9f1f" xlink:type="arc" order="6"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProceedsFromIssuanceOfCommonStock_77bbeffd-1797-4320-b06d-b2ba2a9ce9a9" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ProceedsFromIssuanceOfCommonStock"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivitiesAbstract_babe481c-daf8-4e44-8e83-4ace5f1e501a" xlink:to="loc_us-gaap_ProceedsFromIssuanceOfCommonStock_77bbeffd-1797-4320-b06d-b2ba2a9ce9a9" xlink:type="arc" order="7"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PaymentsRelatedToTaxWithholdingForShareBasedCompensation_ee863c59-ffcf-4118-ac04-32d5ddef0389" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PaymentsRelatedToTaxWithholdingForShareBasedCompensation"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivitiesAbstract_babe481c-daf8-4e44-8e83-4ace5f1e501a" xlink:to="loc_us-gaap_PaymentsRelatedToTaxWithholdingForShareBasedCompensation_ee863c59-ffcf-4118-ac04-32d5ddef0389" xlink:type="arc" order="8"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AdjustmentsRelatedToTaxWithholdingForShareBasedCompensation_2d0f87e4-c72b-4922-9741-a261f33d51eb" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AdjustmentsRelatedToTaxWithholdingForShareBasedCompensation"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivitiesAbstract_babe481c-daf8-4e44-8e83-4ace5f1e501a" xlink:to="loc_us-gaap_AdjustmentsRelatedToTaxWithholdingForShareBasedCompensation_2d0f87e4-c72b-4922-9741-a261f33d51eb" xlink:type="arc" order="9"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PaymentsOfOrdinaryDividends_15faeb00-3df2-45e4-b10f-49ca774a953f" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PaymentsOfOrdinaryDividends"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivitiesAbstract_babe481c-daf8-4e44-8e83-4ace5f1e501a" xlink:to="loc_us-gaap_PaymentsOfOrdinaryDividends_15faeb00-3df2-45e4-b10f-49ca774a953f" xlink:type="arc" order="10"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_438d9364-ec2a-4eab-9def-5598618f2265" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_NetCashProvidedByUsedInFinancingActivities"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivitiesAbstract_babe481c-daf8-4e44-8e83-4ace5f1e501a" xlink:to="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_438d9364-ec2a-4eab-9def-5598618f2265" xlink:type="arc" order="11"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffect_a2d64225-cb8f-405b-8f58-fd60b3cdf328" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffect"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_b8798eb1-036a-4efe-9bdf-6b10da6fffb9" xlink:to="loc_us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffect_a2d64225-cb8f-405b-8f58-fd60b3cdf328" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalents_59acc16d-ae70-40f6-b24b-29755cf7aa63" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalents"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_b8798eb1-036a-4efe-9bdf-6b10da6fffb9" xlink:to="loc_us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalents_59acc16d-ae70-40f6-b24b-29755cf7aa63" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalents_06dede86-818e-4c7f-aa01-29f26152aec9" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalents"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NoncashInvestingAndFinancingItemsAbstract_a9ea0c98-97ec-4f0f-9459-baf7f2a4646d" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_NoncashInvestingAndFinancingItemsAbstract"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_b8798eb1-036a-4efe-9bdf-6b10da6fffb9" xlink:to="loc_us-gaap_NoncashInvestingAndFinancingItemsAbstract_a9ea0c98-97ec-4f0f-9459-baf7f2a4646d" xlink:type="arc" order="6"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_NoncashOrPartNoncashAcquisitionLoansAcquiredAndSecuritized_702b41bb-ff5a-4eb2-a519-8c49c6783f7c" xlink:href="agm-20240331.xsd#agm_NoncashOrPartNoncashAcquisitionLoansAcquiredAndSecuritized"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_NoncashInvestingAndFinancingItemsAbstract_a9ea0c98-97ec-4f0f-9459-baf7f2a4646d" xlink:to="loc_agm_NoncashOrPartNoncashAcquisitionLoansAcquiredAndSecuritized_702b41bb-ff5a-4eb2-a519-8c49c6783f7c" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_LoansHeldForInvestmentTransferredToConsolidatedTrusts_697cbf11-2b0a-497c-b4e9-8af92d58232c" xlink:href="agm-20240331.xsd#agm_LoansHeldForInvestmentTransferredToConsolidatedTrusts"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_NoncashInvestingAndFinancingItemsAbstract_a9ea0c98-97ec-4f0f-9459-baf7f2a4646d" xlink:to="loc_agm_LoansHeldForInvestmentTransferredToConsolidatedTrusts_697cbf11-2b0a-497c-b4e9-8af92d58232c" xlink:type="arc" order="2"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.farmermac.com/role/SUMMARYOFSIGNIFICANTACCOUNTINGPOLICIESConsolidationofVariableInterestEntitiesDetails" xlink:type="simple" xlink:href="agm-20240331.xsd#SUMMARYOFSIGNIFICANTACCOUNTINGPOLICIESConsolidationofVariableInterestEntitiesDetails"/>
  <link:definitionLink xlink:role="http://www.farmermac.com/role/SUMMARYOFSIGNIFICANTACCOUNTINGPOLICIESConsolidationofVariableInterestEntitiesDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_VariableInterestEntityLineItems_0ceb891c-2455-4a11-a8fb-37252235f40d" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_VariableInterestEntityLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ScheduleOfVariableInterestEntitiesTable_5426d1c7-e61a-4ddd-98bd-d56ac51d0920" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ScheduleOfVariableInterestEntitiesTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_VariableInterestEntityLineItems_0ceb891c-2455-4a11-a8fb-37252235f40d" xlink:to="loc_us-gaap_ScheduleOfVariableInterestEntitiesTable_5426d1c7-e61a-4ddd-98bd-d56ac51d0920" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_ConsolidatedEntitiesAxis_9b0fbf40-4c6a-47ac-84cb-98321d9e21f2" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_ConsolidatedEntitiesAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfVariableInterestEntitiesTable_5426d1c7-e61a-4ddd-98bd-d56ac51d0920" xlink:to="loc_srt_ConsolidatedEntitiesAxis_9b0fbf40-4c6a-47ac-84cb-98321d9e21f2" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_ConsolidatedEntitiesDomain_9b0fbf40-4c6a-47ac-84cb-98321d9e21f2_default" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_ConsolidatedEntitiesDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_srt_ConsolidatedEntitiesAxis_9b0fbf40-4c6a-47ac-84cb-98321d9e21f2" xlink:to="loc_srt_ConsolidatedEntitiesDomain_9b0fbf40-4c6a-47ac-84cb-98321d9e21f2_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_ConsolidatedEntitiesDomain_7682a3f8-7140-4cd0-9439-29c906dd51e6" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_ConsolidatedEntitiesDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_srt_ConsolidatedEntitiesAxis_9b0fbf40-4c6a-47ac-84cb-98321d9e21f2" xlink:to="loc_srt_ConsolidatedEntitiesDomain_7682a3f8-7140-4cd0-9439-29c906dd51e6" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_VariableInterestEntityPrimaryBeneficiaryMember_8169815c-f99b-479c-b1d9-5fe16d7a4edf" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_VariableInterestEntityPrimaryBeneficiaryMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_ConsolidatedEntitiesDomain_7682a3f8-7140-4cd0-9439-29c906dd51e6" xlink:to="loc_us-gaap_VariableInterestEntityPrimaryBeneficiaryMember_8169815c-f99b-479c-b1d9-5fe16d7a4edf" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_VariableInterestEntityNotPrimaryBeneficiaryMember_05cb518c-5f0c-47d8-89d4-45c8f283e350" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_VariableInterestEntityNotPrimaryBeneficiaryMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_ConsolidatedEntitiesDomain_7682a3f8-7140-4cd0-9439-29c906dd51e6" xlink:to="loc_us-gaap_VariableInterestEntityNotPrimaryBeneficiaryMember_05cb518c-5f0c-47d8-89d4-45c8f283e350" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_ConsolidationItemsAxis_173bd017-95db-41cb-ab2f-a4a1c754e594" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_ConsolidationItemsAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfVariableInterestEntitiesTable_5426d1c7-e61a-4ddd-98bd-d56ac51d0920" xlink:to="loc_srt_ConsolidationItemsAxis_173bd017-95db-41cb-ab2f-a4a1c754e594" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_ConsolidationItemsDomain_173bd017-95db-41cb-ab2f-a4a1c754e594_default" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_ConsolidationItemsDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_srt_ConsolidationItemsAxis_173bd017-95db-41cb-ab2f-a4a1c754e594" xlink:to="loc_srt_ConsolidationItemsDomain_173bd017-95db-41cb-ab2f-a4a1c754e594_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_ConsolidationItemsDomain_4c5df664-7593-45c7-b1b6-c25c50193a23" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_ConsolidationItemsDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_srt_ConsolidationItemsAxis_173bd017-95db-41cb-ab2f-a4a1c754e594" xlink:to="loc_srt_ConsolidationItemsDomain_4c5df664-7593-45c7-b1b6-c25c50193a23" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingSegmentsMember_4e4bbc6e-d688-4bb6-b861-3de1e23aacc9" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OperatingSegmentsMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_ConsolidationItemsDomain_4c5df664-7593-45c7-b1b6-c25c50193a23" xlink:to="loc_us-gaap_OperatingSegmentsMember_4e4bbc6e-d688-4bb6-b861-3de1e23aacc9" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CorporateNonSegmentMember_3ab76468-8211-4997-ba68-618f4c95f68e" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_CorporateNonSegmentMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_ConsolidationItemsDomain_4c5df664-7593-45c7-b1b6-c25c50193a23" xlink:to="loc_us-gaap_CorporateNonSegmentMember_3ab76468-8211-4997-ba68-618f4c95f68e" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BalanceSheetLocationAxis_29adc843-a0c5-43c5-bcf3-a7e832098b36" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_BalanceSheetLocationAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfVariableInterestEntitiesTable_5426d1c7-e61a-4ddd-98bd-d56ac51d0920" xlink:to="loc_us-gaap_BalanceSheetLocationAxis_29adc843-a0c5-43c5-bcf3-a7e832098b36" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BalanceSheetLocationDomain_29adc843-a0c5-43c5-bcf3-a7e832098b36_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_BalanceSheetLocationDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_BalanceSheetLocationAxis_29adc843-a0c5-43c5-bcf3-a7e832098b36" xlink:to="loc_us-gaap_BalanceSheetLocationDomain_29adc843-a0c5-43c5-bcf3-a7e832098b36_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BalanceSheetLocationDomain_8be5783c-6c56-4c98-a7d8-383e2efc9d1e" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_BalanceSheetLocationDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_BalanceSheetLocationAxis_29adc843-a0c5-43c5-bcf3-a7e832098b36" xlink:to="loc_us-gaap_BalanceSheetLocationDomain_8be5783c-6c56-4c98-a7d8-383e2efc9d1e" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_OnBalanceSheetMember_267a849f-7e3f-4227-bd52-7d6571e64390" xlink:href="agm-20240331.xsd#agm_OnBalanceSheetMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BalanceSheetLocationDomain_8be5783c-6c56-4c98-a7d8-383e2efc9d1e" xlink:to="loc_agm_OnBalanceSheetMember_267a849f-7e3f-4227-bd52-7d6571e64390" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_OffBalanceSheetMember_081a1658-e5fa-4497-a7fd-f2a6db9f0ea5" xlink:href="agm-20240331.xsd#agm_OffBalanceSheetMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BalanceSheetLocationDomain_8be5783c-6c56-4c98-a7d8-383e2efc9d1e" xlink:to="loc_agm_OffBalanceSheetMember_081a1658-e5fa-4497-a7fd-f2a6db9f0ea5" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StatementBusinessSegmentsAxis_22552071-7054-409c-893f-4aed3b6eb6a1" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_StatementBusinessSegmentsAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfVariableInterestEntitiesTable_5426d1c7-e61a-4ddd-98bd-d56ac51d0920" xlink:to="loc_us-gaap_StatementBusinessSegmentsAxis_22552071-7054-409c-893f-4aed3b6eb6a1" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SegmentDomain_22552071-7054-409c-893f-4aed3b6eb6a1_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SegmentDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementBusinessSegmentsAxis_22552071-7054-409c-893f-4aed3b6eb6a1" xlink:to="loc_us-gaap_SegmentDomain_22552071-7054-409c-893f-4aed3b6eb6a1_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SegmentDomain_1a761dd9-400a-412f-ab87-83dbcfe4c44f" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SegmentDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementBusinessSegmentsAxis_22552071-7054-409c-893f-4aed3b6eb6a1" xlink:to="loc_us-gaap_SegmentDomain_1a761dd9-400a-412f-ab87-83dbcfe4c44f" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_AgriculturalFinanceMember_23b2387d-16ee-40d0-922d-9b3ab058aed5" xlink:href="agm-20240331.xsd#agm_AgriculturalFinanceMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_1a761dd9-400a-412f-ab87-83dbcfe4c44f" xlink:to="loc_agm_AgriculturalFinanceMember_23b2387d-16ee-40d0-922d-9b3ab058aed5" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_TreasurySegmentMember_f180395a-07e3-44a2-adb7-79522bf18d5b" xlink:href="agm-20240331.xsd#agm_TreasurySegmentMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_1a761dd9-400a-412f-ab87-83dbcfe4c44f" xlink:to="loc_agm_TreasurySegmentMember_f180395a-07e3-44a2-adb7-79522bf18d5b" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinancialInstrumentAxis_47d37d38-0e8b-4e04-bc4f-6199e743e018" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FinancialInstrumentAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfVariableInterestEntitiesTable_5426d1c7-e61a-4ddd-98bd-d56ac51d0920" xlink:to="loc_us-gaap_FinancialInstrumentAxis_47d37d38-0e8b-4e04-bc4f-6199e743e018" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_47d37d38-0e8b-4e04-bc4f-6199e743e018_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_FinancialInstrumentAxis_47d37d38-0e8b-4e04-bc4f-6199e743e018" xlink:to="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_47d37d38-0e8b-4e04-bc4f-6199e743e018_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_1cdf2b1f-3421-4ade-b0db-ce2f47181d75" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_FinancialInstrumentAxis_47d37d38-0e8b-4e04-bc4f-6199e743e018" xlink:to="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_1cdf2b1f-3421-4ade-b0db-ce2f47181d75" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_MortgageBackedSecuritiesIssuedByUSGovernmentSponsoredEnterprisesMember_8da79a50-e6db-4107-8efb-a68c329d362f" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_MortgageBackedSecuritiesIssuedByUSGovernmentSponsoredEnterprisesMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_1cdf2b1f-3421-4ade-b0db-ce2f47181d75" xlink:to="loc_us-gaap_MortgageBackedSecuritiesIssuedByUSGovernmentSponsoredEnterprisesMember_8da79a50-e6db-4107-8efb-a68c329d362f" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesMember_9f5884e0-a4ea-4d02-bf26-7702f5843a54" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtSecuritiesMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_1cdf2b1f-3421-4ade-b0db-ce2f47181d75" xlink:to="loc_us-gaap_DebtSecuritiesMember_9f5884e0-a4ea-4d02-bf26-7702f5843a54" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinancingReceivableExcludingAccruedInterestBeforeAllowanceForCreditLoss_47a8f4c9-ef98-41d9-930e-e077b7c92446" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FinancingReceivableExcludingAccruedInterestBeforeAllowanceForCreditLoss"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_VariableInterestEntityLineItems_0ceb891c-2455-4a11-a8fb-37252235f40d" xlink:to="loc_us-gaap_FinancingReceivableExcludingAccruedInterestBeforeAllowanceForCreditLoss_47a8f4c9-ef98-41d9-930e-e077b7c92446" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongTermDebt_746f8126-2d00-4b8a-ae52-5ef3dcb1f39c" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LongTermDebt"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_VariableInterestEntityLineItems_0ceb891c-2455-4a11-a8fb-37252235f40d" xlink:to="loc_us-gaap_LongTermDebt_746f8126-2d00-4b8a-ae52-5ef3dcb1f39c" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleExcludingAccruedInterest_c34ed4b7-9bbc-49ec-81e6-41c4dc32a919" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtSecuritiesAvailableForSaleExcludingAccruedInterest"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_VariableInterestEntityLineItems_0ceb891c-2455-4a11-a8fb-37252235f40d" xlink:to="loc_us-gaap_DebtSecuritiesAvailableForSaleExcludingAccruedInterest_c34ed4b7-9bbc-49ec-81e6-41c4dc32a919" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_VariableInterestEntityEntityMaximumLossExposureAmount_ac10d423-25ab-4c30-97df-9a9994765d88" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_VariableInterestEntityEntityMaximumLossExposureAmount"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_VariableInterestEntityLineItems_0ceb891c-2455-4a11-a8fb-37252235f40d" xlink:to="loc_us-gaap_VariableInterestEntityEntityMaximumLossExposureAmount_ac10d423-25ab-4c30-97df-9a9994765d88" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherLiabilities_c47c78a7-8b3a-4557-9489-67166510f030" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherLiabilities"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_VariableInterestEntityLineItems_0ceb891c-2455-4a11-a8fb-37252235f40d" xlink:to="loc_us-gaap_OtherLiabilities_c47c78a7-8b3a-4557-9489-67166510f030" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtInstrumentUnamortizedDiscount_b9021bca-5ef2-4136-b55e-5465447df554" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtInstrumentUnamortizedDiscount"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_VariableInterestEntityLineItems_0ceb891c-2455-4a11-a8fb-37252235f40d" xlink:to="loc_us-gaap_DebtInstrumentUnamortizedDiscount_b9021bca-5ef2-4136-b55e-5465447df554" xlink:type="arc" order="5"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.farmermac.com/role/SUMMARYOFSIGNIFICANTACCOUNTINGPOLICIESEarningsPerCommonShareDetails" xlink:type="simple" xlink:href="agm-20240331.xsd#SUMMARYOFSIGNIFICANTACCOUNTINGPOLICIESEarningsPerCommonShareDetails"/>
  <link:definitionLink xlink:role="http://www.farmermac.com/role/SUMMARYOFSIGNIFICANTACCOUNTINGPOLICIESEarningsPerCommonShareDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareLineItems_20c64c5b-fb5b-4dd9-bd72-bd79c2c561da" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ScheduleOfAntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareTable_e53452e0-9d37-4b39-bb9c-b3977462e6ca" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ScheduleOfAntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareLineItems_20c64c5b-fb5b-4dd9-bd72-bd79c2c561da" xlink:to="loc_us-gaap_ScheduleOfAntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareTable_e53452e0-9d37-4b39-bb9c-b3977462e6ca" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareByAntidilutiveSecuritiesAxis_ca05a40d-a28a-4eb9-aa12-caf3afe631f3" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareByAntidilutiveSecuritiesAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfAntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareTable_e53452e0-9d37-4b39-bb9c-b3977462e6ca" xlink:to="loc_us-gaap_AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareByAntidilutiveSecuritiesAxis_ca05a40d-a28a-4eb9-aa12-caf3afe631f3" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AntidilutiveSecuritiesNameDomain_ca05a40d-a28a-4eb9-aa12-caf3afe631f3_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AntidilutiveSecuritiesNameDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareByAntidilutiveSecuritiesAxis_ca05a40d-a28a-4eb9-aa12-caf3afe631f3" xlink:to="loc_us-gaap_AntidilutiveSecuritiesNameDomain_ca05a40d-a28a-4eb9-aa12-caf3afe631f3_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AntidilutiveSecuritiesNameDomain_c9d8949c-6727-42b8-b51c-bb95c8a343fe" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AntidilutiveSecuritiesNameDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareByAntidilutiveSecuritiesAxis_ca05a40d-a28a-4eb9-aa12-caf3afe631f3" xlink:to="loc_us-gaap_AntidilutiveSecuritiesNameDomain_c9d8949c-6727-42b8-b51c-bb95c8a343fe" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_StockAppreciationRightsAndRestrictedStockMember_94b0bff9-63fc-4d0e-9d7d-3e9be4bb6a66" xlink:href="agm-20240331.xsd#agm_StockAppreciationRightsAndRestrictedStockMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AntidilutiveSecuritiesNameDomain_c9d8949c-6727-42b8-b51c-bb95c8a343fe" xlink:to="loc_agm_StockAppreciationRightsAndRestrictedStockMember_94b0bff9-63fc-4d0e-9d7d-3e9be4bb6a66" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PerformanceSharesMember_61e308b2-a69b-4e33-a063-d1a813be9000" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PerformanceSharesMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AntidilutiveSecuritiesNameDomain_c9d8949c-6727-42b8-b51c-bb95c8a343fe" xlink:to="loc_us-gaap_PerformanceSharesMember_61e308b2-a69b-4e33-a063-d1a813be9000" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EarningsPerShareBasicAbstract_af2cb2da-f0c6-4dad-94f6-89c90edd9df4" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_EarningsPerShareBasicAbstract"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareLineItems_20c64c5b-fb5b-4dd9-bd72-bd79c2c561da" xlink:to="loc_us-gaap_EarningsPerShareBasicAbstract_af2cb2da-f0c6-4dad-94f6-89c90edd9df4" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetIncomeLossAvailableToCommonStockholdersBasic_8eff908f-5ec8-4d9e-8369-b48764805bb5" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_NetIncomeLossAvailableToCommonStockholdersBasic"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EarningsPerShareBasicAbstract_af2cb2da-f0c6-4dad-94f6-89c90edd9df4" xlink:to="loc_us-gaap_NetIncomeLossAvailableToCommonStockholdersBasic_8eff908f-5ec8-4d9e-8369-b48764805bb5" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_WeightedAverageNumberOfSharesOutstandingBasic_116de07a-e294-4ad7-b877-708613f64ae2" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_WeightedAverageNumberOfSharesOutstandingBasic"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EarningsPerShareBasicAbstract_af2cb2da-f0c6-4dad-94f6-89c90edd9df4" xlink:to="loc_us-gaap_WeightedAverageNumberOfSharesOutstandingBasic_116de07a-e294-4ad7-b877-708613f64ae2" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EarningsPerShareBasic_06f5b0b4-2336-4b3d-9783-e9869c939b95" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_EarningsPerShareBasic"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EarningsPerShareBasicAbstract_af2cb2da-f0c6-4dad-94f6-89c90edd9df4" xlink:to="loc_us-gaap_EarningsPerShareBasic_06f5b0b4-2336-4b3d-9783-e9869c939b95" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EarningsPerShareDilutedAbstract_522cb44b-f73e-45b3-8939-9b380794d921" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_EarningsPerShareDilutedAbstract"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareLineItems_20c64c5b-fb5b-4dd9-bd72-bd79c2c561da" xlink:to="loc_us-gaap_EarningsPerShareDilutedAbstract_522cb44b-f73e-45b3-8939-9b380794d921" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncrementalCommonSharesAttributableToShareBasedPaymentArrangements_1bd79ad4-3ea1-4041-94a4-745f424e76b7" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_IncrementalCommonSharesAttributableToShareBasedPaymentArrangements"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EarningsPerShareDilutedAbstract_522cb44b-f73e-45b3-8939-9b380794d921" xlink:to="loc_us-gaap_IncrementalCommonSharesAttributableToShareBasedPaymentArrangements_1bd79ad4-3ea1-4041-94a4-745f424e76b7" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_EarningsPerShareOnIncrementalCommonSharesAttributableToShareBasedPaymentArrangements_3b99f58d-1634-40d6-b73d-0ca4db0db9ff" xlink:href="agm-20240331.xsd#agm_EarningsPerShareOnIncrementalCommonSharesAttributableToShareBasedPaymentArrangements"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EarningsPerShareDilutedAbstract_522cb44b-f73e-45b3-8939-9b380794d921" xlink:to="loc_agm_EarningsPerShareOnIncrementalCommonSharesAttributableToShareBasedPaymentArrangements_3b99f58d-1634-40d6-b73d-0ca4db0db9ff" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetIncomeLossAvailableToCommonStockholdersDiluted_b6aa0936-1b6e-43aa-bf85-d638933d7937" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_NetIncomeLossAvailableToCommonStockholdersDiluted"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareLineItems_20c64c5b-fb5b-4dd9-bd72-bd79c2c561da" xlink:to="loc_us-gaap_NetIncomeLossAvailableToCommonStockholdersDiluted_b6aa0936-1b6e-43aa-bf85-d638933d7937" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_WeightedAverageNumberOfDilutedSharesOutstanding_fdf32171-7692-4ccd-97ab-39bed808f390" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_WeightedAverageNumberOfDilutedSharesOutstanding"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareLineItems_20c64c5b-fb5b-4dd9-bd72-bd79c2c561da" xlink:to="loc_us-gaap_WeightedAverageNumberOfDilutedSharesOutstanding_fdf32171-7692-4ccd-97ab-39bed808f390" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EarningsPerShareDiluted_563634ba-18e2-4714-845e-4bcb8bc17d45" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_EarningsPerShareDiluted"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareLineItems_20c64c5b-fb5b-4dd9-bd72-bd79c2c561da" xlink:to="loc_us-gaap_EarningsPerShareDiluted_563634ba-18e2-4714-845e-4bcb8bc17d45" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareAmount_75da6ad2-1248-4fe8-ad65-266ee66ad61a" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareAmount"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareLineItems_20c64c5b-fb5b-4dd9-bd72-bd79c2c561da" xlink:to="loc_us-gaap_AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareAmount_75da6ad2-1248-4fe8-ad65-266ee66ad61a" xlink:type="arc" order="5"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.farmermac.com/role/SUMMARYOFSIGNIFICANTACCOUNTINGPOLICIESScheduleofAccumulatedOtherComprehensiveIncomeNetofTaxDetails" xlink:type="simple" xlink:href="agm-20240331.xsd#SUMMARYOFSIGNIFICANTACCOUNTINGPOLICIESScheduleofAccumulatedOtherComprehensiveIncomeNetofTaxDetails"/>
  <link:definitionLink xlink:role="http://www.farmermac.com/role/SUMMARYOFSIGNIFICANTACCOUNTINGPOLICIESScheduleofAccumulatedOtherComprehensiveIncomeNetofTaxDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossLineItems_63e86290-ff55-46fc-8835-c9096ce5c52f" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AccumulatedOtherComprehensiveIncomeLossLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossTable_34222776-70c7-4d93-8ef0-305720a8a045" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AccumulatedOtherComprehensiveIncomeLossTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossLineItems_63e86290-ff55-46fc-8835-c9096ce5c52f" xlink:to="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossTable_34222776-70c7-4d93-8ef0-305720a8a045" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StatementEquityComponentsAxis_ec0a83f6-9242-45ad-8bf5-94148f953dee" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_StatementEquityComponentsAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossTable_34222776-70c7-4d93-8ef0-305720a8a045" xlink:to="loc_us-gaap_StatementEquityComponentsAxis_ec0a83f6-9242-45ad-8bf5-94148f953dee" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EquityComponentDomain_ec0a83f6-9242-45ad-8bf5-94148f953dee_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_EquityComponentDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementEquityComponentsAxis_ec0a83f6-9242-45ad-8bf5-94148f953dee" xlink:to="loc_us-gaap_EquityComponentDomain_ec0a83f6-9242-45ad-8bf5-94148f953dee_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EquityComponentDomain_2f990e5b-6de6-43db-addd-223955c68285" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_EquityComponentDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementEquityComponentsAxis_ec0a83f6-9242-45ad-8bf5-94148f953dee" xlink:to="loc_us-gaap_EquityComponentDomain_2f990e5b-6de6-43db-addd-223955c68285" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccumulatedOtherComprehensiveIncomeMember_b9d4ffce-853d-42e0-9c5e-8221a7a27155" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AccumulatedOtherComprehensiveIncomeMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EquityComponentDomain_2f990e5b-6de6-43db-addd-223955c68285" xlink:to="loc_us-gaap_AccumulatedOtherComprehensiveIncomeMember_b9d4ffce-853d-42e0-9c5e-8221a7a27155" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_AOCIAccumulatedGainLossDebtSecuritiesParentMember_6719c081-c177-4337-b45e-aacbaf236f6f" xlink:href="agm-20240331.xsd#agm_AOCIAccumulatedGainLossDebtSecuritiesParentMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AccumulatedOtherComprehensiveIncomeMember_b9d4ffce-853d-42e0-9c5e-8221a7a27155" xlink:to="loc_agm_AOCIAccumulatedGainLossDebtSecuritiesParentMember_6719c081-c177-4337-b45e-aacbaf236f6f" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccumulatedGainLossNetCashFlowHedgeParentMember_a7d8dc90-a534-49ba-bb39-a43c359cab9a" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AccumulatedGainLossNetCashFlowHedgeParentMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AccumulatedOtherComprehensiveIncomeMember_b9d4ffce-853d-42e0-9c5e-8221a7a27155" xlink:to="loc_us-gaap_AccumulatedGainLossNetCashFlowHedgeParentMember_a7d8dc90-a534-49ba-bb39-a43c359cab9a" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinancialInstrumentAxis_05228ba1-1896-445c-baf0-f5b824b5449c" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FinancialInstrumentAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossTable_34222776-70c7-4d93-8ef0-305720a8a045" xlink:to="loc_us-gaap_FinancialInstrumentAxis_05228ba1-1896-445c-baf0-f5b824b5449c" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_05228ba1-1896-445c-baf0-f5b824b5449c_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_FinancialInstrumentAxis_05228ba1-1896-445c-baf0-f5b824b5449c" xlink:to="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_05228ba1-1896-445c-baf0-f5b824b5449c_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_083a720d-e066-4b86-baab-53efa6fe8365" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_FinancialInstrumentAxis_05228ba1-1896-445c-baf0-f5b824b5449c" xlink:to="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_083a720d-e066-4b86-baab-53efa6fe8365" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_DebtSecuritiesAvailableForSaleMember_20408005-2401-4674-b474-c72b90a0a6ea" xlink:href="agm-20240331.xsd#agm_DebtSecuritiesAvailableForSaleMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_083a720d-e066-4b86-baab-53efa6fe8365" xlink:to="loc_agm_DebtSecuritiesAvailableForSaleMember_20408005-2401-4674-b474-c72b90a0a6ea" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_DebtSecuritiesHeldToMaturityMember_519c4cb7-b565-4683-b246-7023317ead76" xlink:href="agm-20240331.xsd#agm_DebtSecuritiesHeldToMaturityMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_083a720d-e066-4b86-baab-53efa6fe8365" xlink:to="loc_agm_DebtSecuritiesHeldToMaturityMember_519c4cb7-b565-4683-b246-7023317ead76" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AOCIAttributableToParentNetOfTaxRollForward_9344cc04-3820-45c1-9f86-8cc4b3e08fc3" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AOCIAttributableToParentNetOfTaxRollForward"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossLineItems_63e86290-ff55-46fc-8835-c9096ce5c52f" xlink:to="loc_us-gaap_AOCIAttributableToParentNetOfTaxRollForward_9344cc04-3820-45c1-9f86-8cc4b3e08fc3" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StockholdersEquity_5301936d-3e5e-46b9-a0d8-9734f37c363a" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_StockholdersEquity"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AOCIAttributableToParentNetOfTaxRollForward_9344cc04-3820-45c1-9f86-8cc4b3e08fc3" xlink:to="loc_us-gaap_StockholdersEquity_5301936d-3e5e-46b9-a0d8-9734f37c363a" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossBeforeReclassificationsNetOfTax_346bb658-c61c-49d5-aa9e-93a657392882" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherComprehensiveIncomeLossBeforeReclassificationsNetOfTax"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AOCIAttributableToParentNetOfTaxRollForward_9344cc04-3820-45c1-9f86-8cc4b3e08fc3" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossBeforeReclassificationsNetOfTax_346bb658-c61c-49d5-aa9e-93a657392882" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ReclassificationFromAccumulatedOtherComprehensiveIncomeCurrentPeriodNetOfTax_7d451cea-afd9-4754-82d0-4b3829f753cf" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ReclassificationFromAccumulatedOtherComprehensiveIncomeCurrentPeriodNetOfTax"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AOCIAttributableToParentNetOfTaxRollForward_9344cc04-3820-45c1-9f86-8cc4b3e08fc3" xlink:to="loc_us-gaap_ReclassificationFromAccumulatedOtherComprehensiveIncomeCurrentPeriodNetOfTax_7d451cea-afd9-4754-82d0-4b3829f753cf" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTax_2c2b3a17-c8cb-4cc7-a9d4-2524c246baef" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherComprehensiveIncomeLossNetOfTax"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AOCIAttributableToParentNetOfTaxRollForward_9344cc04-3820-45c1-9f86-8cc4b3e08fc3" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTax_2c2b3a17-c8cb-4cc7-a9d4-2524c246baef" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StockholdersEquity_60d6e84a-0029-46c7-a647-5d5970ba4331" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_StockholdersEquity"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.farmermac.com/role/SUMMARYOFSIGNIFICANTACCOUNTINGPOLICIESScheduleofReclassificationoutofAccumulatedOtherComprehensiveIncomeDetails" xlink:type="simple" xlink:href="agm-20240331.xsd#SUMMARYOFSIGNIFICANTACCOUNTINGPOLICIESScheduleofReclassificationoutofAccumulatedOtherComprehensiveIncomeDetails"/>
  <link:definitionLink xlink:role="http://www.farmermac.com/role/SUMMARYOFSIGNIFICANTACCOUNTINGPOLICIESScheduleofReclassificationoutofAccumulatedOtherComprehensiveIncomeDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ReclassificationAdjustmentOutOfAccumulatedOtherComprehensiveIncomeLineItems_80f8d429-d72d-46cc-91b4-bd5dd5274b8d" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ReclassificationAdjustmentOutOfAccumulatedOtherComprehensiveIncomeLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ReclassificationOutOfAccumulatedOtherComprehensiveIncomeTable_736a5b4c-b2b9-41fc-8a50-dc83d96a14ad" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ReclassificationOutOfAccumulatedOtherComprehensiveIncomeTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_ReclassificationAdjustmentOutOfAccumulatedOtherComprehensiveIncomeLineItems_80f8d429-d72d-46cc-91b4-bd5dd5274b8d" xlink:to="loc_us-gaap_ReclassificationOutOfAccumulatedOtherComprehensiveIncomeTable_736a5b4c-b2b9-41fc-8a50-dc83d96a14ad" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StatementEquityComponentsAxis_45736881-6b51-457a-a837-9d53dc5e9cde" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_StatementEquityComponentsAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ReclassificationOutOfAccumulatedOtherComprehensiveIncomeTable_736a5b4c-b2b9-41fc-8a50-dc83d96a14ad" xlink:to="loc_us-gaap_StatementEquityComponentsAxis_45736881-6b51-457a-a837-9d53dc5e9cde" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EquityComponentDomain_45736881-6b51-457a-a837-9d53dc5e9cde_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_EquityComponentDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementEquityComponentsAxis_45736881-6b51-457a-a837-9d53dc5e9cde" xlink:to="loc_us-gaap_EquityComponentDomain_45736881-6b51-457a-a837-9d53dc5e9cde_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EquityComponentDomain_f7d5acc0-b156-473a-9f2b-5d7927544ee9" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_EquityComponentDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementEquityComponentsAxis_45736881-6b51-457a-a837-9d53dc5e9cde" xlink:to="loc_us-gaap_EquityComponentDomain_f7d5acc0-b156-473a-9f2b-5d7927544ee9" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccumulatedOtherComprehensiveIncomeMember_011bd333-0f58-4f49-9649-2d3867ad35de" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AccumulatedOtherComprehensiveIncomeMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EquityComponentDomain_f7d5acc0-b156-473a-9f2b-5d7927544ee9" xlink:to="loc_us-gaap_AccumulatedOtherComprehensiveIncomeMember_011bd333-0f58-4f49-9649-2d3867ad35de" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccumulatedDefinedBenefitPlansAdjustmentNetGainLossIncludingPortionAttributableToNoncontrollingInterestMember_a80a35d5-c331-47b7-b8b1-2c6f27d926f8" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AccumulatedDefinedBenefitPlansAdjustmentNetGainLossIncludingPortionAttributableToNoncontrollingInterestMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AccumulatedOtherComprehensiveIncomeMember_011bd333-0f58-4f49-9649-2d3867ad35de" xlink:to="loc_us-gaap_AccumulatedDefinedBenefitPlansAdjustmentNetGainLossIncludingPortionAttributableToNoncontrollingInterestMember_a80a35d5-c331-47b7-b8b1-2c6f27d926f8" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccumulatedGainLossCashFlowHedgeIncludingNoncontrollingInterestMember_230bf57d-40e7-4df0-923c-e7918ab61031" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AccumulatedGainLossCashFlowHedgeIncludingNoncontrollingInterestMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AccumulatedOtherComprehensiveIncomeMember_011bd333-0f58-4f49-9649-2d3867ad35de" xlink:to="loc_us-gaap_AccumulatedGainLossCashFlowHedgeIncludingNoncontrollingInterestMember_230bf57d-40e7-4df0-923c-e7918ab61031" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeStatementLocationAxis_0a698b63-896b-49e7-81da-27d837cc884b" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_IncomeStatementLocationAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ReclassificationOutOfAccumulatedOtherComprehensiveIncomeTable_736a5b4c-b2b9-41fc-8a50-dc83d96a14ad" xlink:to="loc_us-gaap_IncomeStatementLocationAxis_0a698b63-896b-49e7-81da-27d837cc884b" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeStatementLocationDomain_0a698b63-896b-49e7-81da-27d837cc884b_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_IncomeStatementLocationDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_IncomeStatementLocationAxis_0a698b63-896b-49e7-81da-27d837cc884b" xlink:to="loc_us-gaap_IncomeStatementLocationDomain_0a698b63-896b-49e7-81da-27d837cc884b_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeStatementLocationDomain_379bb524-5ece-41f2-8060-9ba9874bc7b5" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_IncomeStatementLocationDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_IncomeStatementLocationAxis_0a698b63-896b-49e7-81da-27d837cc884b" xlink:to="loc_us-gaap_IncomeStatementLocationDomain_379bb524-5ece-41f2-8060-9ba9874bc7b5" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherIncomeMember_fed6cf6e-25e6-4853-9c37-e0e217756b2f" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherIncomeMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncomeStatementLocationDomain_379bb524-5ece-41f2-8060-9ba9874bc7b5" xlink:to="loc_us-gaap_OtherIncomeMember_fed6cf6e-25e6-4853-9c37-e0e217756b2f" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinancialInstrumentAxis_71af26ca-f202-46fd-8e93-e95e5a9479c5" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FinancialInstrumentAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ReclassificationOutOfAccumulatedOtherComprehensiveIncomeTable_736a5b4c-b2b9-41fc-8a50-dc83d96a14ad" xlink:to="loc_us-gaap_FinancialInstrumentAxis_71af26ca-f202-46fd-8e93-e95e5a9479c5" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_71af26ca-f202-46fd-8e93-e95e5a9479c5_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_FinancialInstrumentAxis_71af26ca-f202-46fd-8e93-e95e5a9479c5" xlink:to="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_71af26ca-f202-46fd-8e93-e95e5a9479c5_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_bf0b4e3f-3330-406c-907d-c9c074a1f197" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_FinancialInstrumentAxis_71af26ca-f202-46fd-8e93-e95e5a9479c5" xlink:to="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_bf0b4e3f-3330-406c-907d-c9c074a1f197" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_DebtSecuritiesAvailableForSaleMember_9da15c09-1e45-429f-9ed3-bb33f740f9a3" xlink:href="agm-20240331.xsd#agm_DebtSecuritiesAvailableForSaleMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_bf0b4e3f-3330-406c-907d-c9c074a1f197" xlink:to="loc_agm_DebtSecuritiesAvailableForSaleMember_9da15c09-1e45-429f-9ed3-bb33f740f9a3" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_DebtSecuritiesHeldToMaturityMember_ed8b31c8-9db5-4723-b432-bc9a2ea7f063" xlink:href="agm-20240331.xsd#agm_DebtSecuritiesHeldToMaturityMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_bf0b4e3f-3330-406c-907d-c9c074a1f197" xlink:to="loc_agm_DebtSecuritiesHeldToMaturityMember_ed8b31c8-9db5-4723-b432-bc9a2ea7f063" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossBeforeTaxPeriodIncreaseDecreaseAbstract_3dc2f1cc-c7ce-4abd-a0bb-9f4faae1e759" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherComprehensiveIncomeLossBeforeTaxPeriodIncreaseDecreaseAbstract"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ReclassificationAdjustmentOutOfAccumulatedOtherComprehensiveIncomeLineItems_80f8d429-d72d-46cc-91b4-bd5dd5274b8d" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossBeforeTaxPeriodIncreaseDecreaseAbstract_3dc2f1cc-c7ce-4abd-a0bb-9f4faae1e759" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossBeforeReclassificationsBeforeTax_aec453e2-cb24-407f-855c-5a58acb458d8" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherComprehensiveIncomeLossBeforeReclassificationsBeforeTax"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossBeforeTaxPeriodIncreaseDecreaseAbstract_3dc2f1cc-c7ce-4abd-a0bb-9f4faae1e759" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossBeforeReclassificationsBeforeTax_aec453e2-cb24-407f-855c-5a58acb458d8" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ReclassificationFromAccumulatedOtherComprehensiveIncomeCurrentPeriodBeforeTax_c90b423d-e783-44c4-aa25-8cf5a4cdb9b5" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ReclassificationFromAccumulatedOtherComprehensiveIncomeCurrentPeriodBeforeTax"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossBeforeTaxPeriodIncreaseDecreaseAbstract_3dc2f1cc-c7ce-4abd-a0bb-9f4faae1e759" xlink:to="loc_us-gaap_ReclassificationFromAccumulatedOtherComprehensiveIncomeCurrentPeriodBeforeTax_c90b423d-e783-44c4-aa25-8cf5a4cdb9b5" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossBeforeTax_2ea01dd0-67ad-40f2-8780-4c69b281b1d0" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherComprehensiveIncomeLossBeforeTax"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossBeforeTaxPeriodIncreaseDecreaseAbstract_3dc2f1cc-c7ce-4abd-a0bb-9f4faae1e759" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossBeforeTax_2ea01dd0-67ad-40f2-8780-4c69b281b1d0" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossTaxAbstract_4fbeca74-2dad-44ac-ae09-13ed26727282" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherComprehensiveIncomeLossTaxAbstract"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ReclassificationAdjustmentOutOfAccumulatedOtherComprehensiveIncomeLineItems_80f8d429-d72d-46cc-91b4-bd5dd5274b8d" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossTaxAbstract_4fbeca74-2dad-44ac-ae09-13ed26727282" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossBeforeReclassificationsTax_3ce16cc2-95c5-4ef6-9d81-5022478370da" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherComprehensiveIncomeLossBeforeReclassificationsTax"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossTaxAbstract_4fbeca74-2dad-44ac-ae09-13ed26727282" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossBeforeReclassificationsTax_3ce16cc2-95c5-4ef6-9d81-5022478370da" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ReclassificationFromAociCurrentPeriodTax_d9d2a6a7-f666-43a3-8921-6db35511eeb5" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ReclassificationFromAociCurrentPeriodTax"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossTaxAbstract_4fbeca74-2dad-44ac-ae09-13ed26727282" xlink:to="loc_us-gaap_ReclassificationFromAociCurrentPeriodTax_d9d2a6a7-f666-43a3-8921-6db35511eeb5" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossTax_ec3808ab-1a98-4cc3-bfdd-ee4a47489757" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherComprehensiveIncomeLossTax"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossTaxAbstract_4fbeca74-2dad-44ac-ae09-13ed26727282" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossTax_ec3808ab-1a98-4cc3-bfdd-ee4a47489757" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTaxPeriodIncreaseDecreaseAbstract_ce1a2385-b4be-4491-a94d-f6f6be5e562c" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherComprehensiveIncomeLossNetOfTaxPeriodIncreaseDecreaseAbstract"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ReclassificationAdjustmentOutOfAccumulatedOtherComprehensiveIncomeLineItems_80f8d429-d72d-46cc-91b4-bd5dd5274b8d" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTaxPeriodIncreaseDecreaseAbstract_ce1a2385-b4be-4491-a94d-f6f6be5e562c" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossBeforeReclassificationsNetOfTax_c9d6b88e-bcef-45ea-bd99-71d2655358d8" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherComprehensiveIncomeLossBeforeReclassificationsNetOfTax"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTaxPeriodIncreaseDecreaseAbstract_ce1a2385-b4be-4491-a94d-f6f6be5e562c" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossBeforeReclassificationsNetOfTax_c9d6b88e-bcef-45ea-bd99-71d2655358d8" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ReclassificationFromAccumulatedOtherComprehensiveIncomeCurrentPeriodNetOfTax_4ccac12a-65c3-48ae-b3c9-ac13351808b2" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ReclassificationFromAccumulatedOtherComprehensiveIncomeCurrentPeriodNetOfTax"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTaxPeriodIncreaseDecreaseAbstract_ce1a2385-b4be-4491-a94d-f6f6be5e562c" xlink:to="loc_us-gaap_ReclassificationFromAccumulatedOtherComprehensiveIncomeCurrentPeriodNetOfTax_4ccac12a-65c3-48ae-b3c9-ac13351808b2" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTax_175204a6-a4f2-4680-a22e-5f6a08bf684e" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherComprehensiveIncomeLossNetOfTax"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTaxPeriodIncreaseDecreaseAbstract_ce1a2385-b4be-4491-a94d-f6f6be5e562c" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTax_175204a6-a4f2-4680-a22e-5f6a08bf684e" xlink:type="arc" order="3"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.farmermac.com/role/INVESTMENTSECURITIESScheduleofInvestmentSecuritiesDetails" xlink:type="simple" xlink:href="agm-20240331.xsd#INVESTMENTSECURITIESScheduleofInvestmentSecuritiesDetails"/>
  <link:definitionLink xlink:role="http://www.farmermac.com/role/INVESTMENTSECURITIESScheduleofInvestmentSecuritiesDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_agm_ScheduleOfAvailableForSaleAndTradingSecuritiesLineItems_b1f904b2-e386-445c-a205-7bbbd90cdc6b" xlink:href="agm-20240331.xsd#agm_ScheduleOfAvailableForSaleAndTradingSecuritiesLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_ScheduleOfAvailableForSaleAndTradingSecuritiesTable_77074d30-4bc3-4e02-9c5d-2192ff372287" xlink:href="agm-20240331.xsd#agm_ScheduleOfAvailableForSaleAndTradingSecuritiesTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_agm_ScheduleOfAvailableForSaleAndTradingSecuritiesLineItems_b1f904b2-e386-445c-a205-7bbbd90cdc6b" xlink:to="loc_agm_ScheduleOfAvailableForSaleAndTradingSecuritiesTable_77074d30-4bc3-4e02-9c5d-2192ff372287" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_ProductOrServiceAxis_52d8a22b-6cd9-4b8a-ba2e-b6d4a9c50ba2" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_ProductOrServiceAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_agm_ScheduleOfAvailableForSaleAndTradingSecuritiesTable_77074d30-4bc3-4e02-9c5d-2192ff372287" xlink:to="loc_srt_ProductOrServiceAxis_52d8a22b-6cd9-4b8a-ba2e-b6d4a9c50ba2" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_ProductsAndServicesDomain_52d8a22b-6cd9-4b8a-ba2e-b6d4a9c50ba2_default" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_ProductsAndServicesDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_srt_ProductOrServiceAxis_52d8a22b-6cd9-4b8a-ba2e-b6d4a9c50ba2" xlink:to="loc_srt_ProductsAndServicesDomain_52d8a22b-6cd9-4b8a-ba2e-b6d4a9c50ba2_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_ProductsAndServicesDomain_430ad576-c2be-4753-a92c-9abb3143fc9b" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_ProductsAndServicesDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_srt_ProductOrServiceAxis_52d8a22b-6cd9-4b8a-ba2e-b6d4a9c50ba2" xlink:to="loc_srt_ProductsAndServicesDomain_430ad576-c2be-4753-a92c-9abb3143fc9b" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_FloatingInterestRateMember_bc5327cb-8665-4df7-a2ea-dd9f0bf42140" xlink:href="agm-20240331.xsd#agm_FloatingInterestRateMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_ProductsAndServicesDomain_430ad576-c2be-4753-a92c-9abb3143fc9b" xlink:to="loc_agm_FloatingInterestRateMember_bc5327cb-8665-4df7-a2ea-dd9f0bf42140" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_FixedInterestRateMember_9cf49f42-b8c4-45d7-89a8-121e09eb68a3" xlink:href="agm-20240331.xsd#agm_FixedInterestRateMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_ProductsAndServicesDomain_430ad576-c2be-4753-a92c-9abb3143fc9b" xlink:to="loc_agm_FixedInterestRateMember_9cf49f42-b8c4-45d7-89a8-121e09eb68a3" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_DebtSecurityInvestmentCategoryAxis_a5100665-3321-406a-868b-ec04fb60222b" xlink:href="agm-20240331.xsd#agm_DebtSecurityInvestmentCategoryAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_agm_ScheduleOfAvailableForSaleAndTradingSecuritiesTable_77074d30-4bc3-4e02-9c5d-2192ff372287" xlink:to="loc_agm_DebtSecurityInvestmentCategoryAxis_a5100665-3321-406a-868b-ec04fb60222b" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_DebtSecurityInvestmentCategoryDomain_a5100665-3321-406a-868b-ec04fb60222b_default" xlink:href="agm-20240331.xsd#agm_DebtSecurityInvestmentCategoryDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_agm_DebtSecurityInvestmentCategoryAxis_a5100665-3321-406a-868b-ec04fb60222b" xlink:to="loc_agm_DebtSecurityInvestmentCategoryDomain_a5100665-3321-406a-868b-ec04fb60222b_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_DebtSecurityInvestmentCategoryDomain_291416e1-9e79-461b-8d44-31403dd49b91" xlink:href="agm-20240331.xsd#agm_DebtSecurityInvestmentCategoryDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_agm_DebtSecurityInvestmentCategoryAxis_a5100665-3321-406a-868b-ec04fb60222b" xlink:to="loc_agm_DebtSecurityInvestmentCategoryDomain_291416e1-9e79-461b-8d44-31403dd49b91" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_DebtSecuritiesAvailableForSaleMember_a4868640-4454-46d7-a197-43b6ca027517" xlink:href="agm-20240331.xsd#agm_DebtSecuritiesAvailableForSaleMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_agm_DebtSecurityInvestmentCategoryDomain_291416e1-9e79-461b-8d44-31403dd49b91" xlink:to="loc_agm_DebtSecuritiesAvailableForSaleMember_a4868640-4454-46d7-a197-43b6ca027517" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_DebtSecuritiesHeldToMaturityMember_73894902-615c-43d9-b54c-915961db5b77" xlink:href="agm-20240331.xsd#agm_DebtSecuritiesHeldToMaturityMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_agm_DebtSecurityInvestmentCategoryDomain_291416e1-9e79-461b-8d44-31403dd49b91" xlink:to="loc_agm_DebtSecuritiesHeldToMaturityMember_73894902-615c-43d9-b54c-915961db5b77" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinancialInstrumentAxis_ae9c9f60-fe9f-4b4d-9adc-e147802534ba" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FinancialInstrumentAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_agm_ScheduleOfAvailableForSaleAndTradingSecuritiesTable_77074d30-4bc3-4e02-9c5d-2192ff372287" xlink:to="loc_us-gaap_FinancialInstrumentAxis_ae9c9f60-fe9f-4b4d-9adc-e147802534ba" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_ae9c9f60-fe9f-4b4d-9adc-e147802534ba_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_FinancialInstrumentAxis_ae9c9f60-fe9f-4b4d-9adc-e147802534ba" xlink:to="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_ae9c9f60-fe9f-4b4d-9adc-e147802534ba_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_339a4756-5e0f-48a7-9e70-68cd8ba2ad0d" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_FinancialInstrumentAxis_ae9c9f60-fe9f-4b4d-9adc-e147802534ba" xlink:to="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_339a4756-5e0f-48a7-9e70-68cd8ba2ad0d" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesMember_0d517712-9daa-4ff8-a2c8-007b9027a7d3" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtSecuritiesMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_339a4756-5e0f-48a7-9e70-68cd8ba2ad0d" xlink:to="loc_us-gaap_DebtSecuritiesMember_0d517712-9daa-4ff8-a2c8-007b9027a7d3" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AuctionRateSecuritiesMember_53dd2f56-ce3f-4a24-aa1a-be6fe9647799" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AuctionRateSecuritiesMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtSecuritiesMember_0d517712-9daa-4ff8-a2c8-007b9027a7d3" xlink:to="loc_us-gaap_AuctionRateSecuritiesMember_53dd2f56-ce3f-4a24-aa1a-be6fe9647799" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_MortgageBackedSecuritiesMember_25648570-62a1-45c8-94f3-7dfc388e8f30" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_MortgageBackedSecuritiesMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtSecuritiesMember_0d517712-9daa-4ff8-a2c8-007b9027a7d3" xlink:to="loc_us-gaap_MortgageBackedSecuritiesMember_25648570-62a1-45c8-94f3-7dfc388e8f30" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_USTreasurySecuritiesMember_c41f772b-4060-4ebb-8fe5-ce917c2169ea" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_USTreasurySecuritiesMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtSecuritiesMember_0d517712-9daa-4ff8-a2c8-007b9027a7d3" xlink:to="loc_us-gaap_USTreasurySecuritiesMember_c41f772b-4060-4ebb-8fe5-ce917c2169ea" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesAbstract_f95f9729-03a3-4db1-a3a5-8468e0146f64" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AvailableForSaleSecuritiesAbstract"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_agm_ScheduleOfAvailableForSaleAndTradingSecuritiesLineItems_b1f904b2-e386-445c-a205-7bbbd90cdc6b" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesAbstract_f95f9729-03a3-4db1-a3a5-8468e0146f64" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_DebtSecuritiesAvailableForSaleUnpaidPrincipalBalance_ccbeefeb-7773-45a3-917a-416b591c552a" xlink:href="agm-20240331.xsd#agm_DebtSecuritiesAvailableForSaleUnpaidPrincipalBalance"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AvailableForSaleSecuritiesAbstract_f95f9729-03a3-4db1-a3a5-8468e0146f64" xlink:to="loc_agm_DebtSecuritiesAvailableForSaleUnpaidPrincipalBalance_ccbeefeb-7773-45a3-917a-416b591c552a" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtInstrumentUnamortizedDiscountPremiumNet_b3e866b4-d66b-45e8-b308-f8419ba0b229" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtInstrumentUnamortizedDiscountPremiumNet"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AvailableForSaleSecuritiesAbstract_f95f9729-03a3-4db1-a3a5-8468e0146f64" xlink:to="loc_us-gaap_DebtInstrumentUnamortizedDiscountPremiumNet_b3e866b4-d66b-45e8-b308-f8419ba0b229" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleAmortizedCostExcludingAccruedInterestBeforeAllowanceForCreditLoss_34ea9dda-efa7-4f97-ab37-4010e610f58f" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtSecuritiesAvailableForSaleAmortizedCostExcludingAccruedInterestBeforeAllowanceForCreditLoss"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AvailableForSaleSecuritiesAbstract_f95f9729-03a3-4db1-a3a5-8468e0146f64" xlink:to="loc_us-gaap_DebtSecuritiesAvailableForSaleAmortizedCostExcludingAccruedInterestBeforeAllowanceForCreditLoss_34ea9dda-efa7-4f97-ab37-4010e610f58f" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleAmortizedCostAllowanceForCreditLossExcludingAccruedInterest_7447c3c0-7ce6-45f7-b1f7-0cd7924bf340" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtSecuritiesAvailableForSaleAmortizedCostAllowanceForCreditLossExcludingAccruedInterest"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AvailableForSaleSecuritiesAbstract_f95f9729-03a3-4db1-a3a5-8468e0146f64" xlink:to="loc_us-gaap_DebtSecuritiesAvailableForSaleAmortizedCostAllowanceForCreditLossExcludingAccruedInterest_7447c3c0-7ce6-45f7-b1f7-0cd7924bf340" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleDebtSecuritiesAccumulatedGrossUnrealizedGainBeforeTax_c3f1227d-ef12-4c35-86c4-a6df4f04adf0" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AvailableForSaleDebtSecuritiesAccumulatedGrossUnrealizedGainBeforeTax"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AvailableForSaleSecuritiesAbstract_f95f9729-03a3-4db1-a3a5-8468e0146f64" xlink:to="loc_us-gaap_AvailableForSaleDebtSecuritiesAccumulatedGrossUnrealizedGainBeforeTax_c3f1227d-ef12-4c35-86c4-a6df4f04adf0" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleDebtSecuritiesAccumulatedGrossUnrealizedLossBeforeTax_7d83205b-5b9c-4e88-9076-94a1cb96fa1c" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AvailableForSaleDebtSecuritiesAccumulatedGrossUnrealizedLossBeforeTax"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AvailableForSaleSecuritiesAbstract_f95f9729-03a3-4db1-a3a5-8468e0146f64" xlink:to="loc_us-gaap_AvailableForSaleDebtSecuritiesAccumulatedGrossUnrealizedLossBeforeTax_7d83205b-5b9c-4e88-9076-94a1cb96fa1c" xlink:type="arc" order="6"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleExcludingAccruedInterest_1f82a71f-3492-4343-8d26-2f7a027c8744" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtSecuritiesAvailableForSaleExcludingAccruedInterest"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AvailableForSaleSecuritiesAbstract_f95f9729-03a3-4db1-a3a5-8468e0146f64" xlink:to="loc_us-gaap_DebtSecuritiesAvailableForSaleExcludingAccruedInterest_1f82a71f-3492-4343-8d26-2f7a027c8744" xlink:type="arc" order="7"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_HeldToMaturitySecuritiesClassifiedAbstract_35b2a83d-c61d-4a7e-b0cc-3117b7c6be73" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_HeldToMaturitySecuritiesClassifiedAbstract"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_agm_ScheduleOfAvailableForSaleAndTradingSecuritiesLineItems_b1f904b2-e386-445c-a205-7bbbd90cdc6b" xlink:to="loc_us-gaap_HeldToMaturitySecuritiesClassifiedAbstract_35b2a83d-c61d-4a7e-b0cc-3117b7c6be73" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_HeldToMaturityUnpaidPrincipalBalance_66fa1604-b0e0-48d4-9f68-f66c35e40821" xlink:href="agm-20240331.xsd#agm_HeldToMaturityUnpaidPrincipalBalance"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_HeldToMaturitySecuritiesClassifiedAbstract_35b2a83d-c61d-4a7e-b0cc-3117b7c6be73" xlink:to="loc_agm_HeldToMaturityUnpaidPrincipalBalance_66fa1604-b0e0-48d4-9f68-f66c35e40821" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtInstrumentUnamortizedDiscountPremiumNet_e970216d-6473-44dd-a286-76a8b53ba8f2" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtInstrumentUnamortizedDiscountPremiumNet"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_DebtSecuritiesHeldToMaturityAmortizedCostExcludingAccruedInterestBeforeAllowanceForCreditLoss_9959bfd1-4586-437a-8868-6a2375d88b8b" xlink:href="agm-20240331.xsd#agm_DebtSecuritiesHeldToMaturityAmortizedCostExcludingAccruedInterestBeforeAllowanceForCreditLoss"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_HeldToMaturitySecuritiesClassifiedAbstract_35b2a83d-c61d-4a7e-b0cc-3117b7c6be73" xlink:to="loc_agm_DebtSecuritiesHeldToMaturityAmortizedCostExcludingAccruedInterestBeforeAllowanceForCreditLoss_9959bfd1-4586-437a-8868-6a2375d88b8b" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesHeldToMaturityAllowanceForCreditLossExcludingAccruedInterest_3c014ae1-336e-468b-8c24-e7cbddcddeeb" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtSecuritiesHeldToMaturityAllowanceForCreditLossExcludingAccruedInterest"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_HeldToMaturitySecuritiesClassifiedAbstract_35b2a83d-c61d-4a7e-b0cc-3117b7c6be73" xlink:to="loc_us-gaap_DebtSecuritiesHeldToMaturityAllowanceForCreditLossExcludingAccruedInterest_3c014ae1-336e-468b-8c24-e7cbddcddeeb" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_HeldToMaturitySecuritiesAccumulatedUnrecognizedHoldingGain_aa4fc6f5-4ec4-4027-9917-a0e2313733fb" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_HeldToMaturitySecuritiesAccumulatedUnrecognizedHoldingGain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_HeldToMaturitySecuritiesClassifiedAbstract_35b2a83d-c61d-4a7e-b0cc-3117b7c6be73" xlink:to="loc_us-gaap_HeldToMaturitySecuritiesAccumulatedUnrecognizedHoldingGain_aa4fc6f5-4ec4-4027-9917-a0e2313733fb" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_HeldToMaturitySecuritiesAccumulatedUnrecognizedHoldingLoss_fe81d722-7ff1-4891-9fac-509168fab3ec" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_HeldToMaturitySecuritiesAccumulatedUnrecognizedHoldingLoss"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_HeldToMaturitySecuritiesClassifiedAbstract_35b2a83d-c61d-4a7e-b0cc-3117b7c6be73" xlink:to="loc_us-gaap_HeldToMaturitySecuritiesAccumulatedUnrecognizedHoldingLoss_fe81d722-7ff1-4891-9fac-509168fab3ec" xlink:type="arc" order="6"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesHeldToMaturityExcludingAccruedInterestAfterAllowanceForCreditLoss_74f43609-de18-43f8-9d15-7f42ca1a2894" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtSecuritiesHeldToMaturityExcludingAccruedInterestAfterAllowanceForCreditLoss"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_HeldToMaturitySecuritiesClassifiedAbstract_35b2a83d-c61d-4a7e-b0cc-3117b7c6be73" xlink:to="loc_us-gaap_DebtSecuritiesHeldToMaturityExcludingAccruedInterestAfterAllowanceForCreditLoss_74f43609-de18-43f8-9d15-7f42ca1a2894" xlink:type="arc" order="7"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleAccruedInterestAfterAllowanceForCreditLoss_02c5a24e-1b6a-477e-b0b0-380ca401f132" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtSecuritiesAvailableForSaleAccruedInterestAfterAllowanceForCreditLoss"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_agm_ScheduleOfAvailableForSaleAndTradingSecuritiesLineItems_b1f904b2-e386-445c-a205-7bbbd90cdc6b" xlink:to="loc_us-gaap_DebtSecuritiesAvailableForSaleAccruedInterestAfterAllowanceForCreditLoss_02c5a24e-1b6a-477e-b0b0-380ca401f132" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_HeldToMaturitySecuritiesDebtMaturitiesWeightedAverageYield_a7a7b563-7a36-4b4f-8168-8ee182f50496" xlink:href="agm-20240331.xsd#agm_HeldToMaturitySecuritiesDebtMaturitiesWeightedAverageYield"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_agm_ScheduleOfAvailableForSaleAndTradingSecuritiesLineItems_b1f904b2-e386-445c-a205-7bbbd90cdc6b" xlink:to="loc_agm_HeldToMaturitySecuritiesDebtMaturitiesWeightedAverageYield_a7a7b563-7a36-4b4f-8168-8ee182f50496" xlink:type="arc" order="3"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.farmermac.com/role/INVESTMENTSECURITIESNarrativeDetails" xlink:type="simple" xlink:href="agm-20240331.xsd#INVESTMENTSECURITIESNarrativeDetails"/>
  <link:definitionLink xlink:role="http://www.farmermac.com/role/INVESTMENTSECURITIESNarrativeDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ScheduleOfAvailableForSaleSecuritiesLineItems_2fb82e0e-6f54-406d-82c1-9a47eb03e8be" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ScheduleOfAvailableForSaleSecuritiesLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleTable_fcaa5afa-7885-4f45-8b1f-a7c6824b17d7" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtSecuritiesAvailableForSaleTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_ScheduleOfAvailableForSaleSecuritiesLineItems_2fb82e0e-6f54-406d-82c1-9a47eb03e8be" xlink:to="loc_us-gaap_DebtSecuritiesAvailableForSaleTable_fcaa5afa-7885-4f45-8b1f-a7c6824b17d7" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinancialInstrumentAxis_497c0419-1568-4754-a6fa-910ca4c0b301" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FinancialInstrumentAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_DebtSecuritiesAvailableForSaleTable_fcaa5afa-7885-4f45-8b1f-a7c6824b17d7" xlink:to="loc_us-gaap_FinancialInstrumentAxis_497c0419-1568-4754-a6fa-910ca4c0b301" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_497c0419-1568-4754-a6fa-910ca4c0b301_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_FinancialInstrumentAxis_497c0419-1568-4754-a6fa-910ca4c0b301" xlink:to="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_497c0419-1568-4754-a6fa-910ca4c0b301_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_4a78f576-1905-43ed-95d7-aa0904001459" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_FinancialInstrumentAxis_497c0419-1568-4754-a6fa-910ca4c0b301" xlink:to="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_4a78f576-1905-43ed-95d7-aa0904001459" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesMember_815eab94-c3ef-4a26-8d77-638e87ea40eb" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtSecuritiesMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_4a78f576-1905-43ed-95d7-aa0904001459" xlink:to="loc_us-gaap_DebtSecuritiesMember_815eab94-c3ef-4a26-8d77-638e87ea40eb" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProceedsFromSaleOfAvailableForSaleSecuritiesDebt_958ca8b1-e72e-4f2f-8548-1a5e1004aab8" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ProceedsFromSaleOfAvailableForSaleSecuritiesDebt"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ScheduleOfAvailableForSaleSecuritiesLineItems_2fb82e0e-6f54-406d-82c1-9a47eb03e8be" xlink:to="loc_us-gaap_ProceedsFromSaleOfAvailableForSaleSecuritiesDebt_958ca8b1-e72e-4f2f-8548-1a5e1004aab8" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_AvailableForSaleSecuritiesInLossPositionForMoreThan12MonthsQualitativeDisclosurePercentOfAmortizedCost_1475105a-c1d0-4f03-b618-e7ce1f5db6db" xlink:href="agm-20240331.xsd#agm_AvailableForSaleSecuritiesInLossPositionForMoreThan12MonthsQualitativeDisclosurePercentOfAmortizedCost"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ScheduleOfAvailableForSaleSecuritiesLineItems_2fb82e0e-6f54-406d-82c1-9a47eb03e8be" xlink:to="loc_agm_AvailableForSaleSecuritiesInLossPositionForMoreThan12MonthsQualitativeDisclosurePercentOfAmortizedCost_1475105a-c1d0-4f03-b618-e7ce1f5db6db" xlink:type="arc" order="1"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.farmermac.com/role/INVESTMENTSECURITIESUnrealizedLossPositionDetails" xlink:type="simple" xlink:href="agm-20240331.xsd#INVESTMENTSECURITIESUnrealizedLossPositionDetails"/>
  <link:definitionLink xlink:role="http://www.farmermac.com/role/INVESTMENTSECURITIESUnrealizedLossPositionDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ScheduleOfAvailableForSaleSecuritiesLineItems_93984e57-93dc-46b8-b43f-e48d57e83523" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ScheduleOfAvailableForSaleSecuritiesLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleTable_1fac2240-c35e-4922-a972-f1b65b609c27" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtSecuritiesAvailableForSaleTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_ScheduleOfAvailableForSaleSecuritiesLineItems_93984e57-93dc-46b8-b43f-e48d57e83523" xlink:to="loc_us-gaap_DebtSecuritiesAvailableForSaleTable_1fac2240-c35e-4922-a972-f1b65b609c27" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_ProductOrServiceAxis_421317c6-9c42-4ac3-a005-7793a114c94c" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_ProductOrServiceAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_DebtSecuritiesAvailableForSaleTable_1fac2240-c35e-4922-a972-f1b65b609c27" xlink:to="loc_srt_ProductOrServiceAxis_421317c6-9c42-4ac3-a005-7793a114c94c" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_ProductsAndServicesDomain_421317c6-9c42-4ac3-a005-7793a114c94c_default" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_ProductsAndServicesDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_srt_ProductOrServiceAxis_421317c6-9c42-4ac3-a005-7793a114c94c" xlink:to="loc_srt_ProductsAndServicesDomain_421317c6-9c42-4ac3-a005-7793a114c94c_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_ProductsAndServicesDomain_da49f5e2-511c-4171-90cb-eedfb08a03ac" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_ProductsAndServicesDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_srt_ProductOrServiceAxis_421317c6-9c42-4ac3-a005-7793a114c94c" xlink:to="loc_srt_ProductsAndServicesDomain_da49f5e2-511c-4171-90cb-eedfb08a03ac" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_FloatingInterestRateMember_4c288874-8812-4665-b0c2-70517d61f1e1" xlink:href="agm-20240331.xsd#agm_FloatingInterestRateMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_ProductsAndServicesDomain_da49f5e2-511c-4171-90cb-eedfb08a03ac" xlink:to="loc_agm_FloatingInterestRateMember_4c288874-8812-4665-b0c2-70517d61f1e1" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_FixedInterestRateMember_95e3c5a9-ec5f-457a-8131-640ba5a065c9" xlink:href="agm-20240331.xsd#agm_FixedInterestRateMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_ProductsAndServicesDomain_da49f5e2-511c-4171-90cb-eedfb08a03ac" xlink:to="loc_agm_FixedInterestRateMember_95e3c5a9-ec5f-457a-8131-640ba5a065c9" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinancialInstrumentAxis_ee7c6c94-8336-4a1b-82e4-3bcbace1a6b9" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FinancialInstrumentAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_DebtSecuritiesAvailableForSaleTable_1fac2240-c35e-4922-a972-f1b65b609c27" xlink:to="loc_us-gaap_FinancialInstrumentAxis_ee7c6c94-8336-4a1b-82e4-3bcbace1a6b9" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_ee7c6c94-8336-4a1b-82e4-3bcbace1a6b9_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_FinancialInstrumentAxis_ee7c6c94-8336-4a1b-82e4-3bcbace1a6b9" xlink:to="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_ee7c6c94-8336-4a1b-82e4-3bcbace1a6b9_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_da163beb-d6ae-41b0-b8d2-99eda5fe1081" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_FinancialInstrumentAxis_ee7c6c94-8336-4a1b-82e4-3bcbace1a6b9" xlink:to="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_da163beb-d6ae-41b0-b8d2-99eda5fe1081" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesMember_202fb59d-70d6-4891-81c5-e0937ecaee43" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtSecuritiesMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_da163beb-d6ae-41b0-b8d2-99eda5fe1081" xlink:to="loc_us-gaap_DebtSecuritiesMember_202fb59d-70d6-4891-81c5-e0937ecaee43" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AuctionRateSecuritiesMember_8af681f7-0806-4a70-b3d2-23c12eee7d76" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AuctionRateSecuritiesMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtSecuritiesMember_202fb59d-70d6-4891-81c5-e0937ecaee43" xlink:to="loc_us-gaap_AuctionRateSecuritiesMember_8af681f7-0806-4a70-b3d2-23c12eee7d76" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_MortgageBackedSecuritiesMember_86f4d34a-384d-4331-b925-7b06b0eca71a" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_MortgageBackedSecuritiesMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtSecuritiesMember_202fb59d-70d6-4891-81c5-e0937ecaee43" xlink:to="loc_us-gaap_MortgageBackedSecuritiesMember_86f4d34a-384d-4331-b925-7b06b0eca71a" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_USTreasurySecuritiesMember_3640c2df-69ce-4c8a-8bd7-72615adf37d5" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_USTreasurySecuritiesMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtSecuritiesMember_202fb59d-70d6-4891-81c5-e0937ecaee43" xlink:to="loc_us-gaap_USTreasurySecuritiesMember_3640c2df-69ce-4c8a-8bd7-72615adf37d5" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPositionLessThan12Months_50eee5f2-a079-468e-b2b2-2c7943f42861" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPositionLessThan12Months"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ScheduleOfAvailableForSaleSecuritiesLineItems_93984e57-93dc-46b8-b43f-e48d57e83523" xlink:to="loc_us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPositionLessThan12Months_50eee5f2-a079-468e-b2b2-2c7943f42861" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPositionLessThan12MonthsAccumulatedLoss_299e370a-7dde-4dfc-8104-b54944861991" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPositionLessThan12MonthsAccumulatedLoss"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ScheduleOfAvailableForSaleSecuritiesLineItems_93984e57-93dc-46b8-b43f-e48d57e83523" xlink:to="loc_us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPositionLessThan12MonthsAccumulatedLoss_299e370a-7dde-4dfc-8104-b54944861991" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPositionLessThan12MonthsNumberOfPositions_564d858e-787c-4bcb-8926-00be65ac9245" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPositionLessThan12MonthsNumberOfPositions"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ScheduleOfAvailableForSaleSecuritiesLineItems_93984e57-93dc-46b8-b43f-e48d57e83523" xlink:to="loc_us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPositionLessThan12MonthsNumberOfPositions_564d858e-787c-4bcb-8926-00be65ac9245" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPosition12MonthsOrLonger_e84c960d-2a9b-4615-bc07-ec36c3150a72" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPosition12MonthsOrLonger"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ScheduleOfAvailableForSaleSecuritiesLineItems_93984e57-93dc-46b8-b43f-e48d57e83523" xlink:to="loc_us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPosition12MonthsOrLonger_e84c960d-2a9b-4615-bc07-ec36c3150a72" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPosition12MonthsOrLongerAccumulatedLoss_9375e255-e5c1-4a06-a3a1-73959eac37be" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPosition12MonthsOrLongerAccumulatedLoss"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ScheduleOfAvailableForSaleSecuritiesLineItems_93984e57-93dc-46b8-b43f-e48d57e83523" xlink:to="loc_us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPosition12MonthsOrLongerAccumulatedLoss_9375e255-e5c1-4a06-a3a1-73959eac37be" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPosition12MonthsOrLongerNumberOfPositions_b6bc15b2-852a-4ce4-862d-b0bddbb1bee3" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPosition12MonthsOrLongerNumberOfPositions"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ScheduleOfAvailableForSaleSecuritiesLineItems_93984e57-93dc-46b8-b43f-e48d57e83523" xlink:to="loc_us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPosition12MonthsOrLongerNumberOfPositions_b6bc15b2-852a-4ce4-862d-b0bddbb1bee3" xlink:type="arc" order="5"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.farmermac.com/role/INVESTMENTSECURITIESDebtMaturitiesDetails" xlink:type="simple" xlink:href="agm-20240331.xsd#INVESTMENTSECURITIESDebtMaturitiesDetails"/>
  <link:definitionLink xlink:role="http://www.farmermac.com/role/INVESTMENTSECURITIESDebtMaturitiesDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ScheduleOfAvailableForSaleSecuritiesLineItems_26cb7d03-3296-4370-b0e8-dc4ff107b8ad" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ScheduleOfAvailableForSaleSecuritiesLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleTable_19e5fde6-dd40-4521-9d9c-21c03f656699" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtSecuritiesAvailableForSaleTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_ScheduleOfAvailableForSaleSecuritiesLineItems_26cb7d03-3296-4370-b0e8-dc4ff107b8ad" xlink:to="loc_us-gaap_DebtSecuritiesAvailableForSaleTable_19e5fde6-dd40-4521-9d9c-21c03f656699" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinancialInstrumentAxis_52408305-b4bd-48fb-8c57-a3468cc64b26" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FinancialInstrumentAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_DebtSecuritiesAvailableForSaleTable_19e5fde6-dd40-4521-9d9c-21c03f656699" xlink:to="loc_us-gaap_FinancialInstrumentAxis_52408305-b4bd-48fb-8c57-a3468cc64b26" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_52408305-b4bd-48fb-8c57-a3468cc64b26_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_FinancialInstrumentAxis_52408305-b4bd-48fb-8c57-a3468cc64b26" xlink:to="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_52408305-b4bd-48fb-8c57-a3468cc64b26_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_cd25c15a-b70a-40a6-be61-924d47215863" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_FinancialInstrumentAxis_52408305-b4bd-48fb-8c57-a3468cc64b26" xlink:to="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_cd25c15a-b70a-40a6-be61-924d47215863" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesMember_8a1f1890-ae84-42f4-991a-b706582f971f" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtSecuritiesMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_cd25c15a-b70a-40a6-be61-924d47215863" xlink:to="loc_us-gaap_DebtSecuritiesMember_8a1f1890-ae84-42f4-991a-b706582f971f" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesSingleMaturityDateAmortizedCostBasisAbstract_329ede7a-cd84-4a88-8991-19a0eed45049" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AvailableForSaleSecuritiesDebtMaturitiesSingleMaturityDateAmortizedCostBasisAbstract"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ScheduleOfAvailableForSaleSecuritiesLineItems_26cb7d03-3296-4370-b0e8-dc4ff107b8ad" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesSingleMaturityDateAmortizedCostBasisAbstract_329ede7a-cd84-4a88-8991-19a0eed45049" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesWithinOneYearAmortizedCost_32825206-9c09-4190-9c1a-e2996bb224e5" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AvailableForSaleSecuritiesDebtMaturitiesWithinOneYearAmortizedCost"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesSingleMaturityDateAmortizedCostBasisAbstract_329ede7a-cd84-4a88-8991-19a0eed45049" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesWithinOneYearAmortizedCost_32825206-9c09-4190-9c1a-e2996bb224e5" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterOneThroughFiveYearsAmortizedCost_8da1e175-cf57-4f7b-8c31-f728e5ae629c" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterOneThroughFiveYearsAmortizedCost"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesSingleMaturityDateAmortizedCostBasisAbstract_329ede7a-cd84-4a88-8991-19a0eed45049" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterOneThroughFiveYearsAmortizedCost_8da1e175-cf57-4f7b-8c31-f728e5ae629c" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterFiveThroughTenYearsAmortizedCost_3eb9f0f1-9c21-4783-9fb0-635962958e22" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterFiveThroughTenYearsAmortizedCost"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesSingleMaturityDateAmortizedCostBasisAbstract_329ede7a-cd84-4a88-8991-19a0eed45049" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterFiveThroughTenYearsAmortizedCost_3eb9f0f1-9c21-4783-9fb0-635962958e22" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterTenYearsAmortizedCost_1a007ae7-f61d-4f1b-84da-7b58c24b0cd8" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterTenYearsAmortizedCost"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesSingleMaturityDateAmortizedCostBasisAbstract_329ede7a-cd84-4a88-8991-19a0eed45049" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterTenYearsAmortizedCost_1a007ae7-f61d-4f1b-84da-7b58c24b0cd8" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleAmortizedCostExcludingAccruedInterestBeforeAllowanceForCreditLoss_90421121-a0c4-43cd-86de-5381688723aa" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtSecuritiesAvailableForSaleAmortizedCostExcludingAccruedInterestBeforeAllowanceForCreditLoss"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesSingleMaturityDateAmortizedCostBasisAbstract_329ede7a-cd84-4a88-8991-19a0eed45049" xlink:to="loc_us-gaap_DebtSecuritiesAvailableForSaleAmortizedCostExcludingAccruedInterestBeforeAllowanceForCreditLoss_90421121-a0c4-43cd-86de-5381688723aa" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesSingleMaturityDateAbstract_bfb7d443-622f-444e-88b6-181ff8e54658" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AvailableForSaleSecuritiesDebtMaturitiesSingleMaturityDateAbstract"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ScheduleOfAvailableForSaleSecuritiesLineItems_26cb7d03-3296-4370-b0e8-dc4ff107b8ad" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesSingleMaturityDateAbstract_bfb7d443-622f-444e-88b6-181ff8e54658" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesWithinOneYearFairValue_03e70293-d06d-4447-b711-30670e6cdcf6" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AvailableForSaleSecuritiesDebtMaturitiesWithinOneYearFairValue"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesSingleMaturityDateAbstract_bfb7d443-622f-444e-88b6-181ff8e54658" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesWithinOneYearFairValue_03e70293-d06d-4447-b711-30670e6cdcf6" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterOneThroughFiveYearsFairValue_fa9118e6-fa13-4298-a584-f01a1cb2b231" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterOneThroughFiveYearsFairValue"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesSingleMaturityDateAbstract_bfb7d443-622f-444e-88b6-181ff8e54658" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterOneThroughFiveYearsFairValue_fa9118e6-fa13-4298-a584-f01a1cb2b231" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterFiveThroughTenYearsFairValue_9dd6e56a-b66e-4f90-9fc0-2bb67cb581b5" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterFiveThroughTenYearsFairValue"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesSingleMaturityDateAbstract_bfb7d443-622f-444e-88b6-181ff8e54658" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterFiveThroughTenYearsFairValue_9dd6e56a-b66e-4f90-9fc0-2bb67cb581b5" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterTenYearsFairValue_37c79048-0e98-4263-be84-d9a76eb560fc" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterTenYearsFairValue"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesSingleMaturityDateAbstract_bfb7d443-622f-444e-88b6-181ff8e54658" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterTenYearsFairValue_37c79048-0e98-4263-be84-d9a76eb560fc" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleExcludingAccruedInterest_230c5b2b-5ee8-42f9-a8ad-d090237ead90" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtSecuritiesAvailableForSaleExcludingAccruedInterest"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesSingleMaturityDateAbstract_bfb7d443-622f-444e-88b6-181ff8e54658" xlink:to="loc_us-gaap_DebtSecuritiesAvailableForSaleExcludingAccruedInterest_230c5b2b-5ee8-42f9-a8ad-d090237ead90" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_AvailableforsaleSecuritiesDebtMaturitiesWeightedAverageYieldSingleMaturityDateAbstract_d53c7afe-ef32-419d-9b25-36ec42b8f642" xlink:href="agm-20240331.xsd#agm_AvailableforsaleSecuritiesDebtMaturitiesWeightedAverageYieldSingleMaturityDateAbstract"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ScheduleOfAvailableForSaleSecuritiesLineItems_26cb7d03-3296-4370-b0e8-dc4ff107b8ad" xlink:to="loc_agm_AvailableforsaleSecuritiesDebtMaturitiesWeightedAverageYieldSingleMaturityDateAbstract_d53c7afe-ef32-419d-9b25-36ec42b8f642" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_AvailableForSaleSecuritiesDebtMaturitiesNextTwelveMonthsWeightedAverageYield_0ae95cbd-8559-4e39-b157-802a07c2da44" xlink:href="agm-20240331.xsd#agm_AvailableForSaleSecuritiesDebtMaturitiesNextTwelveMonthsWeightedAverageYield"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_agm_AvailableforsaleSecuritiesDebtMaturitiesWeightedAverageYieldSingleMaturityDateAbstract_d53c7afe-ef32-419d-9b25-36ec42b8f642" xlink:to="loc_agm_AvailableForSaleSecuritiesDebtMaturitiesNextTwelveMonthsWeightedAverageYield_0ae95cbd-8559-4e39-b157-802a07c2da44" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_AvailableForSaleSecuritiesDebtMaturitiesYearTwoThroughFiveWeightedAverageYield_8b7fcee2-20ab-41b4-88a4-a0da059f120f" xlink:href="agm-20240331.xsd#agm_AvailableForSaleSecuritiesDebtMaturitiesYearTwoThroughFiveWeightedAverageYield"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_agm_AvailableforsaleSecuritiesDebtMaturitiesWeightedAverageYieldSingleMaturityDateAbstract_d53c7afe-ef32-419d-9b25-36ec42b8f642" xlink:to="loc_agm_AvailableForSaleSecuritiesDebtMaturitiesYearTwoThroughFiveWeightedAverageYield_8b7fcee2-20ab-41b4-88a4-a0da059f120f" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_AvailableForSaleSecuritiesDebtMaturitiesYearSixThroughTenWeightedAverageYield_e63464c8-58bb-4d1f-9683-9d8a29f27762" xlink:href="agm-20240331.xsd#agm_AvailableForSaleSecuritiesDebtMaturitiesYearSixThroughTenWeightedAverageYield"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_agm_AvailableforsaleSecuritiesDebtMaturitiesWeightedAverageYieldSingleMaturityDateAbstract_d53c7afe-ef32-419d-9b25-36ec42b8f642" xlink:to="loc_agm_AvailableForSaleSecuritiesDebtMaturitiesYearSixThroughTenWeightedAverageYield_e63464c8-58bb-4d1f-9683-9d8a29f27762" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_AvailableForSaleSecuritiesDebtMaturitiesAfterTenYearsWeightedAverageYield_98e8a11a-2d88-4529-807a-0db3edfbc8da" xlink:href="agm-20240331.xsd#agm_AvailableForSaleSecuritiesDebtMaturitiesAfterTenYearsWeightedAverageYield"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_agm_AvailableforsaleSecuritiesDebtMaturitiesWeightedAverageYieldSingleMaturityDateAbstract_d53c7afe-ef32-419d-9b25-36ec42b8f642" xlink:to="loc_agm_AvailableForSaleSecuritiesDebtMaturitiesAfterTenYearsWeightedAverageYield_98e8a11a-2d88-4529-807a-0db3edfbc8da" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_AvailableForSaleSecuritiesDebtMaturitiesWeightedAverageYield_708775b3-b3b5-478c-9a79-e7c68c279114" xlink:href="agm-20240331.xsd#agm_AvailableForSaleSecuritiesDebtMaturitiesWeightedAverageYield"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_agm_AvailableforsaleSecuritiesDebtMaturitiesWeightedAverageYieldSingleMaturityDateAbstract_d53c7afe-ef32-419d-9b25-36ec42b8f642" xlink:to="loc_agm_AvailableForSaleSecuritiesDebtMaturitiesWeightedAverageYield_708775b3-b3b5-478c-9a79-e7c68c279114" xlink:type="arc" order="5"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.farmermac.com/role/FARMERMACGUARANTEEDSECURITIESANDUSDASECURITIESScheduleofOnBalanceSheetSecuritiesDetails" xlink:type="simple" xlink:href="agm-20240331.xsd#FARMERMACGUARANTEEDSECURITIESANDUSDASECURITIESScheduleofOnBalanceSheetSecuritiesDetails"/>
  <link:definitionLink xlink:role="http://www.farmermac.com/role/FARMERMACGUARANTEEDSECURITIESANDUSDASECURITIESScheduleofOnBalanceSheetSecuritiesDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_agm_ScheduleofHeldtoMaturityAvailableforsaleandTradingSecuritiesLineItems_90ad1ee2-1d8d-46f5-a70f-1728e4d32db9" xlink:href="agm-20240331.xsd#agm_ScheduleofHeldtoMaturityAvailableforsaleandTradingSecuritiesLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_ScheduleofHeldtoMaturityAvailableforsaleandTradingSecuritiesTable_db0186c4-2d95-408d-bf7a-467dcae3b71b" xlink:href="agm-20240331.xsd#agm_ScheduleofHeldtoMaturityAvailableforsaleandTradingSecuritiesTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_agm_ScheduleofHeldtoMaturityAvailableforsaleandTradingSecuritiesLineItems_90ad1ee2-1d8d-46f5-a70f-1728e4d32db9" xlink:to="loc_agm_ScheduleofHeldtoMaturityAvailableforsaleandTradingSecuritiesTable_db0186c4-2d95-408d-bf7a-467dcae3b71b" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StatementBusinessSegmentsAxis_110f0d8b-e787-466e-982a-4152fe01bacd" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_StatementBusinessSegmentsAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_agm_ScheduleofHeldtoMaturityAvailableforsaleandTradingSecuritiesTable_db0186c4-2d95-408d-bf7a-467dcae3b71b" xlink:to="loc_us-gaap_StatementBusinessSegmentsAxis_110f0d8b-e787-466e-982a-4152fe01bacd" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SegmentDomain_110f0d8b-e787-466e-982a-4152fe01bacd_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SegmentDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementBusinessSegmentsAxis_110f0d8b-e787-466e-982a-4152fe01bacd" xlink:to="loc_us-gaap_SegmentDomain_110f0d8b-e787-466e-982a-4152fe01bacd_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SegmentDomain_eb9fe55b-d813-47bb-8417-8d47090ad6db" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SegmentDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementBusinessSegmentsAxis_110f0d8b-e787-466e-982a-4152fe01bacd" xlink:to="loc_us-gaap_SegmentDomain_eb9fe55b-d813-47bb-8417-8d47090ad6db" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_AgVantageMember_40ba0d1e-e6a6-4298-9a5c-ff2cdbfc8e85" xlink:href="agm-20240331.xsd#agm_AgVantageMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_eb9fe55b-d813-47bb-8417-8d47090ad6db" xlink:to="loc_agm_AgVantageMember_40ba0d1e-e6a6-4298-9a5c-ff2cdbfc8e85" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_FarmerMacGuaranteedSecuritiesMember_15d5b74a-942d-4e13-9fe6-6727a72a7882" xlink:href="agm-20240331.xsd#agm_FarmerMacGuaranteedSecuritiesMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_eb9fe55b-d813-47bb-8417-8d47090ad6db" xlink:to="loc_agm_FarmerMacGuaranteedSecuritiesMember_15d5b74a-942d-4e13-9fe6-6727a72a7882" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FairValueByAssetClassAxis_55c1ef0a-8bf4-4568-ad69-5c2a84c67cdd" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FairValueByAssetClassAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_agm_ScheduleofHeldtoMaturityAvailableforsaleandTradingSecuritiesTable_db0186c4-2d95-408d-bf7a-467dcae3b71b" xlink:to="loc_us-gaap_FairValueByAssetClassAxis_55c1ef0a-8bf4-4568-ad69-5c2a84c67cdd" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FairValueAssetsMeasuredOnRecurringBasisUnobservableInputReconciliationByAssetClassDomain_55c1ef0a-8bf4-4568-ad69-5c2a84c67cdd_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FairValueAssetsMeasuredOnRecurringBasisUnobservableInputReconciliationByAssetClassDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_FairValueByAssetClassAxis_55c1ef0a-8bf4-4568-ad69-5c2a84c67cdd" xlink:to="loc_us-gaap_FairValueAssetsMeasuredOnRecurringBasisUnobservableInputReconciliationByAssetClassDomain_55c1ef0a-8bf4-4568-ad69-5c2a84c67cdd_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FairValueAssetsMeasuredOnRecurringBasisUnobservableInputReconciliationByAssetClassDomain_e9dbd78f-84ef-4d2b-9d5f-351a05cfd9dd" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FairValueAssetsMeasuredOnRecurringBasisUnobservableInputReconciliationByAssetClassDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_FairValueByAssetClassAxis_55c1ef0a-8bf4-4568-ad69-5c2a84c67cdd" xlink:to="loc_us-gaap_FairValueAssetsMeasuredOnRecurringBasisUnobservableInputReconciliationByAssetClassDomain_e9dbd78f-84ef-4d2b-9d5f-351a05cfd9dd" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_USGovernmentSponsoredEnterprisesDebtSecuritiesMember_cf1348da-f74f-4bbd-ae4d-c6d8ff99f86c" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_USGovernmentSponsoredEnterprisesDebtSecuritiesMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueAssetsMeasuredOnRecurringBasisUnobservableInputReconciliationByAssetClassDomain_e9dbd78f-84ef-4d2b-9d5f-351a05cfd9dd" xlink:to="loc_us-gaap_USGovernmentSponsoredEnterprisesDebtSecuritiesMember_cf1348da-f74f-4bbd-ae4d-c6d8ff99f86c" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_DebtSecurityInvestmentCategoryAxis_9c19c5ce-7241-40a9-b24a-5bcf21074799" xlink:href="agm-20240331.xsd#agm_DebtSecurityInvestmentCategoryAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_agm_ScheduleofHeldtoMaturityAvailableforsaleandTradingSecuritiesTable_db0186c4-2d95-408d-bf7a-467dcae3b71b" xlink:to="loc_agm_DebtSecurityInvestmentCategoryAxis_9c19c5ce-7241-40a9-b24a-5bcf21074799" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_DebtSecurityInvestmentCategoryDomain_9c19c5ce-7241-40a9-b24a-5bcf21074799_default" xlink:href="agm-20240331.xsd#agm_DebtSecurityInvestmentCategoryDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_agm_DebtSecurityInvestmentCategoryAxis_9c19c5ce-7241-40a9-b24a-5bcf21074799" xlink:to="loc_agm_DebtSecurityInvestmentCategoryDomain_9c19c5ce-7241-40a9-b24a-5bcf21074799_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_DebtSecurityInvestmentCategoryDomain_51fb7a38-8041-419f-8550-5f8b0ae0e3ab" xlink:href="agm-20240331.xsd#agm_DebtSecurityInvestmentCategoryDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_agm_DebtSecurityInvestmentCategoryAxis_9c19c5ce-7241-40a9-b24a-5bcf21074799" xlink:to="loc_agm_DebtSecurityInvestmentCategoryDomain_51fb7a38-8041-419f-8550-5f8b0ae0e3ab" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_DebtSecuritiesHeldToMaturityMember_8cbaafa7-73a4-4c7a-9640-add4fe98bce8" xlink:href="agm-20240331.xsd#agm_DebtSecuritiesHeldToMaturityMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_agm_DebtSecurityInvestmentCategoryDomain_51fb7a38-8041-419f-8550-5f8b0ae0e3ab" xlink:to="loc_agm_DebtSecuritiesHeldToMaturityMember_8cbaafa7-73a4-4c7a-9640-add4fe98bce8" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_DebtSecuritiesAvailableForSaleMember_29748139-750a-4c93-a8f9-7521ec828da3" xlink:href="agm-20240331.xsd#agm_DebtSecuritiesAvailableForSaleMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_agm_DebtSecurityInvestmentCategoryDomain_51fb7a38-8041-419f-8550-5f8b0ae0e3ab" xlink:to="loc_agm_DebtSecuritiesAvailableForSaleMember_29748139-750a-4c93-a8f9-7521ec828da3" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_DebtSecuritiesTradingMember_9438f38d-37d4-4a54-8a64-b9acd53c83a2" xlink:href="agm-20240331.xsd#agm_DebtSecuritiesTradingMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_agm_DebtSecurityInvestmentCategoryDomain_51fb7a38-8041-419f-8550-5f8b0ae0e3ab" xlink:to="loc_agm_DebtSecuritiesTradingMember_9438f38d-37d4-4a54-8a64-b9acd53c83a2" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinancialInstrumentAxis_5e8510f2-ca9c-4ee4-886f-142a9c590321" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FinancialInstrumentAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_agm_ScheduleofHeldtoMaturityAvailableforsaleandTradingSecuritiesTable_db0186c4-2d95-408d-bf7a-467dcae3b71b" xlink:to="loc_us-gaap_FinancialInstrumentAxis_5e8510f2-ca9c-4ee4-886f-142a9c590321" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_5e8510f2-ca9c-4ee4-886f-142a9c590321_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_FinancialInstrumentAxis_5e8510f2-ca9c-4ee4-886f-142a9c590321" xlink:to="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_5e8510f2-ca9c-4ee4-886f-142a9c590321_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_3064d9d2-1d93-431e-9835-23a35c8a4f76" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_FinancialInstrumentAxis_5e8510f2-ca9c-4ee4-886f-142a9c590321" xlink:to="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_3064d9d2-1d93-431e-9835-23a35c8a4f76" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_USGovernmentSponsoredEnterprisesDebtSecuritiesMember_9e742681-4080-4585-a25a-25fe17ca9cff" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_USGovernmentSponsoredEnterprisesDebtSecuritiesMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_3064d9d2-1d93-431e-9835-23a35c8a4f76" xlink:to="loc_us-gaap_USGovernmentSponsoredEnterprisesDebtSecuritiesMember_9e742681-4080-4585-a25a-25fe17ca9cff" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_USGovernmentAgenciesDebtSecuritiesMember_e1e1b62e-cb04-418c-8299-e0b7ccd79904" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_USGovernmentAgenciesDebtSecuritiesMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_3064d9d2-1d93-431e-9835-23a35c8a4f76" xlink:to="loc_us-gaap_USGovernmentAgenciesDebtSecuritiesMember_e1e1b62e-cb04-418c-8299-e0b7ccd79904" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_USTreasuryAndGovernmentMember_d4a9f7f7-62c7-4eee-865d-971b36f3a459" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_USTreasuryAndGovernmentMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_3064d9d2-1d93-431e-9835-23a35c8a4f76" xlink:to="loc_us-gaap_USTreasuryAndGovernmentMember_d4a9f7f7-62c7-4eee-865d-971b36f3a459" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_MortgageBackedSecuritiesIssuedByUSGovernmentSponsoredEnterprisesMember_9384fded-3ff9-46ab-96a3-fc17c1888a7d" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_MortgageBackedSecuritiesIssuedByUSGovernmentSponsoredEnterprisesMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_3064d9d2-1d93-431e-9835-23a35c8a4f76" xlink:to="loc_us-gaap_MortgageBackedSecuritiesIssuedByUSGovernmentSponsoredEnterprisesMember_9384fded-3ff9-46ab-96a3-fc17c1888a7d" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_HeldToMaturitySecuritiesAbstract_df343fa7-5477-46e1-8a6c-a917a91136f7" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_HeldToMaturitySecuritiesAbstract"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_agm_ScheduleofHeldtoMaturityAvailableforsaleandTradingSecuritiesLineItems_90ad1ee2-1d8d-46f5-a70f-1728e4d32db9" xlink:to="loc_us-gaap_HeldToMaturitySecuritiesAbstract_df343fa7-5477-46e1-8a6c-a917a91136f7" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_HeldToMaturityUnpaidPrincipalBalance_9b5662f2-0684-4dad-b458-59f4c3eafeaf" xlink:href="agm-20240331.xsd#agm_HeldToMaturityUnpaidPrincipalBalance"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_HeldToMaturitySecuritiesAbstract_df343fa7-5477-46e1-8a6c-a917a91136f7" xlink:to="loc_agm_HeldToMaturityUnpaidPrincipalBalance_9b5662f2-0684-4dad-b458-59f4c3eafeaf" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtInstrumentUnamortizedDiscountPremiumNet_3714e4d6-1726-4e78-8f51-18a357728a8d" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtInstrumentUnamortizedDiscountPremiumNet"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_HeldToMaturitySecuritiesAbstract_df343fa7-5477-46e1-8a6c-a917a91136f7" xlink:to="loc_us-gaap_DebtInstrumentUnamortizedDiscountPremiumNet_3714e4d6-1726-4e78-8f51-18a357728a8d" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_DebtSecuritiesHeldToMaturityAmortizedCostExcludingAccruedInterestBeforeAllowanceForCreditLoss_a2a82000-f579-4515-98e1-a8be2573271c" xlink:href="agm-20240331.xsd#agm_DebtSecuritiesHeldToMaturityAmortizedCostExcludingAccruedInterestBeforeAllowanceForCreditLoss"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_HeldToMaturitySecuritiesAbstract_df343fa7-5477-46e1-8a6c-a917a91136f7" xlink:to="loc_agm_DebtSecuritiesHeldToMaturityAmortizedCostExcludingAccruedInterestBeforeAllowanceForCreditLoss_a2a82000-f579-4515-98e1-a8be2573271c" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesHeldToMaturityAllowanceForCreditLossExcludingAccruedInterest_7ef3e2ba-3efc-4737-b13f-8d442bef12d9" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtSecuritiesHeldToMaturityAllowanceForCreditLossExcludingAccruedInterest"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_HeldToMaturitySecuritiesAbstract_df343fa7-5477-46e1-8a6c-a917a91136f7" xlink:to="loc_us-gaap_DebtSecuritiesHeldToMaturityAllowanceForCreditLossExcludingAccruedInterest_7ef3e2ba-3efc-4737-b13f-8d442bef12d9" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_HeldToMaturitySecuritiesAccumulatedUnrecognizedHoldingGain_aded9269-0071-4102-be5c-410252465cc7" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_HeldToMaturitySecuritiesAccumulatedUnrecognizedHoldingGain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_HeldToMaturitySecuritiesAbstract_df343fa7-5477-46e1-8a6c-a917a91136f7" xlink:to="loc_us-gaap_HeldToMaturitySecuritiesAccumulatedUnrecognizedHoldingGain_aded9269-0071-4102-be5c-410252465cc7" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_HeldToMaturitySecuritiesAccumulatedUnrecognizedHoldingLoss_1d668661-2c71-4c7b-a4d1-8167bfc8a8cf" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_HeldToMaturitySecuritiesAccumulatedUnrecognizedHoldingLoss"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_HeldToMaturitySecuritiesAbstract_df343fa7-5477-46e1-8a6c-a917a91136f7" xlink:to="loc_us-gaap_HeldToMaturitySecuritiesAccumulatedUnrecognizedHoldingLoss_1d668661-2c71-4c7b-a4d1-8167bfc8a8cf" xlink:type="arc" order="6"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_DebtSecuritiesHeldToMaturityFairValueNetOfAllowance_eca64a94-f98e-46b5-8c5a-aa8ac564a4ff" xlink:href="agm-20240331.xsd#agm_DebtSecuritiesHeldToMaturityFairValueNetOfAllowance"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_HeldToMaturitySecuritiesAbstract_df343fa7-5477-46e1-8a6c-a917a91136f7" xlink:to="loc_agm_DebtSecuritiesHeldToMaturityFairValueNetOfAllowance_eca64a94-f98e-46b5-8c5a-aa8ac564a4ff" xlink:type="arc" order="7"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesAbstract_f5c1c653-d204-451a-9a54-850487eade77" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AvailableForSaleSecuritiesAbstract"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_agm_ScheduleofHeldtoMaturityAvailableforsaleandTradingSecuritiesLineItems_90ad1ee2-1d8d-46f5-a70f-1728e4d32db9" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesAbstract_f5c1c653-d204-451a-9a54-850487eade77" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_DebtSecuritiesAvailableForSaleUnpaidPrincipalBalance_3fa6d4ba-f968-40cf-a000-a2620e095831" xlink:href="agm-20240331.xsd#agm_DebtSecuritiesAvailableForSaleUnpaidPrincipalBalance"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AvailableForSaleSecuritiesAbstract_f5c1c653-d204-451a-9a54-850487eade77" xlink:to="loc_agm_DebtSecuritiesAvailableForSaleUnpaidPrincipalBalance_3fa6d4ba-f968-40cf-a000-a2620e095831" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtInstrumentUnamortizedDiscountPremiumNet_e38485fb-1772-449f-adf9-4dee5c5a85a4" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtInstrumentUnamortizedDiscountPremiumNet"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleAmortizedCostExcludingAccruedInterestBeforeAllowanceForCreditLoss_a5176fe5-7956-4b01-82ec-e6d122b9b3b2" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtSecuritiesAvailableForSaleAmortizedCostExcludingAccruedInterestBeforeAllowanceForCreditLoss"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AvailableForSaleSecuritiesAbstract_f5c1c653-d204-451a-9a54-850487eade77" xlink:to="loc_us-gaap_DebtSecuritiesAvailableForSaleAmortizedCostExcludingAccruedInterestBeforeAllowanceForCreditLoss_a5176fe5-7956-4b01-82ec-e6d122b9b3b2" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleAmortizedCostAllowanceForCreditLossExcludingAccruedInterest_0adb77b0-faea-4cbe-93ba-e68a838c8077" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtSecuritiesAvailableForSaleAmortizedCostAllowanceForCreditLossExcludingAccruedInterest"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AvailableForSaleSecuritiesAbstract_f5c1c653-d204-451a-9a54-850487eade77" xlink:to="loc_us-gaap_DebtSecuritiesAvailableForSaleAmortizedCostAllowanceForCreditLossExcludingAccruedInterest_0adb77b0-faea-4cbe-93ba-e68a838c8077" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleDebtSecuritiesAccumulatedGrossUnrealizedGainBeforeTax_45b61ebc-362e-44a8-8bfc-3a392c051ebc" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AvailableForSaleDebtSecuritiesAccumulatedGrossUnrealizedGainBeforeTax"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AvailableForSaleSecuritiesAbstract_f5c1c653-d204-451a-9a54-850487eade77" xlink:to="loc_us-gaap_AvailableForSaleDebtSecuritiesAccumulatedGrossUnrealizedGainBeforeTax_45b61ebc-362e-44a8-8bfc-3a392c051ebc" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleDebtSecuritiesAccumulatedGrossUnrealizedLossBeforeTax_a269e19f-f9ba-4589-9c00-a8e8fff6516d" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AvailableForSaleDebtSecuritiesAccumulatedGrossUnrealizedLossBeforeTax"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AvailableForSaleSecuritiesAbstract_f5c1c653-d204-451a-9a54-850487eade77" xlink:to="loc_us-gaap_AvailableForSaleDebtSecuritiesAccumulatedGrossUnrealizedLossBeforeTax_a269e19f-f9ba-4589-9c00-a8e8fff6516d" xlink:type="arc" order="6"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleExcludingAccruedInterest_8ac9b902-07d4-4cf7-a6c8-2e32bacaa0fb" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtSecuritiesAvailableForSaleExcludingAccruedInterest"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AvailableForSaleSecuritiesAbstract_f5c1c653-d204-451a-9a54-850487eade77" xlink:to="loc_us-gaap_DebtSecuritiesAvailableForSaleExcludingAccruedInterest_8ac9b902-07d4-4cf7-a6c8-2e32bacaa0fb" xlink:type="arc" order="7"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesTradingAndAvailableForSaleAbstract_be027a0c-1038-4faa-98b8-ede6373a2064" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtSecuritiesTradingAndAvailableForSaleAbstract"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_agm_ScheduleofHeldtoMaturityAvailableforsaleandTradingSecuritiesLineItems_90ad1ee2-1d8d-46f5-a70f-1728e4d32db9" xlink:to="loc_us-gaap_DebtSecuritiesTradingAndAvailableForSaleAbstract_be027a0c-1038-4faa-98b8-ede6373a2064" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_TradingSecuritiesUnpaidPrincipalBalance_0d024378-adda-45e3-b483-5454194f1d34" xlink:href="agm-20240331.xsd#agm_TradingSecuritiesUnpaidPrincipalBalance"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtSecuritiesTradingAndAvailableForSaleAbstract_be027a0c-1038-4faa-98b8-ede6373a2064" xlink:to="loc_agm_TradingSecuritiesUnpaidPrincipalBalance_0d024378-adda-45e3-b483-5454194f1d34" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtInstrumentUnamortizedDiscountPremiumNet_a28304f0-26a8-4194-a821-d01215c75728" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtInstrumentUnamortizedDiscountPremiumNet"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TradingSecuritiesDebtAmortizedCost_2731cacf-2567-4994-86c3-aa96919688db" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_TradingSecuritiesDebtAmortizedCost"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtSecuritiesTradingAndAvailableForSaleAbstract_be027a0c-1038-4faa-98b8-ede6373a2064" xlink:to="loc_us-gaap_TradingSecuritiesDebtAmortizedCost_2731cacf-2567-4994-86c3-aa96919688db" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_DebtSecuritiesTradingAllowanceForCreditLoss_3dc788be-f614-4b9b-8a0c-8d241edca93d" xlink:href="agm-20240331.xsd#agm_DebtSecuritiesTradingAllowanceForCreditLoss"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtSecuritiesTradingAndAvailableForSaleAbstract_be027a0c-1038-4faa-98b8-ede6373a2064" xlink:to="loc_agm_DebtSecuritiesTradingAllowanceForCreditLoss_3dc788be-f614-4b9b-8a0c-8d241edca93d" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesTradingUnrealizedGain_08a30b29-10ad-43fb-ba6f-4a1db663ef0f" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtSecuritiesTradingUnrealizedGain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtSecuritiesTradingAndAvailableForSaleAbstract_be027a0c-1038-4faa-98b8-ede6373a2064" xlink:to="loc_us-gaap_DebtSecuritiesTradingUnrealizedGain_08a30b29-10ad-43fb-ba6f-4a1db663ef0f" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesTradingUnrealizedLoss_c51d254a-43c5-4ed1-aa47-aa114c2e0e05" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtSecuritiesTradingUnrealizedLoss"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtSecuritiesTradingAndAvailableForSaleAbstract_be027a0c-1038-4faa-98b8-ede6373a2064" xlink:to="loc_us-gaap_DebtSecuritiesTradingUnrealizedLoss_c51d254a-43c5-4ed1-aa47-aa114c2e0e05" xlink:type="arc" order="6"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TradingSecurities_e1c2b1c7-32bd-4c86-babb-83d0ae42b9cb" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_TradingSecurities"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtSecuritiesTradingAndAvailableForSaleAbstract_be027a0c-1038-4faa-98b8-ede6373a2064" xlink:to="loc_us-gaap_TradingSecurities_e1c2b1c7-32bd-4c86-babb-83d0ae42b9cb" xlink:type="arc" order="7"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleAccruedInterestAfterAllowanceForCreditLoss_7860be29-2fdb-4548-b5a2-3ab6ee85a769" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtSecuritiesAvailableForSaleAccruedInterestAfterAllowanceForCreditLoss"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_agm_ScheduleofHeldtoMaturityAvailableforsaleandTradingSecuritiesLineItems_90ad1ee2-1d8d-46f5-a70f-1728e4d32db9" xlink:to="loc_us-gaap_DebtSecuritiesAvailableForSaleAccruedInterestAfterAllowanceForCreditLoss_7860be29-2fdb-4548-b5a2-3ab6ee85a769" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesHeldToMaturityAccruedInterestBeforeAllowanceForCreditLoss_d7133602-95c1-4644-940d-a62aa41153f6" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtSecuritiesHeldToMaturityAccruedInterestBeforeAllowanceForCreditLoss"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_agm_ScheduleofHeldtoMaturityAvailableforsaleandTradingSecuritiesLineItems_90ad1ee2-1d8d-46f5-a70f-1728e4d32db9" xlink:to="loc_us-gaap_DebtSecuritiesHeldToMaturityAccruedInterestBeforeAllowanceForCreditLoss_d7133602-95c1-4644-940d-a62aa41153f6" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_DebtSecuritiesTradingAccruedInterest_3d4aa9df-00a4-4d27-89ff-883454a99041" xlink:href="agm-20240331.xsd#agm_DebtSecuritiesTradingAccruedInterest"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_agm_ScheduleofHeldtoMaturityAvailableforsaleandTradingSecuritiesLineItems_90ad1ee2-1d8d-46f5-a70f-1728e4d32db9" xlink:to="loc_agm_DebtSecuritiesTradingAccruedInterest_3d4aa9df-00a4-4d27-89ff-883454a99041" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleAccruedInterestAfterAllowanceForCreditLossStatementOfFinancialPositionExtensibleList_9d7607c1-0635-4310-a085-4efa2fa676f3" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtSecuritiesAvailableForSaleAccruedInterestAfterAllowanceForCreditLossStatementOfFinancialPositionExtensibleList"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_agm_ScheduleofHeldtoMaturityAvailableforsaleandTradingSecuritiesLineItems_90ad1ee2-1d8d-46f5-a70f-1728e4d32db9" xlink:to="loc_us-gaap_DebtSecuritiesAvailableForSaleAccruedInterestAfterAllowanceForCreditLossStatementOfFinancialPositionExtensibleList_9d7607c1-0635-4310-a085-4efa2fa676f3" xlink:type="arc" order="6"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeNotionalAmount_be712c88-0e12-4e71-9733-344e33d4f2c8" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DerivativeNotionalAmount"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_agm_ScheduleofHeldtoMaturityAvailableforsaleandTradingSecuritiesLineItems_90ad1ee2-1d8d-46f5-a70f-1728e4d32db9" xlink:to="loc_us-gaap_DerivativeNotionalAmount_be712c88-0e12-4e71-9733-344e33d4f2c8" xlink:type="arc" order="7"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_TradingSecuritiesWeightedAverageYield_3f8ba330-8b29-48d9-833f-2e0e4807bc05" xlink:href="agm-20240331.xsd#agm_TradingSecuritiesWeightedAverageYield"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_agm_ScheduleofHeldtoMaturityAvailableforsaleandTradingSecuritiesLineItems_90ad1ee2-1d8d-46f5-a70f-1728e4d32db9" xlink:to="loc_agm_TradingSecuritiesWeightedAverageYield_3f8ba330-8b29-48d9-833f-2e0e4807bc05" xlink:type="arc" order="8"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.farmermac.com/role/FARMERMACGUARANTEEDSECURITIESANDUSDASECURITIESNarrativeDetails" xlink:type="simple" xlink:href="agm-20240331.xsd#FARMERMACGUARANTEEDSECURITIESANDUSDASECURITIESNarrativeDetails"/>
  <link:definitionLink xlink:role="http://www.farmermac.com/role/FARMERMACGUARANTEEDSECURITIESANDUSDASECURITIESNarrativeDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ScheduleOfAvailableForSaleSecuritiesLineItems_4d1a9600-2fdd-4f14-b922-ac7a28578207" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ScheduleOfAvailableForSaleSecuritiesLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleTable_2ebd9cdc-62c6-471a-98d8-d339230edde8" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtSecuritiesAvailableForSaleTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_ScheduleOfAvailableForSaleSecuritiesLineItems_4d1a9600-2fdd-4f14-b922-ac7a28578207" xlink:to="loc_us-gaap_DebtSecuritiesAvailableForSaleTable_2ebd9cdc-62c6-471a-98d8-d339230edde8" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinancialInstrumentAxis_d6d6c7c2-30f0-4d5a-8607-c632b0a27f3a" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FinancialInstrumentAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_DebtSecuritiesAvailableForSaleTable_2ebd9cdc-62c6-471a-98d8-d339230edde8" xlink:to="loc_us-gaap_FinancialInstrumentAxis_d6d6c7c2-30f0-4d5a-8607-c632b0a27f3a" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_d6d6c7c2-30f0-4d5a-8607-c632b0a27f3a_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_FinancialInstrumentAxis_d6d6c7c2-30f0-4d5a-8607-c632b0a27f3a" xlink:to="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_d6d6c7c2-30f0-4d5a-8607-c632b0a27f3a_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_f33ade30-0ba3-4ce9-9a85-f6b4cd2b31e5" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_FinancialInstrumentAxis_d6d6c7c2-30f0-4d5a-8607-c632b0a27f3a" xlink:to="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_f33ade30-0ba3-4ce9-9a85-f6b4cd2b31e5" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_USGovernmentSponsoredEnterprisesDebtSecuritiesMember_f65439ca-c2a4-4666-84c8-504a1b295f21" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_USGovernmentSponsoredEnterprisesDebtSecuritiesMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_f33ade30-0ba3-4ce9-9a85-f6b4cd2b31e5" xlink:to="loc_us-gaap_USGovernmentSponsoredEnterprisesDebtSecuritiesMember_f65439ca-c2a4-4666-84c8-504a1b295f21" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StatementBusinessSegmentsAxis_dfe6afc6-1c85-4941-8c17-59ae0597101c" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_StatementBusinessSegmentsAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_DebtSecuritiesAvailableForSaleTable_2ebd9cdc-62c6-471a-98d8-d339230edde8" xlink:to="loc_us-gaap_StatementBusinessSegmentsAxis_dfe6afc6-1c85-4941-8c17-59ae0597101c" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SegmentDomain_dfe6afc6-1c85-4941-8c17-59ae0597101c_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SegmentDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementBusinessSegmentsAxis_dfe6afc6-1c85-4941-8c17-59ae0597101c" xlink:to="loc_us-gaap_SegmentDomain_dfe6afc6-1c85-4941-8c17-59ae0597101c_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SegmentDomain_685e125e-7bef-45ae-94b9-b36e9c8dc970" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SegmentDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementBusinessSegmentsAxis_dfe6afc6-1c85-4941-8c17-59ae0597101c" xlink:to="loc_us-gaap_SegmentDomain_685e125e-7bef-45ae-94b9-b36e9c8dc970" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_AgVantageMember_e3396563-41dc-4070-b888-882bc1223685" xlink:href="agm-20240331.xsd#agm_AgVantageMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_685e125e-7bef-45ae-94b9-b36e9c8dc970" xlink:to="loc_agm_AgVantageMember_e3396563-41dc-4070-b888-882bc1223685" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_DebtSecuritiesHeldToMaturityTransferIn_34a9b9e8-860c-428e-9c4f-7c941d00c665" xlink:href="agm-20240331.xsd#agm_DebtSecuritiesHeldToMaturityTransferIn"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ScheduleOfAvailableForSaleSecuritiesLineItems_4d1a9600-2fdd-4f14-b922-ac7a28578207" xlink:to="loc_agm_DebtSecuritiesHeldToMaturityTransferIn_34a9b9e8-860c-428e-9c4f-7c941d00c665" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_DebtSecuritiesHeldToMaturityTransferInUnrealizedGainLoss_b3b6bb6f-32a3-46ec-9cdf-c7d364a8d511" xlink:href="agm-20240331.xsd#agm_DebtSecuritiesHeldToMaturityTransferInUnrealizedGainLoss"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ScheduleOfAvailableForSaleSecuritiesLineItems_4d1a9600-2fdd-4f14-b922-ac7a28578207" xlink:to="loc_agm_DebtSecuritiesHeldToMaturityTransferInUnrealizedGainLoss_b3b6bb6f-32a3-46ec-9cdf-c7d364a8d511" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_DebtSecuritiesHeldToMaturityTransferInAccumulatedLoss_0a25d71b-89d8-4164-90e9-f6b85ddb17d5" xlink:href="agm-20240331.xsd#agm_DebtSecuritiesHeldToMaturityTransferInAccumulatedLoss"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ScheduleOfAvailableForSaleSecuritiesLineItems_4d1a9600-2fdd-4f14-b922-ac7a28578207" xlink:to="loc_agm_DebtSecuritiesHeldToMaturityTransferInAccumulatedLoss_0a25d71b-89d8-4164-90e9-f6b85ddb17d5" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleUnrealizedLossPositionNumberOfPositions_0777c723-102d-4152-8041-8ee26c6b2558" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtSecuritiesAvailableForSaleUnrealizedLossPositionNumberOfPositions"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ScheduleOfAvailableForSaleSecuritiesLineItems_4d1a9600-2fdd-4f14-b922-ac7a28578207" xlink:to="loc_us-gaap_DebtSecuritiesAvailableForSaleUnrealizedLossPositionNumberOfPositions_0777c723-102d-4152-8041-8ee26c6b2558" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_DebtSecuritiesHeldToMaturityUnrealizedLossPositionNumberOfPositions_c1b5ea97-4a25-41a6-92fb-f55bfc0be9f8" xlink:href="agm-20240331.xsd#agm_DebtSecuritiesHeldToMaturityUnrealizedLossPositionNumberOfPositions"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ScheduleOfAvailableForSaleSecuritiesLineItems_4d1a9600-2fdd-4f14-b922-ac7a28578207" xlink:to="loc_agm_DebtSecuritiesHeldToMaturityUnrealizedLossPositionNumberOfPositions_c1b5ea97-4a25-41a6-92fb-f55bfc0be9f8" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPosition12MonthsOrLongerNumberOfPositions_3161f08f-acb0-48d4-8777-cbdd9db45e62" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPosition12MonthsOrLongerNumberOfPositions"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ScheduleOfAvailableForSaleSecuritiesLineItems_4d1a9600-2fdd-4f14-b922-ac7a28578207" xlink:to="loc_us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPosition12MonthsOrLongerNumberOfPositions_3161f08f-acb0-48d4-8777-cbdd9db45e62" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_DebtSecuritiesHeldToMaturityUnrealizedLossPositionMoreThan12MonthsNumberOfPositions_7378b43f-7055-4141-8f8e-3112c46e9b50" xlink:href="agm-20240331.xsd#agm_DebtSecuritiesHeldToMaturityUnrealizedLossPositionMoreThan12MonthsNumberOfPositions"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ScheduleOfAvailableForSaleSecuritiesLineItems_4d1a9600-2fdd-4f14-b922-ac7a28578207" xlink:to="loc_agm_DebtSecuritiesHeldToMaturityUnrealizedLossPositionMoreThan12MonthsNumberOfPositions_7378b43f-7055-4141-8f8e-3112c46e9b50" xlink:type="arc" order="6"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.farmermac.com/role/FARMERMACGUARANTEEDSECURITIESANDUSDASECURITIESUnrealizedLossPositionDetails" xlink:type="simple" xlink:href="agm-20240331.xsd#FARMERMACGUARANTEEDSECURITIESANDUSDASECURITIESUnrealizedLossPositionDetails"/>
  <link:definitionLink xlink:role="http://www.farmermac.com/role/FARMERMACGUARANTEEDSECURITIESANDUSDASECURITIESUnrealizedLossPositionDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ScheduleOfAvailableForSaleSecuritiesLineItems_8814dbdf-4bf7-4bb9-9fc5-cfa06581a1b2" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ScheduleOfAvailableForSaleSecuritiesLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleTable_0551ab2a-fee2-40d4-bdc7-6ea3b55e451f" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtSecuritiesAvailableForSaleTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_ScheduleOfAvailableForSaleSecuritiesLineItems_8814dbdf-4bf7-4bb9-9fc5-cfa06581a1b2" xlink:to="loc_us-gaap_DebtSecuritiesAvailableForSaleTable_0551ab2a-fee2-40d4-bdc7-6ea3b55e451f" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StatementBusinessSegmentsAxis_0ab8c275-d6b8-4d39-9fea-0fccbeeaad40" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_StatementBusinessSegmentsAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_DebtSecuritiesAvailableForSaleTable_0551ab2a-fee2-40d4-bdc7-6ea3b55e451f" xlink:to="loc_us-gaap_StatementBusinessSegmentsAxis_0ab8c275-d6b8-4d39-9fea-0fccbeeaad40" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SegmentDomain_0ab8c275-d6b8-4d39-9fea-0fccbeeaad40_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SegmentDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementBusinessSegmentsAxis_0ab8c275-d6b8-4d39-9fea-0fccbeeaad40" xlink:to="loc_us-gaap_SegmentDomain_0ab8c275-d6b8-4d39-9fea-0fccbeeaad40_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SegmentDomain_4da79e78-df57-42c2-907d-0cbe7d8f71c7" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SegmentDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementBusinessSegmentsAxis_0ab8c275-d6b8-4d39-9fea-0fccbeeaad40" xlink:to="loc_us-gaap_SegmentDomain_4da79e78-df57-42c2-907d-0cbe7d8f71c7" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_AgVantageMember_7b5053e9-fef9-408c-ae49-c443d0c29c9d" xlink:href="agm-20240331.xsd#agm_AgVantageMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_4da79e78-df57-42c2-907d-0cbe7d8f71c7" xlink:to="loc_agm_AgVantageMember_7b5053e9-fef9-408c-ae49-c443d0c29c9d" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_USDAGuaranteesMember_891f9c5b-912a-4c8a-b9ec-3dd19273def7" xlink:href="agm-20240331.xsd#agm_USDAGuaranteesMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_4da79e78-df57-42c2-907d-0cbe7d8f71c7" xlink:to="loc_agm_USDAGuaranteesMember_891f9c5b-912a-4c8a-b9ec-3dd19273def7" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinancialInstrumentAxis_28e5d159-6037-4137-8694-bd8a42fd3999" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FinancialInstrumentAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_DebtSecuritiesAvailableForSaleTable_0551ab2a-fee2-40d4-bdc7-6ea3b55e451f" xlink:to="loc_us-gaap_FinancialInstrumentAxis_28e5d159-6037-4137-8694-bd8a42fd3999" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_28e5d159-6037-4137-8694-bd8a42fd3999_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_FinancialInstrumentAxis_28e5d159-6037-4137-8694-bd8a42fd3999" xlink:to="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_28e5d159-6037-4137-8694-bd8a42fd3999_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_d8ee04b1-6d86-4816-bae3-57d9c58be6fe" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_FinancialInstrumentAxis_28e5d159-6037-4137-8694-bd8a42fd3999" xlink:to="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_d8ee04b1-6d86-4816-bae3-57d9c58be6fe" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_USTreasuryAndGovernmentMember_7b7b32ab-75bd-4069-b341-fc723d34c198" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_USTreasuryAndGovernmentMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_d8ee04b1-6d86-4816-bae3-57d9c58be6fe" xlink:to="loc_us-gaap_USTreasuryAndGovernmentMember_7b7b32ab-75bd-4069-b341-fc723d34c198" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_USGovernmentSponsoredEnterprisesDebtSecuritiesMember_4843633e-2335-4fbe-998f-c6f4517f90b8" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_USGovernmentSponsoredEnterprisesDebtSecuritiesMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_USTreasuryAndGovernmentMember_7b7b32ab-75bd-4069-b341-fc723d34c198" xlink:to="loc_us-gaap_USGovernmentSponsoredEnterprisesDebtSecuritiesMember_4843633e-2335-4fbe-998f-c6f4517f90b8" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_USGovernmentAgenciesDebtSecuritiesMember_8ba75ac4-d1af-4696-94f7-e0a0acc657c2" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_USGovernmentAgenciesDebtSecuritiesMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_USTreasuryAndGovernmentMember_7b7b32ab-75bd-4069-b341-fc723d34c198" xlink:to="loc_us-gaap_USGovernmentAgenciesDebtSecuritiesMember_8ba75ac4-d1af-4696-94f7-e0a0acc657c2" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_ConsolidationItemsAxis_bd6bcf65-1c29-468c-9549-485f90eb1358" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_ConsolidationItemsAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_DebtSecuritiesAvailableForSaleTable_0551ab2a-fee2-40d4-bdc7-6ea3b55e451f" xlink:to="loc_srt_ConsolidationItemsAxis_bd6bcf65-1c29-468c-9549-485f90eb1358" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_ConsolidationItemsDomain_bd6bcf65-1c29-468c-9549-485f90eb1358_default" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_ConsolidationItemsDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_srt_ConsolidationItemsAxis_bd6bcf65-1c29-468c-9549-485f90eb1358" xlink:to="loc_srt_ConsolidationItemsDomain_bd6bcf65-1c29-468c-9549-485f90eb1358_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_ConsolidationItemsDomain_3d792a07-25ad-4015-8163-5385937458b1" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_ConsolidationItemsDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_srt_ConsolidationItemsAxis_bd6bcf65-1c29-468c-9549-485f90eb1358" xlink:to="loc_srt_ConsolidationItemsDomain_3d792a07-25ad-4015-8163-5385937458b1" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingSegmentsMember_35cb01f9-8751-471c-9ded-697c71b6d4c5" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OperatingSegmentsMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_ConsolidationItemsDomain_3d792a07-25ad-4015-8163-5385937458b1" xlink:to="loc_us-gaap_OperatingSegmentsMember_35cb01f9-8751-471c-9ded-697c71b6d4c5" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_HeldToMaturitySecuritiesClassifiedAbstract_2a73de43-b350-451d-ad5b-20b2e3841864" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_HeldToMaturitySecuritiesClassifiedAbstract"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ScheduleOfAvailableForSaleSecuritiesLineItems_8814dbdf-4bf7-4bb9-9fc5-cfa06581a1b2" xlink:to="loc_us-gaap_HeldToMaturitySecuritiesClassifiedAbstract_2a73de43-b350-451d-ad5b-20b2e3841864" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_HeldToMaturitySecuritiesContinuousUnrealizedLossPositionFairValueAbstract_79129774-462c-4f75-a3d1-4a2a1f95f60a" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_HeldToMaturitySecuritiesContinuousUnrealizedLossPositionFairValueAbstract"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_HeldToMaturitySecuritiesClassifiedAbstract_2a73de43-b350-451d-ad5b-20b2e3841864" xlink:to="loc_us-gaap_HeldToMaturitySecuritiesContinuousUnrealizedLossPositionFairValueAbstract_79129774-462c-4f75-a3d1-4a2a1f95f60a" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_HeldToMaturitySecuritiesContinuousUnrealizedLossPositionLessThanTwelveMonthsFairValue_a91bacf6-fde0-4d3b-8a6c-22d754f2ccdb" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_HeldToMaturitySecuritiesContinuousUnrealizedLossPositionLessThanTwelveMonthsFairValue"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_HeldToMaturitySecuritiesContinuousUnrealizedLossPositionFairValueAbstract_79129774-462c-4f75-a3d1-4a2a1f95f60a" xlink:to="loc_us-gaap_HeldToMaturitySecuritiesContinuousUnrealizedLossPositionLessThanTwelveMonthsFairValue_a91bacf6-fde0-4d3b-8a6c-22d754f2ccdb" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_HeldToMaturitySecuritiesContinuousUnrealizedLossPositionLessThan12MonthsAccumulatedLoss_e551c357-e0a3-407c-90f2-f85154a30e18" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_HeldToMaturitySecuritiesContinuousUnrealizedLossPositionLessThan12MonthsAccumulatedLoss"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_HeldToMaturitySecuritiesContinuousUnrealizedLossPositionFairValueAbstract_79129774-462c-4f75-a3d1-4a2a1f95f60a" xlink:to="loc_us-gaap_HeldToMaturitySecuritiesContinuousUnrealizedLossPositionLessThan12MonthsAccumulatedLoss_e551c357-e0a3-407c-90f2-f85154a30e18" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_HeldToMaturitySecuritiesContinuousUnrealizedLossPositionAccumulatedLossAbstract_30fd2169-ee0c-4361-b055-ae730408d0a7" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_HeldToMaturitySecuritiesContinuousUnrealizedLossPositionAccumulatedLossAbstract"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_HeldToMaturitySecuritiesClassifiedAbstract_2a73de43-b350-451d-ad5b-20b2e3841864" xlink:to="loc_us-gaap_HeldToMaturitySecuritiesContinuousUnrealizedLossPositionAccumulatedLossAbstract_30fd2169-ee0c-4361-b055-ae730408d0a7" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_HeldToMaturitySecuritiesContinuousUnrealizedLossPositionTwelveMonthsOrLongerFairValue_69b414f6-b68d-4214-a759-04b357fe5a37" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_HeldToMaturitySecuritiesContinuousUnrealizedLossPositionTwelveMonthsOrLongerFairValue"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_HeldToMaturitySecuritiesContinuousUnrealizedLossPositionAccumulatedLossAbstract_30fd2169-ee0c-4361-b055-ae730408d0a7" xlink:to="loc_us-gaap_HeldToMaturitySecuritiesContinuousUnrealizedLossPositionTwelveMonthsOrLongerFairValue_69b414f6-b68d-4214-a759-04b357fe5a37" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_HeldToMaturitySecuritiesContinuousUnrealizedLossPosition12MonthsOrLongerAccumulatedLoss_d1eb4382-508b-42fb-8265-bfa85adbfdc9" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_HeldToMaturitySecuritiesContinuousUnrealizedLossPosition12MonthsOrLongerAccumulatedLoss"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_HeldToMaturitySecuritiesContinuousUnrealizedLossPositionAccumulatedLossAbstract_30fd2169-ee0c-4361-b055-ae730408d0a7" xlink:to="loc_us-gaap_HeldToMaturitySecuritiesContinuousUnrealizedLossPosition12MonthsOrLongerAccumulatedLoss_d1eb4382-508b-42fb-8265-bfa85adbfdc9" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesAbstract_39376f4e-63c2-49dd-b068-bc7c0350243b" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AvailableForSaleSecuritiesAbstract"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ScheduleOfAvailableForSaleSecuritiesLineItems_8814dbdf-4bf7-4bb9-9fc5-cfa06581a1b2" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesAbstract_39376f4e-63c2-49dd-b068-bc7c0350243b" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableforSaleUnrealizedLossPositionAbstract_dd6d7303-735f-4b1a-b00f-d8d104936505" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtSecuritiesAvailableforSaleUnrealizedLossPositionAbstract"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AvailableForSaleSecuritiesAbstract_39376f4e-63c2-49dd-b068-bc7c0350243b" xlink:to="loc_us-gaap_DebtSecuritiesAvailableforSaleUnrealizedLossPositionAbstract_dd6d7303-735f-4b1a-b00f-d8d104936505" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPositionLessThan12Months_7cee8693-b7b8-469b-9d61-7a6ee27b27d4" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPositionLessThan12Months"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtSecuritiesAvailableforSaleUnrealizedLossPositionAbstract_dd6d7303-735f-4b1a-b00f-d8d104936505" xlink:to="loc_us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPositionLessThan12Months_7cee8693-b7b8-469b-9d61-7a6ee27b27d4" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPositionLessThan12MonthsAccumulatedLoss_eb7eb671-8393-4ecd-8b10-a2e2f3813cae" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPositionLessThan12MonthsAccumulatedLoss"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtSecuritiesAvailableforSaleUnrealizedLossPositionAbstract_dd6d7303-735f-4b1a-b00f-d8d104936505" xlink:to="loc_us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPositionLessThan12MonthsAccumulatedLoss_eb7eb671-8393-4ecd-8b10-a2e2f3813cae" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesContinuousUnrealizedLossPositionAccumulatedLossAbstract_a867d620-bc7c-46c2-8958-f888107b23af" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AvailableForSaleSecuritiesContinuousUnrealizedLossPositionAccumulatedLossAbstract"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AvailableForSaleSecuritiesAbstract_39376f4e-63c2-49dd-b068-bc7c0350243b" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesContinuousUnrealizedLossPositionAccumulatedLossAbstract_a867d620-bc7c-46c2-8958-f888107b23af" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPosition12MonthsOrLonger_8514c8e6-7a11-4055-aaa9-70de26981ff8" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPosition12MonthsOrLonger"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AvailableForSaleSecuritiesContinuousUnrealizedLossPositionAccumulatedLossAbstract_a867d620-bc7c-46c2-8958-f888107b23af" xlink:to="loc_us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPosition12MonthsOrLonger_8514c8e6-7a11-4055-aaa9-70de26981ff8" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPosition12MonthsOrLongerAccumulatedLoss_ee5374ba-392f-4f96-bb3d-c1b1b3ebc022" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPosition12MonthsOrLongerAccumulatedLoss"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AvailableForSaleSecuritiesContinuousUnrealizedLossPositionAccumulatedLossAbstract_a867d620-bc7c-46c2-8958-f888107b23af" xlink:to="loc_us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPosition12MonthsOrLongerAccumulatedLoss_ee5374ba-392f-4f96-bb3d-c1b1b3ebc022" xlink:type="arc" order="2"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.farmermac.com/role/FARMERMACGUARANTEEDSECURITIESANDUSDASECURITIESScheduleofAvailableforSaleSecuritiesDetails" xlink:type="simple" xlink:href="agm-20240331.xsd#FARMERMACGUARANTEEDSECURITIESANDUSDASECURITIESScheduleofAvailableforSaleSecuritiesDetails"/>
  <link:definitionLink xlink:role="http://www.farmermac.com/role/FARMERMACGUARANTEEDSECURITIESANDUSDASECURITIESScheduleofAvailableforSaleSecuritiesDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ScheduleOfAvailableForSaleSecuritiesLineItems_530848fb-cf8f-4e50-8aab-dd3801e8d01b" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ScheduleOfAvailableForSaleSecuritiesLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleTable_4885cd48-068d-44fe-98bb-1aa537899699" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtSecuritiesAvailableForSaleTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_ScheduleOfAvailableForSaleSecuritiesLineItems_530848fb-cf8f-4e50-8aab-dd3801e8d01b" xlink:to="loc_us-gaap_DebtSecuritiesAvailableForSaleTable_4885cd48-068d-44fe-98bb-1aa537899699" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinancialInstrumentAxis_71bbbade-f807-43cc-b2e5-a55c91461b04" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FinancialInstrumentAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_DebtSecuritiesAvailableForSaleTable_4885cd48-068d-44fe-98bb-1aa537899699" xlink:to="loc_us-gaap_FinancialInstrumentAxis_71bbbade-f807-43cc-b2e5-a55c91461b04" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_71bbbade-f807-43cc-b2e5-a55c91461b04_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_FinancialInstrumentAxis_71bbbade-f807-43cc-b2e5-a55c91461b04" xlink:to="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_71bbbade-f807-43cc-b2e5-a55c91461b04_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_b966ab15-6527-4c12-9ad7-ec766bc38bbf" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_FinancialInstrumentAxis_71bbbade-f807-43cc-b2e5-a55c91461b04" xlink:to="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_b966ab15-6527-4c12-9ad7-ec766bc38bbf" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_USGovernmentSponsoredEnterprisesDebtSecuritiesMember_fae99ddd-3e9a-4f7b-81f1-d63bc04a4e58" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_USGovernmentSponsoredEnterprisesDebtSecuritiesMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_b966ab15-6527-4c12-9ad7-ec766bc38bbf" xlink:to="loc_us-gaap_USGovernmentSponsoredEnterprisesDebtSecuritiesMember_fae99ddd-3e9a-4f7b-81f1-d63bc04a4e58" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StatementBusinessSegmentsAxis_16238e0d-712d-4d16-a4cc-f2aada55ceae" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_StatementBusinessSegmentsAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_DebtSecuritiesAvailableForSaleTable_4885cd48-068d-44fe-98bb-1aa537899699" xlink:to="loc_us-gaap_StatementBusinessSegmentsAxis_16238e0d-712d-4d16-a4cc-f2aada55ceae" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SegmentDomain_16238e0d-712d-4d16-a4cc-f2aada55ceae_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SegmentDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementBusinessSegmentsAxis_16238e0d-712d-4d16-a4cc-f2aada55ceae" xlink:to="loc_us-gaap_SegmentDomain_16238e0d-712d-4d16-a4cc-f2aada55ceae_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SegmentDomain_dd13533d-ec88-4750-a58f-95ad7e24ff0c" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SegmentDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementBusinessSegmentsAxis_16238e0d-712d-4d16-a4cc-f2aada55ceae" xlink:to="loc_us-gaap_SegmentDomain_dd13533d-ec88-4750-a58f-95ad7e24ff0c" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_AgVantageMember_d85149fa-ee25-4707-8f20-cd2f30b3b931" xlink:href="agm-20240331.xsd#agm_AgVantageMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_dd13533d-ec88-4750-a58f-95ad7e24ff0c" xlink:to="loc_agm_AgVantageMember_d85149fa-ee25-4707-8f20-cd2f30b3b931" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesAbstract_dae56d85-3472-4481-ac9b-f415ecd99f2a" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AvailableForSaleSecuritiesAbstract"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ScheduleOfAvailableForSaleSecuritiesLineItems_530848fb-cf8f-4e50-8aab-dd3801e8d01b" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesAbstract_dae56d85-3472-4481-ac9b-f415ecd99f2a" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesSingleMaturityDateAmortizedCostBasisAbstract_b46c7f69-b5b0-4c68-8685-3f407b346b47" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AvailableForSaleSecuritiesDebtMaturitiesSingleMaturityDateAmortizedCostBasisAbstract"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AvailableForSaleSecuritiesAbstract_dae56d85-3472-4481-ac9b-f415ecd99f2a" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesSingleMaturityDateAmortizedCostBasisAbstract_b46c7f69-b5b0-4c68-8685-3f407b346b47" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesWithinOneYearAmortizedCost_076255ee-98f0-441c-876d-f739333c25da" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AvailableForSaleSecuritiesDebtMaturitiesWithinOneYearAmortizedCost"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesSingleMaturityDateAmortizedCostBasisAbstract_b46c7f69-b5b0-4c68-8685-3f407b346b47" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesWithinOneYearAmortizedCost_076255ee-98f0-441c-876d-f739333c25da" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterOneThroughFiveYearsAmortizedCost_da506bfa-1174-470f-a140-164d2c7686b7" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterOneThroughFiveYearsAmortizedCost"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesSingleMaturityDateAmortizedCostBasisAbstract_b46c7f69-b5b0-4c68-8685-3f407b346b47" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterOneThroughFiveYearsAmortizedCost_da506bfa-1174-470f-a140-164d2c7686b7" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterFiveThroughTenYearsAmortizedCost_9572d170-7b2a-4f29-9a70-cce1431ccf86" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterFiveThroughTenYearsAmortizedCost"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesSingleMaturityDateAmortizedCostBasisAbstract_b46c7f69-b5b0-4c68-8685-3f407b346b47" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterFiveThroughTenYearsAmortizedCost_9572d170-7b2a-4f29-9a70-cce1431ccf86" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterTenYearsAmortizedCost_0d330895-efa0-46f5-aa95-a3a4818b2459" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterTenYearsAmortizedCost"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesSingleMaturityDateAmortizedCostBasisAbstract_b46c7f69-b5b0-4c68-8685-3f407b346b47" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterTenYearsAmortizedCost_0d330895-efa0-46f5-aa95-a3a4818b2459" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleAmortizedCostExcludingAccruedInterestBeforeAllowanceForCreditLoss_b6162ff8-164f-4158-ae72-438117ab4530" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtSecuritiesAvailableForSaleAmortizedCostExcludingAccruedInterestBeforeAllowanceForCreditLoss"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesSingleMaturityDateAmortizedCostBasisAbstract_b46c7f69-b5b0-4c68-8685-3f407b346b47" xlink:to="loc_us-gaap_DebtSecuritiesAvailableForSaleAmortizedCostExcludingAccruedInterestBeforeAllowanceForCreditLoss_b6162ff8-164f-4158-ae72-438117ab4530" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesSingleMaturityDateAbstract_ff1ebb5d-4b10-435d-95d9-de47ab386bac" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AvailableForSaleSecuritiesDebtMaturitiesSingleMaturityDateAbstract"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AvailableForSaleSecuritiesAbstract_dae56d85-3472-4481-ac9b-f415ecd99f2a" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesSingleMaturityDateAbstract_ff1ebb5d-4b10-435d-95d9-de47ab386bac" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesWithinOneYearFairValue_06c33c15-e670-4d8a-b369-758049bae341" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AvailableForSaleSecuritiesDebtMaturitiesWithinOneYearFairValue"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesSingleMaturityDateAbstract_ff1ebb5d-4b10-435d-95d9-de47ab386bac" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesWithinOneYearFairValue_06c33c15-e670-4d8a-b369-758049bae341" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterOneThroughFiveYearsFairValue_1b915403-af87-43e0-af31-5e5b21e0514a" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterOneThroughFiveYearsFairValue"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesSingleMaturityDateAbstract_ff1ebb5d-4b10-435d-95d9-de47ab386bac" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterOneThroughFiveYearsFairValue_1b915403-af87-43e0-af31-5e5b21e0514a" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterFiveThroughTenYearsFairValue_f8b777ef-667f-475b-abc6-d72e53854505" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterFiveThroughTenYearsFairValue"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesSingleMaturityDateAbstract_ff1ebb5d-4b10-435d-95d9-de47ab386bac" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterFiveThroughTenYearsFairValue_f8b777ef-667f-475b-abc6-d72e53854505" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterTenYearsFairValue_2d7f19fd-63d3-4e9e-8aef-a33582690c8f" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterTenYearsFairValue"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesSingleMaturityDateAbstract_ff1ebb5d-4b10-435d-95d9-de47ab386bac" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterTenYearsFairValue_2d7f19fd-63d3-4e9e-8aef-a33582690c8f" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleExcludingAccruedInterest_dd6ade00-a91c-49e8-b323-bb811b0f4426" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtSecuritiesAvailableForSaleExcludingAccruedInterest"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesSingleMaturityDateAbstract_ff1ebb5d-4b10-435d-95d9-de47ab386bac" xlink:to="loc_us-gaap_DebtSecuritiesAvailableForSaleExcludingAccruedInterest_dd6ade00-a91c-49e8-b323-bb811b0f4426" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_AvailableforsaleSecuritiesDebtMaturitiesWeightedAverageYieldSingleMaturityDateAbstract_26b0b7cc-946c-40ae-bfdb-2767acb64288" xlink:href="agm-20240331.xsd#agm_AvailableforsaleSecuritiesDebtMaturitiesWeightedAverageYieldSingleMaturityDateAbstract"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AvailableForSaleSecuritiesAbstract_dae56d85-3472-4481-ac9b-f415ecd99f2a" xlink:to="loc_agm_AvailableforsaleSecuritiesDebtMaturitiesWeightedAverageYieldSingleMaturityDateAbstract_26b0b7cc-946c-40ae-bfdb-2767acb64288" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_AvailableForSaleSecuritiesDebtMaturitiesNextTwelveMonthsWeightedAverageYield_d56e1076-da24-4427-8348-6eec51d74b41" xlink:href="agm-20240331.xsd#agm_AvailableForSaleSecuritiesDebtMaturitiesNextTwelveMonthsWeightedAverageYield"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_agm_AvailableforsaleSecuritiesDebtMaturitiesWeightedAverageYieldSingleMaturityDateAbstract_26b0b7cc-946c-40ae-bfdb-2767acb64288" xlink:to="loc_agm_AvailableForSaleSecuritiesDebtMaturitiesNextTwelveMonthsWeightedAverageYield_d56e1076-da24-4427-8348-6eec51d74b41" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_AvailableForSaleSecuritiesDebtMaturitiesYearTwoThroughFiveWeightedAverageYield_0ad77b99-03f1-400f-bb32-8107bf3c1c0d" xlink:href="agm-20240331.xsd#agm_AvailableForSaleSecuritiesDebtMaturitiesYearTwoThroughFiveWeightedAverageYield"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_agm_AvailableforsaleSecuritiesDebtMaturitiesWeightedAverageYieldSingleMaturityDateAbstract_26b0b7cc-946c-40ae-bfdb-2767acb64288" xlink:to="loc_agm_AvailableForSaleSecuritiesDebtMaturitiesYearTwoThroughFiveWeightedAverageYield_0ad77b99-03f1-400f-bb32-8107bf3c1c0d" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_AvailableForSaleSecuritiesDebtMaturitiesYearSixThroughTenWeightedAverageYield_8b961c1e-a8c1-4d46-96a4-e54afa04e362" xlink:href="agm-20240331.xsd#agm_AvailableForSaleSecuritiesDebtMaturitiesYearSixThroughTenWeightedAverageYield"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_agm_AvailableforsaleSecuritiesDebtMaturitiesWeightedAverageYieldSingleMaturityDateAbstract_26b0b7cc-946c-40ae-bfdb-2767acb64288" xlink:to="loc_agm_AvailableForSaleSecuritiesDebtMaturitiesYearSixThroughTenWeightedAverageYield_8b961c1e-a8c1-4d46-96a4-e54afa04e362" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_AvailableForSaleSecuritiesDebtMaturitiesAfterTenYearsWeightedAverageYield_44020923-bc67-4d22-bcd6-8efc8a481d41" xlink:href="agm-20240331.xsd#agm_AvailableForSaleSecuritiesDebtMaturitiesAfterTenYearsWeightedAverageYield"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_agm_AvailableforsaleSecuritiesDebtMaturitiesWeightedAverageYieldSingleMaturityDateAbstract_26b0b7cc-946c-40ae-bfdb-2767acb64288" xlink:to="loc_agm_AvailableForSaleSecuritiesDebtMaturitiesAfterTenYearsWeightedAverageYield_44020923-bc67-4d22-bcd6-8efc8a481d41" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_AvailableForSaleSecuritiesDebtMaturitiesWeightedAverageYield_6c1c0b35-4b2f-43c8-adab-28b5cf13e3e4" xlink:href="agm-20240331.xsd#agm_AvailableForSaleSecuritiesDebtMaturitiesWeightedAverageYield"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_agm_AvailableforsaleSecuritiesDebtMaturitiesWeightedAverageYieldSingleMaturityDateAbstract_26b0b7cc-946c-40ae-bfdb-2767acb64288" xlink:to="loc_agm_AvailableForSaleSecuritiesDebtMaturitiesWeightedAverageYield_6c1c0b35-4b2f-43c8-adab-28b5cf13e3e4" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleAccruedInterestAfterAllowanceForCreditLoss_9938cbe6-a57b-4a48-815c-49354e6dc0c1" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtSecuritiesAvailableForSaleAccruedInterestAfterAllowanceForCreditLoss"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ScheduleOfAvailableForSaleSecuritiesLineItems_530848fb-cf8f-4e50-8aab-dd3801e8d01b" xlink:to="loc_us-gaap_DebtSecuritiesAvailableForSaleAccruedInterestAfterAllowanceForCreditLoss_9938cbe6-a57b-4a48-815c-49354e6dc0c1" xlink:type="arc" order="1"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.farmermac.com/role/FARMERMACGUARANTEEDSECURITIESANDUSDASECURITIESScheduleofHeldtoMaturitySecuritiesDetails" xlink:type="simple" xlink:href="agm-20240331.xsd#FARMERMACGUARANTEEDSECURITIESANDUSDASECURITIESScheduleofHeldtoMaturitySecuritiesDetails"/>
  <link:definitionLink xlink:role="http://www.farmermac.com/role/FARMERMACGUARANTEEDSECURITIESANDUSDASECURITIESScheduleofHeldtoMaturitySecuritiesDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ScheduleOfHeldToMaturitySecuritiesLineItems_79998333-adeb-4690-80e1-e063e54ee8bf" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ScheduleOfHeldToMaturitySecuritiesLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ScheduleOfHeldToMaturitySecuritiesTable_f8e4bbf4-9102-42a1-9049-2916bd2fd27e" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ScheduleOfHeldToMaturitySecuritiesTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_ScheduleOfHeldToMaturitySecuritiesLineItems_79998333-adeb-4690-80e1-e063e54ee8bf" xlink:to="loc_us-gaap_ScheduleOfHeldToMaturitySecuritiesTable_f8e4bbf4-9102-42a1-9049-2916bd2fd27e" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinancialInstrumentAxis_989b5997-d92d-4556-b72f-6845d577af10" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FinancialInstrumentAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfHeldToMaturitySecuritiesTable_f8e4bbf4-9102-42a1-9049-2916bd2fd27e" xlink:to="loc_us-gaap_FinancialInstrumentAxis_989b5997-d92d-4556-b72f-6845d577af10" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_989b5997-d92d-4556-b72f-6845d577af10_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_FinancialInstrumentAxis_989b5997-d92d-4556-b72f-6845d577af10" xlink:to="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_989b5997-d92d-4556-b72f-6845d577af10_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_8d3fe33e-9a93-463f-bcae-7e05fddf2032" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_FinancialInstrumentAxis_989b5997-d92d-4556-b72f-6845d577af10" xlink:to="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_8d3fe33e-9a93-463f-bcae-7e05fddf2032" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_USTreasuryAndGovernmentMember_0be39fa8-3e5d-40c8-9746-c1bc3a67583b" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_USTreasuryAndGovernmentMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_8d3fe33e-9a93-463f-bcae-7e05fddf2032" xlink:to="loc_us-gaap_USTreasuryAndGovernmentMember_0be39fa8-3e5d-40c8-9746-c1bc3a67583b" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StatementBusinessSegmentsAxis_8d119ea3-2dee-407d-bf30-0de9985a94ca" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_StatementBusinessSegmentsAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfHeldToMaturitySecuritiesTable_f8e4bbf4-9102-42a1-9049-2916bd2fd27e" xlink:to="loc_us-gaap_StatementBusinessSegmentsAxis_8d119ea3-2dee-407d-bf30-0de9985a94ca" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SegmentDomain_8d119ea3-2dee-407d-bf30-0de9985a94ca_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SegmentDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementBusinessSegmentsAxis_8d119ea3-2dee-407d-bf30-0de9985a94ca" xlink:to="loc_us-gaap_SegmentDomain_8d119ea3-2dee-407d-bf30-0de9985a94ca_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SegmentDomain_cd0eef85-f71e-4983-baeb-ce73cb951269" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SegmentDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementBusinessSegmentsAxis_8d119ea3-2dee-407d-bf30-0de9985a94ca" xlink:to="loc_us-gaap_SegmentDomain_cd0eef85-f71e-4983-baeb-ce73cb951269" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_AgVantageMember_77f09eb8-cf15-4f67-97ae-372c8418a46e" xlink:href="agm-20240331.xsd#agm_AgVantageMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_cd0eef85-f71e-4983-baeb-ce73cb951269" xlink:to="loc_agm_AgVantageMember_77f09eb8-cf15-4f67-97ae-372c8418a46e" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_HeldToMaturitySecuritiesDebtMaturitiesAbstract_f352aa67-97ac-48b3-a987-34c33e7dbf49" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_HeldToMaturitySecuritiesDebtMaturitiesAbstract"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ScheduleOfHeldToMaturitySecuritiesLineItems_79998333-adeb-4690-80e1-e063e54ee8bf" xlink:to="loc_us-gaap_HeldToMaturitySecuritiesDebtMaturitiesAbstract_f352aa67-97ac-48b3-a987-34c33e7dbf49" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_HeldToMaturitySecuritiesDebtMaturitiesSingleMaturityDateAmortizedCostBasisAbstract_72b99eab-81f5-419c-aec8-d932aa523799" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_HeldToMaturitySecuritiesDebtMaturitiesSingleMaturityDateAmortizedCostBasisAbstract"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_HeldToMaturitySecuritiesDebtMaturitiesAbstract_f352aa67-97ac-48b3-a987-34c33e7dbf49" xlink:to="loc_us-gaap_HeldToMaturitySecuritiesDebtMaturitiesSingleMaturityDateAmortizedCostBasisAbstract_72b99eab-81f5-419c-aec8-d932aa523799" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesHeldToMaturityAmortizedCostExcludingAccruedInterestAfterAllowanceForCreditLossMaturityAllocatedAndSingleMaturityDateYearOne_2dcead1b-c83f-4b04-a328-c2b88f6c052d" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtSecuritiesHeldToMaturityAmortizedCostExcludingAccruedInterestAfterAllowanceForCreditLossMaturityAllocatedAndSingleMaturityDateYearOne"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_HeldToMaturitySecuritiesDebtMaturitiesSingleMaturityDateAmortizedCostBasisAbstract_72b99eab-81f5-419c-aec8-d932aa523799" xlink:to="loc_us-gaap_DebtSecuritiesHeldToMaturityAmortizedCostExcludingAccruedInterestAfterAllowanceForCreditLossMaturityAllocatedAndSingleMaturityDateYearOne_2dcead1b-c83f-4b04-a328-c2b88f6c052d" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesHeldToMaturityAmortizedCostExcludingAccruedInterestAfterAllowanceForCreditLossMaturityAllocatedAndSingleMaturityDateAfterYearOneThroughFive_db1623df-2b21-4a0d-a052-92bbdc957e04" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtSecuritiesHeldToMaturityAmortizedCostExcludingAccruedInterestAfterAllowanceForCreditLossMaturityAllocatedAndSingleMaturityDateAfterYearOneThroughFive"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_HeldToMaturitySecuritiesDebtMaturitiesSingleMaturityDateAmortizedCostBasisAbstract_72b99eab-81f5-419c-aec8-d932aa523799" xlink:to="loc_us-gaap_DebtSecuritiesHeldToMaturityAmortizedCostExcludingAccruedInterestAfterAllowanceForCreditLossMaturityAllocatedAndSingleMaturityDateAfterYearOneThroughFive_db1623df-2b21-4a0d-a052-92bbdc957e04" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesHeldToMaturityAmortizedCostExcludingAccruedInterestAfterAllowanceForCreditLossMaturityAllocatedAndSingleMaturityDateAfterYear5Through10_a7a38aff-4066-458a-b24c-604b77b52c14" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtSecuritiesHeldToMaturityAmortizedCostExcludingAccruedInterestAfterAllowanceForCreditLossMaturityAllocatedAndSingleMaturityDateAfterYear5Through10"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_HeldToMaturitySecuritiesDebtMaturitiesSingleMaturityDateAmortizedCostBasisAbstract_72b99eab-81f5-419c-aec8-d932aa523799" xlink:to="loc_us-gaap_DebtSecuritiesHeldToMaturityAmortizedCostExcludingAccruedInterestAfterAllowanceForCreditLossMaturityAllocatedAndSingleMaturityDateAfterYear5Through10_a7a38aff-4066-458a-b24c-604b77b52c14" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesHeldToMaturityAmortizedCostExcludingAccruedInterestAfterAllowanceForCreditLossMaturityAllocatedAndSingleMaturityDateAfterYear10_9dd330da-03ec-4df8-ab46-7eaad406d7fd" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtSecuritiesHeldToMaturityAmortizedCostExcludingAccruedInterestAfterAllowanceForCreditLossMaturityAllocatedAndSingleMaturityDateAfterYear10"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_HeldToMaturitySecuritiesDebtMaturitiesSingleMaturityDateAmortizedCostBasisAbstract_72b99eab-81f5-419c-aec8-d932aa523799" xlink:to="loc_us-gaap_DebtSecuritiesHeldToMaturityAmortizedCostExcludingAccruedInterestAfterAllowanceForCreditLossMaturityAllocatedAndSingleMaturityDateAfterYear10_9dd330da-03ec-4df8-ab46-7eaad406d7fd" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesHeldToMaturityAmortizedCostExcludingAccruedInterestAfterAllowanceForCreditLossMaturityAllocatedAndSingleMaturityDate_382a08e4-57d9-4a16-866f-6ed2cef7a113" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtSecuritiesHeldToMaturityAmortizedCostExcludingAccruedInterestAfterAllowanceForCreditLossMaturityAllocatedAndSingleMaturityDate"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_HeldToMaturitySecuritiesDebtMaturitiesSingleMaturityDateAmortizedCostBasisAbstract_72b99eab-81f5-419c-aec8-d932aa523799" xlink:to="loc_us-gaap_DebtSecuritiesHeldToMaturityAmortizedCostExcludingAccruedInterestAfterAllowanceForCreditLossMaturityAllocatedAndSingleMaturityDate_382a08e4-57d9-4a16-866f-6ed2cef7a113" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_HeldToMaturitySecuritiesDebtMaturitiesSingleMaturityDateFairValueAbstract_9eab1e50-f4cb-43be-9ac9-f7456716c752" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_HeldToMaturitySecuritiesDebtMaturitiesSingleMaturityDateFairValueAbstract"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_HeldToMaturitySecuritiesDebtMaturitiesAbstract_f352aa67-97ac-48b3-a987-34c33e7dbf49" xlink:to="loc_us-gaap_HeldToMaturitySecuritiesDebtMaturitiesSingleMaturityDateFairValueAbstract_9eab1e50-f4cb-43be-9ac9-f7456716c752" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_HeldToMaturitySecuritiesDebtMaturitiesWithinOneYearFairValue_d1d93403-a4ee-4057-b46e-49c5a8b1f508" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_HeldToMaturitySecuritiesDebtMaturitiesWithinOneYearFairValue"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_HeldToMaturitySecuritiesDebtMaturitiesSingleMaturityDateFairValueAbstract_9eab1e50-f4cb-43be-9ac9-f7456716c752" xlink:to="loc_us-gaap_HeldToMaturitySecuritiesDebtMaturitiesWithinOneYearFairValue_d1d93403-a4ee-4057-b46e-49c5a8b1f508" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_HeldToMaturitySecuritiesDebtMaturitiesAfterOneThroughFiveYearsFairValue_11d4daf8-202f-4682-81a0-38653371c9a2" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_HeldToMaturitySecuritiesDebtMaturitiesAfterOneThroughFiveYearsFairValue"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_HeldToMaturitySecuritiesDebtMaturitiesSingleMaturityDateFairValueAbstract_9eab1e50-f4cb-43be-9ac9-f7456716c752" xlink:to="loc_us-gaap_HeldToMaturitySecuritiesDebtMaturitiesAfterOneThroughFiveYearsFairValue_11d4daf8-202f-4682-81a0-38653371c9a2" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_HeldToMaturitySecuritiesDebtMaturitiesAfterFiveThroughTenYearsFairValue_f810c7dc-86ae-4e54-8012-3f9daa44f39a" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_HeldToMaturitySecuritiesDebtMaturitiesAfterFiveThroughTenYearsFairValue"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_HeldToMaturitySecuritiesDebtMaturitiesSingleMaturityDateFairValueAbstract_9eab1e50-f4cb-43be-9ac9-f7456716c752" xlink:to="loc_us-gaap_HeldToMaturitySecuritiesDebtMaturitiesAfterFiveThroughTenYearsFairValue_f810c7dc-86ae-4e54-8012-3f9daa44f39a" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_HeldToMaturitySecuritiesDebtMaturitiesAfterTenYearsFairValue_1cc31246-c3cc-4360-a904-49bca1df1f26" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_HeldToMaturitySecuritiesDebtMaturitiesAfterTenYearsFairValue"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_HeldToMaturitySecuritiesDebtMaturitiesSingleMaturityDateFairValueAbstract_9eab1e50-f4cb-43be-9ac9-f7456716c752" xlink:to="loc_us-gaap_HeldToMaturitySecuritiesDebtMaturitiesAfterTenYearsFairValue_1cc31246-c3cc-4360-a904-49bca1df1f26" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesHeldToMaturityExcludingAccruedInterestAfterAllowanceForCreditLoss_3279a167-a85e-45db-a4b5-02cfa4aaa534" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtSecuritiesHeldToMaturityExcludingAccruedInterestAfterAllowanceForCreditLoss"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_HeldToMaturitySecuritiesDebtMaturitiesSingleMaturityDateFairValueAbstract_9eab1e50-f4cb-43be-9ac9-f7456716c752" xlink:to="loc_us-gaap_DebtSecuritiesHeldToMaturityExcludingAccruedInterestAfterAllowanceForCreditLoss_3279a167-a85e-45db-a4b5-02cfa4aaa534" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_HeldToMaturitySecuritiesDebtMaturitiesWeightedAverageYieldSingleMaturityDateAbstract_c6b4490c-5254-45a0-b2ff-83ac0b149f83" xlink:href="agm-20240331.xsd#agm_HeldToMaturitySecuritiesDebtMaturitiesWeightedAverageYieldSingleMaturityDateAbstract"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_HeldToMaturitySecuritiesDebtMaturitiesAbstract_f352aa67-97ac-48b3-a987-34c33e7dbf49" xlink:to="loc_agm_HeldToMaturitySecuritiesDebtMaturitiesWeightedAverageYieldSingleMaturityDateAbstract_c6b4490c-5254-45a0-b2ff-83ac0b149f83" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_HeldtoMaturitySecuritiesDebtMaturitiesNextTwelveMonthsWeightedAverageYield_5b021d52-6d06-4aee-a45a-b12ec5a152cf" xlink:href="agm-20240331.xsd#agm_HeldtoMaturitySecuritiesDebtMaturitiesNextTwelveMonthsWeightedAverageYield"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_agm_HeldToMaturitySecuritiesDebtMaturitiesWeightedAverageYieldSingleMaturityDateAbstract_c6b4490c-5254-45a0-b2ff-83ac0b149f83" xlink:to="loc_agm_HeldtoMaturitySecuritiesDebtMaturitiesNextTwelveMonthsWeightedAverageYield_5b021d52-6d06-4aee-a45a-b12ec5a152cf" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_HeldtoMaturitySecuritiesDebtMaturitiesYearTwoThroughFiveWeightedAverageYield_ef63c254-df58-4842-8f5a-a7856d9fcfee" xlink:href="agm-20240331.xsd#agm_HeldtoMaturitySecuritiesDebtMaturitiesYearTwoThroughFiveWeightedAverageYield"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_agm_HeldToMaturitySecuritiesDebtMaturitiesWeightedAverageYieldSingleMaturityDateAbstract_c6b4490c-5254-45a0-b2ff-83ac0b149f83" xlink:to="loc_agm_HeldtoMaturitySecuritiesDebtMaturitiesYearTwoThroughFiveWeightedAverageYield_ef63c254-df58-4842-8f5a-a7856d9fcfee" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_HeldToMaturitySecuritiesDebtMaturitiesAfterFiveThroughTenYearsWeightedAverageYield_68da18fa-246f-48a8-aa81-eabe40a7b3e3" xlink:href="agm-20240331.xsd#agm_HeldToMaturitySecuritiesDebtMaturitiesAfterFiveThroughTenYearsWeightedAverageYield"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_agm_HeldToMaturitySecuritiesDebtMaturitiesWeightedAverageYieldSingleMaturityDateAbstract_c6b4490c-5254-45a0-b2ff-83ac0b149f83" xlink:to="loc_agm_HeldToMaturitySecuritiesDebtMaturitiesAfterFiveThroughTenYearsWeightedAverageYield_68da18fa-246f-48a8-aa81-eabe40a7b3e3" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_HeldtoMaturitySecuritiesDebtMaturitiesAfterTenYearsWeightedAverageYield_49f7d084-7fdd-480f-8d56-ce1f1e53dc96" xlink:href="agm-20240331.xsd#agm_HeldtoMaturitySecuritiesDebtMaturitiesAfterTenYearsWeightedAverageYield"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_agm_HeldToMaturitySecuritiesDebtMaturitiesWeightedAverageYieldSingleMaturityDateAbstract_c6b4490c-5254-45a0-b2ff-83ac0b149f83" xlink:to="loc_agm_HeldtoMaturitySecuritiesDebtMaturitiesAfterTenYearsWeightedAverageYield_49f7d084-7fdd-480f-8d56-ce1f1e53dc96" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_HeldToMaturitySecuritiesDebtMaturitiesWeightedAverageYield_334182ca-6cb5-465a-981f-f3abcaa3d105" xlink:href="agm-20240331.xsd#agm_HeldToMaturitySecuritiesDebtMaturitiesWeightedAverageYield"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_agm_HeldToMaturitySecuritiesDebtMaturitiesWeightedAverageYieldSingleMaturityDateAbstract_c6b4490c-5254-45a0-b2ff-83ac0b149f83" xlink:to="loc_agm_HeldToMaturitySecuritiesDebtMaturitiesWeightedAverageYield_334182ca-6cb5-465a-981f-f3abcaa3d105" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesHeldToMaturityAccruedInterestBeforeAllowanceForCreditLoss_50d4c20e-a430-4721-b366-1ea874e27945" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtSecuritiesHeldToMaturityAccruedInterestBeforeAllowanceForCreditLoss"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ScheduleOfHeldToMaturitySecuritiesLineItems_79998333-adeb-4690-80e1-e063e54ee8bf" xlink:to="loc_us-gaap_DebtSecuritiesHeldToMaturityAccruedInterestBeforeAllowanceForCreditLoss_50d4c20e-a430-4721-b366-1ea874e27945" xlink:type="arc" order="1"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.farmermac.com/role/FINANCIALDERIVATIVESNarrativeDetails" xlink:type="simple" xlink:href="agm-20240331.xsd#FINANCIALDERIVATIVESNarrativeDetails"/>
  <link:definitionLink xlink:role="http://www.farmermac.com/role/FINANCIALDERIVATIVESNarrativeDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeLineItems_b5d4b0d9-0ca2-446c-80f4-75e69c65def9" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DerivativeLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeTable_1ae92de0-2a1a-468b-8f4c-300b6bbbcaae" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DerivativeTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_DerivativeLineItems_b5d4b0d9-0ca2-446c-80f4-75e69c65def9" xlink:to="loc_us-gaap_DerivativeTable_1ae92de0-2a1a-468b-8f4c-300b6bbbcaae" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtInstrumentAxis_7dbfcaaf-feb3-41fc-8c46-ee60e34f2398" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtInstrumentAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_DerivativeTable_1ae92de0-2a1a-468b-8f4c-300b6bbbcaae" xlink:to="loc_us-gaap_DebtInstrumentAxis_7dbfcaaf-feb3-41fc-8c46-ee60e34f2398" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtInstrumentNameDomain_7dbfcaaf-feb3-41fc-8c46-ee60e34f2398_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtInstrumentNameDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_DebtInstrumentAxis_7dbfcaaf-feb3-41fc-8c46-ee60e34f2398" xlink:to="loc_us-gaap_DebtInstrumentNameDomain_7dbfcaaf-feb3-41fc-8c46-ee60e34f2398_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtInstrumentNameDomain_bd4e2b34-9341-4ebb-9402-f1e38248dab6" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtInstrumentNameDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_DebtInstrumentAxis_7dbfcaaf-feb3-41fc-8c46-ee60e34f2398" xlink:to="loc_us-gaap_DebtInstrumentNameDomain_bd4e2b34-9341-4ebb-9402-f1e38248dab6" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_ClearedSwapsMember_107b5ca5-1e21-4a8b-bb90-09b27bbc09a1" xlink:href="agm-20240331.xsd#agm_ClearedSwapsMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentNameDomain_bd4e2b34-9341-4ebb-9402-f1e38248dab6" xlink:to="loc_agm_ClearedSwapsMember_107b5ca5-1e21-4a8b-bb90-09b27bbc09a1" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_UnclearedSwapsMember_135663a8-0c25-4501-9637-ca84d28829ae" xlink:href="agm-20240331.xsd#agm_UnclearedSwapsMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentNameDomain_bd4e2b34-9341-4ebb-9402-f1e38248dab6" xlink:to="loc_agm_UnclearedSwapsMember_135663a8-0c25-4501-9637-ca84d28829ae" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeInstrumentRiskAxis_da1ac9d9-afb2-4968-85f7-a8f11d9e26a2" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DerivativeInstrumentRiskAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_DerivativeTable_1ae92de0-2a1a-468b-8f4c-300b6bbbcaae" xlink:to="loc_us-gaap_DerivativeInstrumentRiskAxis_da1ac9d9-afb2-4968-85f7-a8f11d9e26a2" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeContractTypeDomain_da1ac9d9-afb2-4968-85f7-a8f11d9e26a2_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DerivativeContractTypeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_DerivativeInstrumentRiskAxis_da1ac9d9-afb2-4968-85f7-a8f11d9e26a2" xlink:to="loc_us-gaap_DerivativeContractTypeDomain_da1ac9d9-afb2-4968-85f7-a8f11d9e26a2_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeContractTypeDomain_691eec8e-9b6d-4975-ab04-bc93cc13722f" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DerivativeContractTypeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_DerivativeInstrumentRiskAxis_da1ac9d9-afb2-4968-85f7-a8f11d9e26a2" xlink:to="loc_us-gaap_DerivativeContractTypeDomain_691eec8e-9b6d-4975-ab04-bc93cc13722f" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InterestRateSwapMember_7bb16942-38aa-4868-b3e7-34099dc582f5" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_InterestRateSwapMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeContractTypeDomain_691eec8e-9b6d-4975-ab04-bc93cc13722f" xlink:to="loc_us-gaap_InterestRateSwapMember_7bb16942-38aa-4868-b3e7-34099dc582f5" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TransactionTypeAxis_6d2a5ae3-f4f6-4ea0-a17a-8b215641634b" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_TransactionTypeAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_DerivativeTable_1ae92de0-2a1a-468b-8f4c-300b6bbbcaae" xlink:to="loc_us-gaap_TransactionTypeAxis_6d2a5ae3-f4f6-4ea0-a17a-8b215641634b" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TransactionDomain_6d2a5ae3-f4f6-4ea0-a17a-8b215641634b_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_TransactionDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_TransactionTypeAxis_6d2a5ae3-f4f6-4ea0-a17a-8b215641634b" xlink:to="loc_us-gaap_TransactionDomain_6d2a5ae3-f4f6-4ea0-a17a-8b215641634b_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TransactionDomain_540818cc-2322-497d-a23e-a65ece62a13a" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_TransactionDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_TransactionTypeAxis_6d2a5ae3-f4f6-4ea0-a17a-8b215641634b" xlink:to="loc_us-gaap_TransactionDomain_540818cc-2322-497d-a23e-a65ece62a13a" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ExchangeClearedMember_9d77dd14-2acb-4070-ab3f-e59fdbdeb1a5" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ExchangeClearedMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_TransactionDomain_540818cc-2322-497d-a23e-a65ece62a13a" xlink:to="loc_us-gaap_ExchangeClearedMember_9d77dd14-2acb-4070-ab3f-e59fdbdeb1a5" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinancingReceivableAccruedInterestAfterAllowanceForCreditLoss_653a1fc9-72a8-441a-a952-22384b7e0bfc" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FinancingReceivableAccruedInterestAfterAllowanceForCreditLoss"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeLineItems_b5d4b0d9-0ca2-446c-80f4-75e69c65def9" xlink:to="loc_us-gaap_FinancingReceivableAccruedInterestAfterAllowanceForCreditLoss_653a1fc9-72a8-441a-a952-22384b7e0bfc" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinancingReceivableAccruedInterestAfterAllowanceForCreditLossStatementOfFinancialPositionExtensibleList_f4c0d61b-4afd-401d-8e19-f0c33f1c19f2" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FinancingReceivableAccruedInterestAfterAllowanceForCreditLossStatementOfFinancialPositionExtensibleList"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FinancingReceivableAccruedInterestAfterAllowanceForCreditLoss_653a1fc9-72a8-441a-a952-22384b7e0bfc" xlink:to="loc_us-gaap_FinancingReceivableAccruedInterestAfterAllowanceForCreditLossStatementOfFinancialPositionExtensibleList_f4c0d61b-4afd-401d-8e19-f0c33f1c19f2" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_FinanceReceivableAccruedInterestPayable_130b4f2c-8168-49be-93d4-910b0d79bae8" xlink:href="agm-20240331.xsd#agm_FinanceReceivableAccruedInterestPayable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeLineItems_b5d4b0d9-0ca2-446c-80f4-75e69c65def9" xlink:to="loc_agm_FinanceReceivableAccruedInterestPayable_130b4f2c-8168-49be-93d4-910b0d79bae8" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InterestRateCashFlowHedgeGainLossToBeReclassifiedDuringNext12MonthsNet_bed47a09-9474-4f8c-b314-d7afdb0af053" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_InterestRateCashFlowHedgeGainLossToBeReclassifiedDuringNext12MonthsNet"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeLineItems_b5d4b0d9-0ca2-446c-80f4-75e69c65def9" xlink:to="loc_us-gaap_InterestRateCashFlowHedgeGainLossToBeReclassifiedDuringNext12MonthsNet_bed47a09-9474-4f8c-b314-d7afdb0af053" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_GainLossOnDiscontinuationOfInterestRateCashFlowHedgeDueToForecastedTransactionProbableOfNotOccurringNet_3c2bb359-9149-4eab-bb23-699977b7c757" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_GainLossOnDiscontinuationOfInterestRateCashFlowHedgeDueToForecastedTransactionProbableOfNotOccurringNet"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeLineItems_b5d4b0d9-0ca2-446c-80f4-75e69c65def9" xlink:to="loc_us-gaap_GainLossOnDiscontinuationOfInterestRateCashFlowHedgeDueToForecastedTransactionProbableOfNotOccurringNet_3c2bb359-9149-4eab-bb23-699977b7c757" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SecuritiesPurchasedUnderAgreementsToResell_d1e0961c-3511-454c-9ffc-313573801497" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SecuritiesPurchasedUnderAgreementsToResell"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeLineItems_b5d4b0d9-0ca2-446c-80f4-75e69c65def9" xlink:to="loc_us-gaap_SecuritiesPurchasedUnderAgreementsToResell_d1e0961c-3511-454c-9ffc-313573801497" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeAssetNotionalAmount_c14386b7-7ac8-4e04-848b-4968fed4dd00" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DerivativeAssetNotionalAmount"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeLineItems_b5d4b0d9-0ca2-446c-80f4-75e69c65def9" xlink:to="loc_us-gaap_DerivativeAssetNotionalAmount_c14386b7-7ac8-4e04-848b-4968fed4dd00" xlink:type="arc" order="5"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.farmermac.com/role/FINANCIALDERIVATIVESScheduleofDerivativeInstrumentsinStatementofFinancialPositionDetails" xlink:type="simple" xlink:href="agm-20240331.xsd#FINANCIALDERIVATIVESScheduleofDerivativeInstrumentsinStatementofFinancialPositionDetails"/>
  <link:definitionLink xlink:role="http://www.farmermac.com/role/FINANCIALDERIVATIVESScheduleofDerivativeInstrumentsinStatementofFinancialPositionDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeLineItems_982c683e-1520-46af-8965-8dcbf0d2f5a6" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DerivativeLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeTable_8bd3fc60-777d-4c9c-9ff1-63025a16504b" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DerivativeTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_DerivativeLineItems_982c683e-1520-46af-8965-8dcbf0d2f5a6" xlink:to="loc_us-gaap_DerivativeTable_8bd3fc60-777d-4c9c-9ff1-63025a16504b" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_HedgingDesignationAxis_a9d7e5d3-7d2b-436b-a5ec-2234f834b665" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_HedgingDesignationAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_DerivativeTable_8bd3fc60-777d-4c9c-9ff1-63025a16504b" xlink:to="loc_us-gaap_HedgingDesignationAxis_a9d7e5d3-7d2b-436b-a5ec-2234f834b665" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_HedgingDesignationDomain_a9d7e5d3-7d2b-436b-a5ec-2234f834b665_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_HedgingDesignationDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_HedgingDesignationAxis_a9d7e5d3-7d2b-436b-a5ec-2234f834b665" xlink:to="loc_us-gaap_HedgingDesignationDomain_a9d7e5d3-7d2b-436b-a5ec-2234f834b665_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_HedgingDesignationDomain_14617b1a-170e-427f-9b5e-94956eef94e8" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_HedgingDesignationDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_HedgingDesignationAxis_a9d7e5d3-7d2b-436b-a5ec-2234f834b665" xlink:to="loc_us-gaap_HedgingDesignationDomain_14617b1a-170e-427f-9b5e-94956eef94e8" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DesignatedAsHedgingInstrumentMember_32713329-5640-4bd4-aefd-97589f431afe" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DesignatedAsHedgingInstrumentMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_HedgingDesignationDomain_14617b1a-170e-427f-9b5e-94956eef94e8" xlink:to="loc_us-gaap_DesignatedAsHedgingInstrumentMember_32713329-5640-4bd4-aefd-97589f431afe" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NondesignatedMember_394afa86-5753-48e5-82fd-0f3066cec005" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_NondesignatedMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_HedgingDesignationDomain_14617b1a-170e-427f-9b5e-94956eef94e8" xlink:to="loc_us-gaap_NondesignatedMember_394afa86-5753-48e5-82fd-0f3066cec005" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeInstrumentsGainLossByHedgingRelationshipAxis_eba76f24-7dc5-4280-b1bd-4a7ddf7709ce" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DerivativeInstrumentsGainLossByHedgingRelationshipAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_DerivativeTable_8bd3fc60-777d-4c9c-9ff1-63025a16504b" xlink:to="loc_us-gaap_DerivativeInstrumentsGainLossByHedgingRelationshipAxis_eba76f24-7dc5-4280-b1bd-4a7ddf7709ce" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_HedgingRelationshipDomain_eba76f24-7dc5-4280-b1bd-4a7ddf7709ce_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_HedgingRelationshipDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_DerivativeInstrumentsGainLossByHedgingRelationshipAxis_eba76f24-7dc5-4280-b1bd-4a7ddf7709ce" xlink:to="loc_us-gaap_HedgingRelationshipDomain_eba76f24-7dc5-4280-b1bd-4a7ddf7709ce_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_HedgingRelationshipDomain_d4211ab2-fb52-4fd8-98f9-ad52545f5357" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_HedgingRelationshipDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_DerivativeInstrumentsGainLossByHedgingRelationshipAxis_eba76f24-7dc5-4280-b1bd-4a7ddf7709ce" xlink:to="loc_us-gaap_HedgingRelationshipDomain_d4211ab2-fb52-4fd8-98f9-ad52545f5357" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FairValueHedgingMember_ea5be167-0f01-4654-9555-0872c158f060" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FairValueHedgingMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_HedgingRelationshipDomain_d4211ab2-fb52-4fd8-98f9-ad52545f5357" xlink:to="loc_us-gaap_FairValueHedgingMember_ea5be167-0f01-4654-9555-0872c158f060" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CashFlowHedgingMember_b994703f-be6e-466d-901e-68a9502418e1" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_CashFlowHedgingMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_HedgingRelationshipDomain_d4211ab2-fb52-4fd8-98f9-ad52545f5357" xlink:to="loc_us-gaap_CashFlowHedgingMember_b994703f-be6e-466d-901e-68a9502418e1" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeInstrumentRiskAxis_c3288eb2-f45f-4b3b-960e-6d529103c3e0" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DerivativeInstrumentRiskAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_DerivativeTable_8bd3fc60-777d-4c9c-9ff1-63025a16504b" xlink:to="loc_us-gaap_DerivativeInstrumentRiskAxis_c3288eb2-f45f-4b3b-960e-6d529103c3e0" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeContractTypeDomain_c3288eb2-f45f-4b3b-960e-6d529103c3e0_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DerivativeContractTypeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_DerivativeInstrumentRiskAxis_c3288eb2-f45f-4b3b-960e-6d529103c3e0" xlink:to="loc_us-gaap_DerivativeContractTypeDomain_c3288eb2-f45f-4b3b-960e-6d529103c3e0_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeContractTypeDomain_8a1b4bc4-927d-489d-bf85-67b277bc469b" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DerivativeContractTypeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_DerivativeInstrumentRiskAxis_c3288eb2-f45f-4b3b-960e-6d529103c3e0" xlink:to="loc_us-gaap_DerivativeContractTypeDomain_8a1b4bc4-927d-489d-bf85-67b277bc469b" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_InterestRateSwapReceiveFixedNonCallableMember_c7d207ec-e52a-4198-811e-67303c4e214e" xlink:href="agm-20240331.xsd#agm_InterestRateSwapReceiveFixedNonCallableMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeContractTypeDomain_8a1b4bc4-927d-489d-bf85-67b277bc469b" xlink:to="loc_agm_InterestRateSwapReceiveFixedNonCallableMember_c7d207ec-e52a-4198-811e-67303c4e214e" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_InterestRateSwapPayFixedNonCallableMember_3ad631e5-8050-45a4-b449-a16dd9f1faae" xlink:href="agm-20240331.xsd#agm_InterestRateSwapPayFixedNonCallableMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeContractTypeDomain_8a1b4bc4-927d-489d-bf85-67b277bc469b" xlink:to="loc_agm_InterestRateSwapPayFixedNonCallableMember_3ad631e5-8050-45a4-b449-a16dd9f1faae" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_InterestRateSwapReceiveFixedCallableMember_69e5ba99-7d53-4f5d-bda7-6d52e2b3a4b5" xlink:href="agm-20240331.xsd#agm_InterestRateSwapReceiveFixedCallableMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeContractTypeDomain_8a1b4bc4-927d-489d-bf85-67b277bc469b" xlink:to="loc_agm_InterestRateSwapReceiveFixedCallableMember_69e5ba99-7d53-4f5d-bda7-6d52e2b3a4b5" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BasisSwapMember_efd96ed6-91cb-4203-a41f-d8483a10307b" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_BasisSwapMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeContractTypeDomain_8a1b4bc4-927d-489d-bf85-67b277bc469b" xlink:to="loc_us-gaap_BasisSwapMember_efd96ed6-91cb-4203-a41f-d8483a10307b" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FutureMember_303b6f3b-776f-4e53-9510-8b6ad9702aae" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FutureMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeContractTypeDomain_8a1b4bc4-927d-489d-bf85-67b277bc469b" xlink:to="loc_us-gaap_FutureMember_303b6f3b-776f-4e53-9510-8b6ad9702aae" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NotionalAmountOfDerivativesAbstract_8e49cc0a-a82e-4332-bde3-f7af39805ed5" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_NotionalAmountOfDerivativesAbstract"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeLineItems_982c683e-1520-46af-8965-8dcbf0d2f5a6" xlink:to="loc_us-gaap_NotionalAmountOfDerivativesAbstract_8e49cc0a-a82e-4332-bde3-f7af39805ed5" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeAssetNotionalAmount_f94aa547-1e22-4be1-9091-555f5edf06ad" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DerivativeAssetNotionalAmount"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_NotionalAmountOfDerivativesAbstract_8e49cc0a-a82e-4332-bde3-f7af39805ed5" xlink:to="loc_us-gaap_DerivativeAssetNotionalAmount_f94aa547-1e22-4be1-9091-555f5edf06ad" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeAssetFairValueNetAbstract_d9031d76-5025-4055-9222-3454cceec96c" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DerivativeAssetFairValueNetAbstract"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeLineItems_982c683e-1520-46af-8965-8dcbf0d2f5a6" xlink:to="loc_us-gaap_DerivativeAssetFairValueNetAbstract_d9031d76-5025-4055-9222-3454cceec96c" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeAssetsAbstract_5c267ff1-af0f-4d91-b6d8-302f84ca6106" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DerivativeAssetsAbstract"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeAssetFairValueNetAbstract_d9031d76-5025-4055-9222-3454cceec96c" xlink:to="loc_us-gaap_DerivativeAssetsAbstract_5c267ff1-af0f-4d91-b6d8-302f84ca6106" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeAssets_cd7fc578-e064-4a16-8fdb-ba201d3a545f" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DerivativeAssets"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeAssetsAbstract_5c267ff1-af0f-4d91-b6d8-302f84ca6106" xlink:to="loc_us-gaap_DerivativeAssets_cd7fc578-e064-4a16-8fdb-ba201d3a545f" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeAssetFairValueGrossLiability_dd97ed31-16e5-47b6-8257-eb7819fc6ec9" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DerivativeAssetFairValueGrossLiability"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeAssetsAbstract_5c267ff1-af0f-4d91-b6d8-302f84ca6106" xlink:to="loc_us-gaap_DerivativeAssetFairValueGrossLiability_dd97ed31-16e5-47b6-8257-eb7819fc6ec9" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeLiabilitiesAbstract_c4226ec6-8418-4f15-bd9c-03249ca0543f" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DerivativeLiabilitiesAbstract"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeAssetFairValueNetAbstract_d9031d76-5025-4055-9222-3454cceec96c" xlink:to="loc_us-gaap_DerivativeLiabilitiesAbstract_c4226ec6-8418-4f15-bd9c-03249ca0543f" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeLiabilities_3528b2a6-f3e5-4d02-afba-c45f5a07a8ac" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DerivativeLiabilities"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeLiabilitiesAbstract_c4226ec6-8418-4f15-bd9c-03249ca0543f" xlink:to="loc_us-gaap_DerivativeLiabilities_3528b2a6-f3e5-4d02-afba-c45f5a07a8ac" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeLiabilityFairValueGrossAsset_8a2e16df-729c-4f55-92a4-6530bf420dfe" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DerivativeLiabilityFairValueGrossAsset"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeLiabilitiesAbstract_c4226ec6-8418-4f15-bd9c-03249ca0543f" xlink:to="loc_us-gaap_DerivativeLiabilityFairValueGrossAsset_8a2e16df-729c-4f55-92a4-6530bf420dfe" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeAverageFixedInterestRate_5fda05f6-7d7d-4f7c-bd2f-f03186dc95b8" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DerivativeAverageFixedInterestRate"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeLineItems_982c683e-1520-46af-8965-8dcbf0d2f5a6" xlink:to="loc_us-gaap_DerivativeAverageFixedInterestRate_5fda05f6-7d7d-4f7c-bd2f-f03186dc95b8" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeAverageVariableInterestRate_edaba0fb-9f98-4029-92c6-4b87496827d4" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DerivativeAverageVariableInterestRate"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeLineItems_982c683e-1520-46af-8965-8dcbf0d2f5a6" xlink:to="loc_us-gaap_DerivativeAverageVariableInterestRate_edaba0fb-9f98-4029-92c6-4b87496827d4" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_DerivativeWeightedAverageForwardPrice_73da0449-adfe-48cd-9a8f-eb4d27e6e838" xlink:href="agm-20240331.xsd#agm_DerivativeWeightedAverageForwardPrice"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeLineItems_982c683e-1520-46af-8965-8dcbf0d2f5a6" xlink:to="loc_agm_DerivativeWeightedAverageForwardPrice_73da0449-adfe-48cd-9a8f-eb4d27e6e838" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeAverageRemainingMaturity1_1d47e759-8c66-44c6-afe8-b0ce94879012" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DerivativeAverageRemainingMaturity1"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeLineItems_982c683e-1520-46af-8965-8dcbf0d2f5a6" xlink:to="loc_us-gaap_DerivativeAverageRemainingMaturity1_1d47e759-8c66-44c6-afe8-b0ce94879012" xlink:type="arc" order="5"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.farmermac.com/role/FINANCIALDERIVATIVESScheduleofNetIncomeExpenseRecognizedDetails" xlink:type="simple" xlink:href="agm-20240331.xsd#FINANCIALDERIVATIVESScheduleofNetIncomeExpenseRecognizedDetails"/>
  <link:definitionLink xlink:role="http://www.farmermac.com/role/FINANCIALDERIVATIVESScheduleofNetIncomeExpenseRecognizedDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeInstrumentsGainLossLineItems_4ebcfffa-609b-455c-9875-7316f74aece3" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DerivativeInstrumentsGainLossLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeInstrumentsGainLossByHedgingRelationshipByIncomeStatementLocationByDerivativeInstrumentRiskTable_fbc77b3c-9775-4f58-a095-cd21e50d550f" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DerivativeInstrumentsGainLossByHedgingRelationshipByIncomeStatementLocationByDerivativeInstrumentRiskTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_DerivativeInstrumentsGainLossLineItems_4ebcfffa-609b-455c-9875-7316f74aece3" xlink:to="loc_us-gaap_DerivativeInstrumentsGainLossByHedgingRelationshipByIncomeStatementLocationByDerivativeInstrumentRiskTable_fbc77b3c-9775-4f58-a095-cd21e50d550f" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeInstrumentRiskAxis_019de5cb-b621-4857-a105-9c5fc8552bdf" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DerivativeInstrumentRiskAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_DerivativeInstrumentsGainLossByHedgingRelationshipByIncomeStatementLocationByDerivativeInstrumentRiskTable_fbc77b3c-9775-4f58-a095-cd21e50d550f" xlink:to="loc_us-gaap_DerivativeInstrumentRiskAxis_019de5cb-b621-4857-a105-9c5fc8552bdf" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeContractTypeDomain_019de5cb-b621-4857-a105-9c5fc8552bdf_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DerivativeContractTypeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_DerivativeInstrumentRiskAxis_019de5cb-b621-4857-a105-9c5fc8552bdf" xlink:to="loc_us-gaap_DerivativeContractTypeDomain_019de5cb-b621-4857-a105-9c5fc8552bdf_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeContractTypeDomain_b7661d40-59d6-43de-9321-8460a240c220" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DerivativeContractTypeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_DerivativeInstrumentRiskAxis_019de5cb-b621-4857-a105-9c5fc8552bdf" xlink:to="loc_us-gaap_DerivativeContractTypeDomain_b7661d40-59d6-43de-9321-8460a240c220" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InterestRateSwapMember_3c5aad09-870d-4bc3-a826-136d42a7846d" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_InterestRateSwapMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeContractTypeDomain_b7661d40-59d6-43de-9321-8460a240c220" xlink:to="loc_us-gaap_InterestRateSwapMember_3c5aad09-870d-4bc3-a826-136d42a7846d" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FutureMember_9f358380-6e9c-4f74-8d1b-303008937a48" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FutureMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeContractTypeDomain_b7661d40-59d6-43de-9321-8460a240c220" xlink:to="loc_us-gaap_FutureMember_9f358380-6e9c-4f74-8d1b-303008937a48" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeStatementLocationAxis_7617a26a-0de5-4e26-982e-b2f5e25aaeb7" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_IncomeStatementLocationAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_DerivativeInstrumentsGainLossByHedgingRelationshipByIncomeStatementLocationByDerivativeInstrumentRiskTable_fbc77b3c-9775-4f58-a095-cd21e50d550f" xlink:to="loc_us-gaap_IncomeStatementLocationAxis_7617a26a-0de5-4e26-982e-b2f5e25aaeb7" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeStatementLocationDomain_7617a26a-0de5-4e26-982e-b2f5e25aaeb7_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_IncomeStatementLocationDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_IncomeStatementLocationAxis_7617a26a-0de5-4e26-982e-b2f5e25aaeb7" xlink:to="loc_us-gaap_IncomeStatementLocationDomain_7617a26a-0de5-4e26-982e-b2f5e25aaeb7_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeStatementLocationDomain_105ad143-cb71-4020-a071-97886f458df7" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_IncomeStatementLocationDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_IncomeStatementLocationAxis_7617a26a-0de5-4e26-982e-b2f5e25aaeb7" xlink:to="loc_us-gaap_IncomeStatementLocationDomain_105ad143-cb71-4020-a071-97886f458df7" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_InterestRevenueExpenseNetMember_6190a696-a695-4907-8626-289a573865df" xlink:href="agm-20240331.xsd#agm_InterestRevenueExpenseNetMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncomeStatementLocationDomain_105ad143-cb71-4020-a071-97886f458df7" xlink:to="loc_agm_InterestRevenueExpenseNetMember_6190a696-a695-4907-8626-289a573865df" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InterestIncomeMember_b317a4fa-e73a-464c-a589-32491f4f56e3" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_InterestIncomeMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncomeStatementLocationDomain_105ad143-cb71-4020-a071-97886f458df7" xlink:to="loc_us-gaap_InterestIncomeMember_b317a4fa-e73a-464c-a589-32491f4f56e3" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LoansAndFinanceReceivablesMember_2afb9ce4-1ddb-4a0c-8ee4-f053c3311c1a" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LoansAndFinanceReceivablesMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncomeStatementLocationDomain_105ad143-cb71-4020-a071-97886f458df7" xlink:to="loc_us-gaap_LoansAndFinanceReceivablesMember_2afb9ce4-1ddb-4a0c-8ee4-f053c3311c1a" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InterestExpenseMember_79b4105e-92a5-45fa-8fe5-671c669950c6" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_InterestExpenseMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncomeStatementLocationDomain_105ad143-cb71-4020-a071-97886f458df7" xlink:to="loc_us-gaap_InterestExpenseMember_79b4105e-92a5-45fa-8fe5-671c669950c6" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_GainLossOnDerivativeInstrumentsMember_bfaac184-0ca3-4afc-950f-3c878da99f7d" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_GainLossOnDerivativeInstrumentsMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncomeStatementLocationDomain_105ad143-cb71-4020-a071-97886f458df7" xlink:to="loc_us-gaap_GainLossOnDerivativeInstrumentsMember_bfaac184-0ca3-4afc-950f-3c878da99f7d" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_HedgingDesignationAxis_35ba275a-1f8f-4b5c-9fc2-95e881be9cde" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_HedgingDesignationAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_DerivativeInstrumentsGainLossByHedgingRelationshipByIncomeStatementLocationByDerivativeInstrumentRiskTable_fbc77b3c-9775-4f58-a095-cd21e50d550f" xlink:to="loc_us-gaap_HedgingDesignationAxis_35ba275a-1f8f-4b5c-9fc2-95e881be9cde" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_HedgingDesignationDomain_35ba275a-1f8f-4b5c-9fc2-95e881be9cde_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_HedgingDesignationDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_HedgingDesignationAxis_35ba275a-1f8f-4b5c-9fc2-95e881be9cde" xlink:to="loc_us-gaap_HedgingDesignationDomain_35ba275a-1f8f-4b5c-9fc2-95e881be9cde_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_HedgingDesignationDomain_a35aed5b-b13c-4feb-beee-6ea17516551c" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_HedgingDesignationDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_HedgingDesignationAxis_35ba275a-1f8f-4b5c-9fc2-95e881be9cde" xlink:to="loc_us-gaap_HedgingDesignationDomain_a35aed5b-b13c-4feb-beee-6ea17516551c" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DesignatedAsHedgingInstrumentMember_65ccc424-9e60-4dfe-88fa-b9978b20ccda" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DesignatedAsHedgingInstrumentMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_HedgingDesignationDomain_a35aed5b-b13c-4feb-beee-6ea17516551c" xlink:to="loc_us-gaap_DesignatedAsHedgingInstrumentMember_65ccc424-9e60-4dfe-88fa-b9978b20ccda" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NondesignatedMember_a0c9d76a-6736-443c-a63e-df065457b4a9" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_NondesignatedMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_HedgingDesignationDomain_a35aed5b-b13c-4feb-beee-6ea17516551c" xlink:to="loc_us-gaap_NondesignatedMember_a0c9d76a-6736-443c-a63e-df065457b4a9" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeInstrumentsGainLossByHedgingRelationshipAxis_4869fda3-2c2e-4ad6-bbf3-15862714d381" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DerivativeInstrumentsGainLossByHedgingRelationshipAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_DerivativeInstrumentsGainLossByHedgingRelationshipByIncomeStatementLocationByDerivativeInstrumentRiskTable_fbc77b3c-9775-4f58-a095-cd21e50d550f" xlink:to="loc_us-gaap_DerivativeInstrumentsGainLossByHedgingRelationshipAxis_4869fda3-2c2e-4ad6-bbf3-15862714d381" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_HedgingRelationshipDomain_4869fda3-2c2e-4ad6-bbf3-15862714d381_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_HedgingRelationshipDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_DerivativeInstrumentsGainLossByHedgingRelationshipAxis_4869fda3-2c2e-4ad6-bbf3-15862714d381" xlink:to="loc_us-gaap_HedgingRelationshipDomain_4869fda3-2c2e-4ad6-bbf3-15862714d381_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_HedgingRelationshipDomain_bffc43d5-be05-4ac9-8fd8-af3354e22177" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_HedgingRelationshipDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_DerivativeInstrumentsGainLossByHedgingRelationshipAxis_4869fda3-2c2e-4ad6-bbf3-15862714d381" xlink:to="loc_us-gaap_HedgingRelationshipDomain_bffc43d5-be05-4ac9-8fd8-af3354e22177" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FairValueHedgingMember_0040bd9f-99eb-4694-94e0-b75d2d6389ae" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FairValueHedgingMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_HedgingRelationshipDomain_bffc43d5-be05-4ac9-8fd8-af3354e22177" xlink:to="loc_us-gaap_FairValueHedgingMember_0040bd9f-99eb-4694-94e0-b75d2d6389ae" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CashFlowHedgingMember_648ce29d-78fa-4d10-892d-516b632db9a3" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_CashFlowHedgingMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_HedgingRelationshipDomain_bffc43d5-be05-4ac9-8fd8-af3354e22177" xlink:to="loc_us-gaap_CashFlowHedgingMember_648ce29d-78fa-4d10-892d-516b632db9a3" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InterestAndDividendIncomeSecurities_6f4f3ab5-8b96-49ab-a837-752f1c9979e9" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_InterestAndDividendIncomeSecurities"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeInstrumentsGainLossLineItems_4ebcfffa-609b-455c-9875-7316f74aece3" xlink:to="loc_us-gaap_InterestAndDividendIncomeSecurities_6f4f3ab5-8b96-49ab-a837-752f1c9979e9" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InterestIncomeOperating_cbb44fd4-15d8-4ed5-9576-b57e333d3153" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_InterestIncomeOperating"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeInstrumentsGainLossLineItems_4ebcfffa-609b-455c-9875-7316f74aece3" xlink:to="loc_us-gaap_InterestIncomeOperating_cbb44fd4-15d8-4ed5-9576-b57e333d3153" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InterestAndFeeIncomeLoansAndLeases_cc712cfb-4193-4a94-b096-24240e73ad1a" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_InterestAndFeeIncomeLoansAndLeases"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeInstrumentsGainLossLineItems_4ebcfffa-609b-455c-9875-7316f74aece3" xlink:to="loc_us-gaap_InterestAndFeeIncomeLoansAndLeases_cc712cfb-4193-4a94-b096-24240e73ad1a" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InterestExpense_8a8039cf-1800-4c83-8308-f9357eefc5fd" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_InterestExpense"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeInstrumentsGainLossLineItems_4ebcfffa-609b-455c-9875-7316f74aece3" xlink:to="loc_us-gaap_InterestExpense_8a8039cf-1800-4c83-8308-f9357eefc5fd" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_GainLossOnDerivativeInstrumentsNetPretax_892337c7-9c5e-4b66-b667-8f8288bbc6ce" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_GainLossOnDerivativeInstrumentsNetPretax"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeInstrumentsGainLossLineItems_4ebcfffa-609b-455c-9875-7316f74aece3" xlink:to="loc_us-gaap_GainLossOnDerivativeInstrumentsNetPretax_892337c7-9c5e-4b66-b667-8f8288bbc6ce" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_TotalAmountsOfLineItemsPresentedInTheConsolidatedStatementOfIncome_ca99eb3a-21fd-4cb4-8c1c-8640f2021261" xlink:href="agm-20240331.xsd#agm_TotalAmountsOfLineItemsPresentedInTheConsolidatedStatementOfIncome"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeInstrumentsGainLossLineItems_4ebcfffa-609b-455c-9875-7316f74aece3" xlink:to="loc_agm_TotalAmountsOfLineItemsPresentedInTheConsolidatedStatementOfIncome_ca99eb3a-21fd-4cb4-8c1c-8640f2021261" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_DerivativeNetInterestSettlements_bae524ab-3629-4f76-a6c6-6ba6e42a1e23" xlink:href="agm-20240331.xsd#agm_DerivativeNetInterestSettlements"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeInstrumentsGainLossLineItems_4ebcfffa-609b-455c-9875-7316f74aece3" xlink:to="loc_agm_DerivativeNetInterestSettlements_bae524ab-3629-4f76-a6c6-6ba6e42a1e23" xlink:type="arc" order="6"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_HedgedItemNetInterestSettlements_7040d0f8-3066-4a62-8038-c6417983fc3f" xlink:href="agm-20240331.xsd#agm_HedgedItemNetInterestSettlements"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeInstrumentsGainLossLineItems_4ebcfffa-609b-455c-9875-7316f74aece3" xlink:to="loc_agm_HedgedItemNetInterestSettlements_7040d0f8-3066-4a62-8038-c6417983fc3f" xlink:type="arc" order="7"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_PremiumDiscountRecognizedOnHedgedInstrument_37648eea-e912-4c18-b0c8-12d6a5108557" xlink:href="agm-20240331.xsd#agm_PremiumDiscountRecognizedOnHedgedInstrument"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeInstrumentsGainLossLineItems_4ebcfffa-609b-455c-9875-7316f74aece3" xlink:to="loc_agm_PremiumDiscountRecognizedOnHedgedInstrument_37648eea-e912-4c18-b0c8-12d6a5108557" xlink:type="arc" order="8"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_IncomeExpenseInterestSettlementsFairValueHedges_2ab5a1b7-67cd-4488-9869-99ba1939f6b7" xlink:href="agm-20240331.xsd#agm_IncomeExpenseInterestSettlementsFairValueHedges"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeInstrumentsGainLossLineItems_4ebcfffa-609b-455c-9875-7316f74aece3" xlink:to="loc_agm_IncomeExpenseInterestSettlementsFairValueHedges_2ab5a1b7-67cd-4488-9869-99ba1939f6b7" xlink:type="arc" order="9"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ChangeInUnrealizedGainLossOnFairValueHedgingInstruments1_f74a7e2c-7a4c-4d45-be3e-3e5a1d050831" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ChangeInUnrealizedGainLossOnFairValueHedgingInstruments1"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeInstrumentsGainLossLineItems_4ebcfffa-609b-455c-9875-7316f74aece3" xlink:to="loc_us-gaap_ChangeInUnrealizedGainLossOnFairValueHedgingInstruments1_f74a7e2c-7a4c-4d45-be3e-3e5a1d050831" xlink:type="arc" order="10"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ChangeInUnrealizedGainLossOnHedgedItemInFairValueHedge1_941d5239-69ab-4005-8483-93f930be4a65" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ChangeInUnrealizedGainLossOnHedgedItemInFairValueHedge1"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeInstrumentsGainLossLineItems_4ebcfffa-609b-455c-9875-7316f74aece3" xlink:to="loc_us-gaap_ChangeInUnrealizedGainLossOnHedgedItemInFairValueHedge1_941d5239-69ab-4005-8483-93f930be4a65" xlink:type="arc" order="11"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_GainLossOnFairValueHedgesRecognizedInEarnings_2fcbcfe0-07b8-48d8-b060-8e0ef942cfb5" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_GainLossOnFairValueHedgesRecognizedInEarnings"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeInstrumentsGainLossLineItems_4ebcfffa-609b-455c-9875-7316f74aece3" xlink:to="loc_us-gaap_GainLossOnFairValueHedgesRecognizedInEarnings_2fcbcfe0-07b8-48d8-b060-8e0ef942cfb5" xlink:type="arc" order="12"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ReclassificationFromAccumulatedOtherComprehensiveIncomeCurrentPeriodBeforeTax_e34f0a21-e7fa-42aa-bc53-395cdb0d4923" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ReclassificationFromAccumulatedOtherComprehensiveIncomeCurrentPeriodBeforeTax"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeInstrumentsGainLossLineItems_4ebcfffa-609b-455c-9875-7316f74aece3" xlink:to="loc_us-gaap_ReclassificationFromAccumulatedOtherComprehensiveIncomeCurrentPeriodBeforeTax_e34f0a21-e7fa-42aa-bc53-395cdb0d4923" xlink:type="arc" order="13"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_DerivativeNetHedgeIneffectivenessGainLossComponentRecognizedOnHedgedItem_1f4f3a7b-5fd9-4b5c-8e1a-88d6b335bba4" xlink:href="agm-20240331.xsd#agm_DerivativeNetHedgeIneffectivenessGainLossComponentRecognizedOnHedgedItem"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeInstrumentsGainLossLineItems_4ebcfffa-609b-455c-9875-7316f74aece3" xlink:to="loc_agm_DerivativeNetHedgeIneffectivenessGainLossComponentRecognizedOnHedgedItem_1f4f3a7b-5fd9-4b5c-8e1a-88d6b335bba4" xlink:type="arc" order="14"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossReclassificationAfterTax_2e7a4f18-a36d-4c3d-8c8f-1552706ba13c" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossReclassificationAfterTax"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeInstrumentsGainLossLineItems_4ebcfffa-609b-455c-9875-7316f74aece3" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossReclassificationAfterTax_2e7a4f18-a36d-4c3d-8c8f-1552706ba13c" xlink:type="arc" order="15"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NoninterestIncome_c7f7c573-9f87-4ded-b31e-2c3f549e6fc7" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_NoninterestIncome"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeInstrumentsGainLossLineItems_4ebcfffa-609b-455c-9875-7316f74aece3" xlink:to="loc_us-gaap_NoninterestIncome_c7f7c573-9f87-4ded-b31e-2c3f549e6fc7" xlink:type="arc" order="16"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.farmermac.com/role/FINANCIALDERIVATIVESHedgedItemsinFairValueHedgingRelationshipsDetails" xlink:type="simple" xlink:href="agm-20240331.xsd#FINANCIALDERIVATIVESHedgedItemsinFairValueHedgingRelationshipsDetails"/>
  <link:definitionLink xlink:role="http://www.farmermac.com/role/FINANCIALDERIVATIVESHedgedItemsinFairValueHedgingRelationshipsDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_agm_HedgedItemsinFairValueHedgingRelationshipLineItems_a016202c-1a37-4260-917b-b7f928fe05c3" xlink:href="agm-20240331.xsd#agm_HedgedItemsinFairValueHedgingRelationshipLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_HedgedItemsinFairValueHedgingRelationshipTable_d6e20aa1-418a-4c04-b8de-ce274d5daa8d" xlink:href="agm-20240331.xsd#agm_HedgedItemsinFairValueHedgingRelationshipTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_agm_HedgedItemsinFairValueHedgingRelationshipLineItems_a016202c-1a37-4260-917b-b7f928fe05c3" xlink:to="loc_agm_HedgedItemsinFairValueHedgingRelationshipTable_d6e20aa1-418a-4c04-b8de-ce274d5daa8d" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinancialInstrumentAxis_07f0c6ac-0b2e-4ab2-85e3-26f0953cbb7a" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FinancialInstrumentAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_agm_HedgedItemsinFairValueHedgingRelationshipTable_d6e20aa1-418a-4c04-b8de-ce274d5daa8d" xlink:to="loc_us-gaap_FinancialInstrumentAxis_07f0c6ac-0b2e-4ab2-85e3-26f0953cbb7a" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_07f0c6ac-0b2e-4ab2-85e3-26f0953cbb7a_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_FinancialInstrumentAxis_07f0c6ac-0b2e-4ab2-85e3-26f0953cbb7a" xlink:to="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_07f0c6ac-0b2e-4ab2-85e3-26f0953cbb7a_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_b5e535c7-4df2-48c8-9e59-9a54c34ca595" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_FinancialInstrumentAxis_07f0c6ac-0b2e-4ab2-85e3-26f0953cbb7a" xlink:to="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_b5e535c7-4df2-48c8-9e59-9a54c34ca595" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_MortgageBackedSecuritiesIssuedByUSGovernmentSponsoredEnterprisesMember_8a809dc1-e76f-4d3e-a81e-746b0045ee93" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_MortgageBackedSecuritiesIssuedByUSGovernmentSponsoredEnterprisesMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_b5e535c7-4df2-48c8-9e59-9a54c34ca595" xlink:to="loc_us-gaap_MortgageBackedSecuritiesIssuedByUSGovernmentSponsoredEnterprisesMember_8a809dc1-e76f-4d3e-a81e-746b0045ee93" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BalanceSheetLocationAxis_debd390d-c978-4c79-aa2e-e3a0921f99c2" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_BalanceSheetLocationAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_agm_HedgedItemsinFairValueHedgingRelationshipTable_d6e20aa1-418a-4c04-b8de-ce274d5daa8d" xlink:to="loc_us-gaap_BalanceSheetLocationAxis_debd390d-c978-4c79-aa2e-e3a0921f99c2" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BalanceSheetLocationDomain_debd390d-c978-4c79-aa2e-e3a0921f99c2_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_BalanceSheetLocationDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_BalanceSheetLocationAxis_debd390d-c978-4c79-aa2e-e3a0921f99c2" xlink:to="loc_us-gaap_BalanceSheetLocationDomain_debd390d-c978-4c79-aa2e-e3a0921f99c2_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BalanceSheetLocationDomain_37d4a535-ea01-40a8-a188-f4e9e7f66868" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_BalanceSheetLocationDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_BalanceSheetLocationAxis_debd390d-c978-4c79-aa2e-e3a0921f99c2" xlink:to="loc_us-gaap_BalanceSheetLocationDomain_37d4a535-ea01-40a8-a188-f4e9e7f66868" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_DebtSecuritiesAvailableForSaleMember_572afe5f-48f8-47aa-8ba7-1495ecf96572" xlink:href="agm-20240331.xsd#agm_DebtSecuritiesAvailableForSaleMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BalanceSheetLocationDomain_37d4a535-ea01-40a8-a188-f4e9e7f66868" xlink:to="loc_agm_DebtSecuritiesAvailableForSaleMember_572afe5f-48f8-47aa-8ba7-1495ecf96572" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LoansMember_e4b6d37e-f98a-4c94-8f21-aa82ad15dbfe" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LoansMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BalanceSheetLocationDomain_37d4a535-ea01-40a8-a188-f4e9e7f66868" xlink:to="loc_us-gaap_LoansMember_e4b6d37e-f98a-4c94-8f21-aa82ad15dbfe" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongTermDebtMember_c816b23c-7b31-4e3f-bdee-25424d91657d" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LongTermDebtMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BalanceSheetLocationDomain_37d4a535-ea01-40a8-a188-f4e9e7f66868" xlink:to="loc_us-gaap_LongTermDebtMember_c816b23c-7b31-4e3f-bdee-25424d91657d" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeAmountOfHedgedItem_c78f2581-d869-4acd-b8b2-d4f57a946b38" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DerivativeAmountOfHedgedItem"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_agm_HedgedItemsinFairValueHedgingRelationshipLineItems_a016202c-1a37-4260-917b-b7f928fe05c3" xlink:to="loc_us-gaap_DerivativeAmountOfHedgedItem_c78f2581-d869-4acd-b8b2-d4f57a946b38" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_HedgedAssetFairValueHedgeCumulativeIncreaseDecrease_c6822677-7763-46ea-be80-0fea6c4886a5" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_HedgedAssetFairValueHedgeCumulativeIncreaseDecrease"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_agm_HedgedItemsinFairValueHedgingRelationshipLineItems_a016202c-1a37-4260-917b-b7f928fe05c3" xlink:to="loc_us-gaap_HedgedAssetFairValueHedgeCumulativeIncreaseDecrease_c6822677-7763-46ea-be80-0fea6c4886a5" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_HedgedLiabilityFairValueHedgeCumulativeIncreaseDecrease_a32cb4de-2173-456f-b075-a059abc1f016" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_HedgedLiabilityFairValueHedgeCumulativeIncreaseDecrease"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_agm_HedgedItemsinFairValueHedgingRelationshipLineItems_a016202c-1a37-4260-917b-b7f928fe05c3" xlink:to="loc_us-gaap_HedgedLiabilityFairValueHedgeCumulativeIncreaseDecrease_a32cb4de-2173-456f-b075-a059abc1f016" xlink:type="arc" order="2"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.farmermac.com/role/FINANCIALDERIVATIVESScheduleofFairValueofFinancialAssetsandLiabilitiesDetails" xlink:type="simple" xlink:href="agm-20240331.xsd#FINANCIALDERIVATIVESScheduleofFairValueofFinancialAssetsandLiabilitiesDetails"/>
  <link:definitionLink xlink:role="http://www.farmermac.com/role/FINANCIALDERIVATIVESScheduleofFairValueofFinancialAssetsandLiabilitiesDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeLineItems_51dc108d-09ae-41e4-899e-25a7761c9178" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DerivativeLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeTable_a3985d56-f99f-4402-9d42-ffe28c2ee772" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DerivativeTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_DerivativeLineItems_51dc108d-09ae-41e4-899e-25a7761c9178" xlink:to="loc_us-gaap_DerivativeTable_a3985d56-f99f-4402-9d42-ffe28c2ee772" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeInstrumentRiskAxis_667e5c68-2fdf-4b67-8cc4-8e87de6286ad" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DerivativeInstrumentRiskAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_DerivativeTable_a3985d56-f99f-4402-9d42-ffe28c2ee772" xlink:to="loc_us-gaap_DerivativeInstrumentRiskAxis_667e5c68-2fdf-4b67-8cc4-8e87de6286ad" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeContractTypeDomain_667e5c68-2fdf-4b67-8cc4-8e87de6286ad_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DerivativeContractTypeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_DerivativeInstrumentRiskAxis_667e5c68-2fdf-4b67-8cc4-8e87de6286ad" xlink:to="loc_us-gaap_DerivativeContractTypeDomain_667e5c68-2fdf-4b67-8cc4-8e87de6286ad_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeContractTypeDomain_1455f7bb-80e3-4fbb-9092-d217034bf7d3" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DerivativeContractTypeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_DerivativeInstrumentRiskAxis_667e5c68-2fdf-4b67-8cc4-8e87de6286ad" xlink:to="loc_us-gaap_DerivativeContractTypeDomain_1455f7bb-80e3-4fbb-9092-d217034bf7d3" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_UnclearedDerivativesMember_ea6a7c62-e828-47ca-b66f-94bc68138721" xlink:href="agm-20240331.xsd#agm_UnclearedDerivativesMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeContractTypeDomain_1455f7bb-80e3-4fbb-9092-d217034bf7d3" xlink:to="loc_agm_UnclearedDerivativesMember_ea6a7c62-e828-47ca-b66f-94bc68138721" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_ClearedDerivativesMember_bb5d3955-288f-4a19-b953-a791edff38a7" xlink:href="agm-20240331.xsd#agm_ClearedDerivativesMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeContractTypeDomain_1455f7bb-80e3-4fbb-9092-d217034bf7d3" xlink:to="loc_agm_ClearedDerivativesMember_bb5d3955-288f-4a19-b953-a791edff38a7" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OffsettingDerivativeAssetsAbstract_7ccd8e7f-e9b6-4283-82c9-b4997a4fbdf7" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OffsettingDerivativeAssetsAbstract"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeLineItems_51dc108d-09ae-41e4-899e-25a7761c9178" xlink:to="loc_us-gaap_OffsettingDerivativeAssetsAbstract_7ccd8e7f-e9b6-4283-82c9-b4997a4fbdf7" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeFairValueOfDerivativeAsset_8dc7567f-6b6b-4ad0-a98c-bbf33ca4870a" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DerivativeFairValueOfDerivativeAsset"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_OffsettingDerivativeAssetsAbstract_7ccd8e7f-e9b6-4283-82c9-b4997a4fbdf7" xlink:to="loc_us-gaap_DerivativeFairValueOfDerivativeAsset_8dc7567f-6b6b-4ad0-a98c-bbf33ca4870a" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeAssetFairValueGrossLiability_0d6c1ed3-7433-4bd9-a837-4e90467a1e1a" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DerivativeAssetFairValueGrossLiability"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_OffsettingDerivativeAssetsAbstract_7ccd8e7f-e9b6-4283-82c9-b4997a4fbdf7" xlink:to="loc_us-gaap_DerivativeAssetFairValueGrossLiability_0d6c1ed3-7433-4bd9-a837-4e90467a1e1a" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeAssetFairValueGrossAssetIncludingNotSubjectToMasterNettingArrangement_6080f5a3-dc2f-4283-896c-9316ba5e54f4" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DerivativeAssetFairValueGrossAssetIncludingNotSubjectToMasterNettingArrangement"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_OffsettingDerivativeAssetsAbstract_7ccd8e7f-e9b6-4283-82c9-b4997a4fbdf7" xlink:to="loc_us-gaap_DerivativeAssetFairValueGrossAssetIncludingNotSubjectToMasterNettingArrangement_6080f5a3-dc2f-4283-896c-9316ba5e54f4" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeAssetNotOffsetPolicyElectionDeduction_a5985cc1-c553-429f-b66a-4c054d1e1c52" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DerivativeAssetNotOffsetPolicyElectionDeduction"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_OffsettingDerivativeAssetsAbstract_7ccd8e7f-e9b6-4283-82c9-b4997a4fbdf7" xlink:to="loc_us-gaap_DerivativeAssetNotOffsetPolicyElectionDeduction_a5985cc1-c553-429f-b66a-4c054d1e1c52" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_DerivativeAssetSubjectToMasterNettingArrangementCollateralObligationToReturnSecurityNotOffsetNet_57cde600-4d92-45ba-8ef2-c88c61a135e3" xlink:href="agm-20240331.xsd#agm_DerivativeAssetSubjectToMasterNettingArrangementCollateralObligationToReturnSecurityNotOffsetNet"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_OffsettingDerivativeAssetsAbstract_7ccd8e7f-e9b6-4283-82c9-b4997a4fbdf7" xlink:to="loc_agm_DerivativeAssetSubjectToMasterNettingArrangementCollateralObligationToReturnSecurityNotOffsetNet_57cde600-4d92-45ba-8ef2-c88c61a135e3" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeCollateralObligationToReturnCash_4a69dfaf-2efe-4170-b245-633e2f981652" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DerivativeCollateralObligationToReturnCash"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_OffsettingDerivativeAssetsAbstract_7ccd8e7f-e9b6-4283-82c9-b4997a4fbdf7" xlink:to="loc_us-gaap_DerivativeCollateralObligationToReturnCash_4a69dfaf-2efe-4170-b245-633e2f981652" xlink:type="arc" order="6"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeFairValueOfDerivativeAssetAmountOffsetAgainstCollateral_21d9bdb0-a14a-4698-853d-50a58e61c043" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DerivativeFairValueOfDerivativeAssetAmountOffsetAgainstCollateral"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_OffsettingDerivativeAssetsAbstract_7ccd8e7f-e9b6-4283-82c9-b4997a4fbdf7" xlink:to="loc_us-gaap_DerivativeFairValueOfDerivativeAssetAmountOffsetAgainstCollateral_21d9bdb0-a14a-4698-853d-50a58e61c043" xlink:type="arc" order="7"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OffsettingDerivativeLiabilitiesAbstract_6bfd06ab-a98f-4da7-b26c-ff3135fad3b6" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OffsettingDerivativeLiabilitiesAbstract"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeLineItems_51dc108d-09ae-41e4-899e-25a7761c9178" xlink:to="loc_us-gaap_OffsettingDerivativeLiabilitiesAbstract_6bfd06ab-a98f-4da7-b26c-ff3135fad3b6" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeFairValueOfDerivativeLiability_0a2fedfb-d906-47a1-8ab6-6bd0eed39314" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DerivativeFairValueOfDerivativeLiability"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_OffsettingDerivativeLiabilitiesAbstract_6bfd06ab-a98f-4da7-b26c-ff3135fad3b6" xlink:to="loc_us-gaap_DerivativeFairValueOfDerivativeLiability_0a2fedfb-d906-47a1-8ab6-6bd0eed39314" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeLiabilityFairValueGrossAsset_12e4d647-00b5-40d2-bd1e-fd4dbda3c222" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DerivativeLiabilityFairValueGrossAsset"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_OffsettingDerivativeLiabilitiesAbstract_6bfd06ab-a98f-4da7-b26c-ff3135fad3b6" xlink:to="loc_us-gaap_DerivativeLiabilityFairValueGrossAsset_12e4d647-00b5-40d2-bd1e-fd4dbda3c222" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeLiabilityFairValueGrossLiabilityIncludingNotSubjectToMasterNettingArrangement_3429005f-29f6-490f-b146-055ed5cc5123" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DerivativeLiabilityFairValueGrossLiabilityIncludingNotSubjectToMasterNettingArrangement"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_OffsettingDerivativeLiabilitiesAbstract_6bfd06ab-a98f-4da7-b26c-ff3135fad3b6" xlink:to="loc_us-gaap_DerivativeLiabilityFairValueGrossLiabilityIncludingNotSubjectToMasterNettingArrangement_3429005f-29f6-490f-b146-055ed5cc5123" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeLiabilityNotOffsetPolicyElectionDeduction_6e3bd89a-8e7f-48b2-83ec-7a7a4b733097" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DerivativeLiabilityNotOffsetPolicyElectionDeduction"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_OffsettingDerivativeLiabilitiesAbstract_6bfd06ab-a98f-4da7-b26c-ff3135fad3b6" xlink:to="loc_us-gaap_DerivativeLiabilityNotOffsetPolicyElectionDeduction_6e3bd89a-8e7f-48b2-83ec-7a7a4b733097" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeCollateralRightToReclaimSecurities_35607216-0196-42b3-a2e7-7c2da68ba1c0" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DerivativeCollateralRightToReclaimSecurities"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_OffsettingDerivativeLiabilitiesAbstract_6bfd06ab-a98f-4da7-b26c-ff3135fad3b6" xlink:to="loc_us-gaap_DerivativeCollateralRightToReclaimSecurities_35607216-0196-42b3-a2e7-7c2da68ba1c0" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeCollateralRightToReclaimCash_20353639-0b6a-4dac-8a0a-e3628d7fcde1" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DerivativeCollateralRightToReclaimCash"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_OffsettingDerivativeLiabilitiesAbstract_6bfd06ab-a98f-4da7-b26c-ff3135fad3b6" xlink:to="loc_us-gaap_DerivativeCollateralRightToReclaimCash_20353639-0b6a-4dac-8a0a-e3628d7fcde1" xlink:type="arc" order="6"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_DerivativeLiabilityIncludingNotSubjectToMasterNettingArrangementAfterOffsetAndDeductionNetAmount_59e290f1-2960-4ea6-a1d1-06731e7900fe" xlink:href="agm-20240331.xsd#agm_DerivativeLiabilityIncludingNotSubjectToMasterNettingArrangementAfterOffsetAndDeductionNetAmount"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_OffsettingDerivativeLiabilitiesAbstract_6bfd06ab-a98f-4da7-b26c-ff3135fad3b6" xlink:to="loc_agm_DerivativeLiabilityIncludingNotSubjectToMasterNettingArrangementAfterOffsetAndDeductionNetAmount_59e290f1-2960-4ea6-a1d1-06731e7900fe" xlink:type="arc" order="7"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeLiabilityNotSubjectToMasterNettingArrangement_6627ebb6-9a93-4303-87ed-8d15e6261fc2" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DerivativeLiabilityNotSubjectToMasterNettingArrangement"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeLineItems_51dc108d-09ae-41e4-899e-25a7761c9178" xlink:to="loc_us-gaap_DerivativeLiabilityNotSubjectToMasterNettingArrangement_6627ebb6-9a93-4303-87ed-8d15e6261fc2" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeAssetCollateralObligationToReturnCashOffset_467c3fb8-11d0-40c5-a65d-502fa527c496" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DerivativeAssetCollateralObligationToReturnCashOffset"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeLineItems_51dc108d-09ae-41e4-899e-25a7761c9178" xlink:to="loc_us-gaap_DerivativeAssetCollateralObligationToReturnCashOffset_467c3fb8-11d0-40c5-a65d-502fa527c496" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_DerivativeCollateralExceedingDerivativePositionAdditionalNetExposure_f06c8d77-92d1-4d74-9edc-1a3f5f26fbd8" xlink:href="agm-20240331.xsd#agm_DerivativeCollateralExceedingDerivativePositionAdditionalNetExposure"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeLineItems_51dc108d-09ae-41e4-899e-25a7761c9178" xlink:to="loc_agm_DerivativeCollateralExceedingDerivativePositionAdditionalNetExposure_f06c8d77-92d1-4d74-9edc-1a3f5f26fbd8" xlink:type="arc" order="4"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.farmermac.com/role/LOANSNarrativeDetails" xlink:type="simple" xlink:href="agm-20240331.xsd#LOANSNarrativeDetails"/>
  <link:definitionLink xlink:role="http://www.farmermac.com/role/LOANSNarrativeDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccountsNotesAndLoansReceivableLineItems_b92daa30-20d0-4213-9222-d87831355f4e" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AccountsNotesAndLoansReceivableLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ScheduleOfAccountsNotesLoansAndFinancingReceivableTable_106cd241-549b-4bef-95dc-1721cfbfa85d" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ScheduleOfAccountsNotesLoansAndFinancingReceivableTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_AccountsNotesAndLoansReceivableLineItems_b92daa30-20d0-4213-9222-d87831355f4e" xlink:to="loc_us-gaap_ScheduleOfAccountsNotesLoansAndFinancingReceivableTable_106cd241-549b-4bef-95dc-1721cfbfa85d" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StatementBusinessSegmentsAxis_129c287b-fde1-40f9-9328-f8c4808460c4" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_StatementBusinessSegmentsAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfAccountsNotesLoansAndFinancingReceivableTable_106cd241-549b-4bef-95dc-1721cfbfa85d" xlink:to="loc_us-gaap_StatementBusinessSegmentsAxis_129c287b-fde1-40f9-9328-f8c4808460c4" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SegmentDomain_129c287b-fde1-40f9-9328-f8c4808460c4_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SegmentDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementBusinessSegmentsAxis_129c287b-fde1-40f9-9328-f8c4808460c4" xlink:to="loc_us-gaap_SegmentDomain_129c287b-fde1-40f9-9328-f8c4808460c4_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SegmentDomain_03b0768b-0da3-4da8-927d-eff515d32234" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SegmentDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementBusinessSegmentsAxis_129c287b-fde1-40f9-9328-f8c4808460c4" xlink:to="loc_us-gaap_SegmentDomain_03b0768b-0da3-4da8-927d-eff515d32234" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_RuralInfrastructureFinanceMember_adff0363-3d63-42fe-b351-4ab143e46a61" xlink:href="agm-20240331.xsd#agm_RuralInfrastructureFinanceMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_03b0768b-0da3-4da8-927d-eff515d32234" xlink:to="loc_agm_RuralInfrastructureFinanceMember_adff0363-3d63-42fe-b351-4ab143e46a61" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_AgriculturalFinanceMember_af476f76-622d-46c9-b224-2903dc273caa" xlink:href="agm-20240331.xsd#agm_AgriculturalFinanceMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_03b0768b-0da3-4da8-927d-eff515d32234" xlink:to="loc_agm_AgriculturalFinanceMember_af476f76-622d-46c9-b224-2903dc273caa" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LoansHeldForSaleFairValueDisclosure_b08fa506-eb9a-457e-bfcf-323746e1d97c" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LoansHeldForSaleFairValueDisclosure"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AccountsNotesAndLoansReceivableLineItems_b92daa30-20d0-4213-9222-d87831355f4e" xlink:to="loc_us-gaap_LoansHeldForSaleFairValueDisclosure_b08fa506-eb9a-457e-bfcf-323746e1d97c" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NumberOfOperatingSegments_9b8d93ac-e2df-4127-9621-8d96f1857247" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_NumberOfOperatingSegments"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AccountsNotesAndLoansReceivableLineItems_b92daa30-20d0-4213-9222-d87831355f4e" xlink:to="loc_us-gaap_NumberOfOperatingSegments_9b8d93ac-e2df-4127-9621-8d96f1857247" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinancingReceivableExcludingAccruedInterestCreditLossExpenseReversal_8f395bc3-b7cc-4a16-bee0-4badc90bde8c" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FinancingReceivableExcludingAccruedInterestCreditLossExpenseReversal"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AccountsNotesAndLoansReceivableLineItems_b92daa30-20d0-4213-9222-d87831355f4e" xlink:to="loc_us-gaap_FinancingReceivableExcludingAccruedInterestCreditLossExpenseReversal_8f395bc3-b7cc-4a16-bee0-4badc90bde8c" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_FinancingReceivablePercentOfPrincipalBalancePaidDown_b8ee0ba9-edf1-4496-ba83-ec2a03508e61" xlink:href="agm-20240331.xsd#agm_FinancingReceivablePercentOfPrincipalBalancePaidDown"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AccountsNotesAndLoansReceivableLineItems_b92daa30-20d0-4213-9222-d87831355f4e" xlink:to="loc_agm_FinancingReceivablePercentOfPrincipalBalancePaidDown_b8ee0ba9-edf1-4496-ba83-ec2a03508e61" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInFinanceReceivables_f295b711-eac7-4a6c-b5d1-2fb912ea4120" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_IncreaseDecreaseInFinanceReceivables"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AccountsNotesAndLoansReceivableLineItems_b92daa30-20d0-4213-9222-d87831355f4e" xlink:to="loc_us-gaap_IncreaseDecreaseInFinanceReceivables_f295b711-eac7-4a6c-b5d1-2fb912ea4120" xlink:type="arc" order="4"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.farmermac.com/role/LOANSScheduleofCompositionofLoanBalancesDetails" xlink:type="simple" xlink:href="agm-20240331.xsd#LOANSScheduleofCompositionofLoanBalancesDetails"/>
  <link:definitionLink xlink:role="http://www.farmermac.com/role/LOANSScheduleofCompositionofLoanBalancesDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccountsNotesAndLoansReceivableLineItems_85a9be73-adac-46be-9e07-2db3138368de" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AccountsNotesAndLoansReceivableLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ScheduleOfAccountsNotesLoansAndFinancingReceivableTable_c9407375-8839-47d1-ac9c-8010dddf8d59" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ScheduleOfAccountsNotesLoansAndFinancingReceivableTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_AccountsNotesAndLoansReceivableLineItems_85a9be73-adac-46be-9e07-2db3138368de" xlink:to="loc_us-gaap_ScheduleOfAccountsNotesLoansAndFinancingReceivableTable_c9407375-8839-47d1-ac9c-8010dddf8d59" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_ProductOrServiceAxis_824d2b8f-f434-45de-b197-eeb4109c49fe" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_ProductOrServiceAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfAccountsNotesLoansAndFinancingReceivableTable_c9407375-8839-47d1-ac9c-8010dddf8d59" xlink:to="loc_srt_ProductOrServiceAxis_824d2b8f-f434-45de-b197-eeb4109c49fe" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_ProductsAndServicesDomain_824d2b8f-f434-45de-b197-eeb4109c49fe_default" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_ProductsAndServicesDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_srt_ProductOrServiceAxis_824d2b8f-f434-45de-b197-eeb4109c49fe" xlink:to="loc_srt_ProductsAndServicesDomain_824d2b8f-f434-45de-b197-eeb4109c49fe_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_ProductsAndServicesDomain_b72c321e-397c-4d46-80a0-46d98e32ba15" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_ProductsAndServicesDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_srt_ProductOrServiceAxis_824d2b8f-f434-45de-b197-eeb4109c49fe" xlink:to="loc_srt_ProductsAndServicesDomain_b72c321e-397c-4d46-80a0-46d98e32ba15" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_UnsecuritizedMember_0a50eefd-daec-46c3-bb2f-f3553a16ebb6" xlink:href="agm-20240331.xsd#agm_UnsecuritizedMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_ProductsAndServicesDomain_b72c321e-397c-4d46-80a0-46d98e32ba15" xlink:to="loc_agm_UnsecuritizedMember_0a50eefd-daec-46c3-bb2f-f3553a16ebb6" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_InConsolidatedTrustsMember_1fe6ae59-994b-4b3d-98b6-343a8e94dcce" xlink:href="agm-20240331.xsd#agm_InConsolidatedTrustsMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_ProductsAndServicesDomain_b72c321e-397c-4d46-80a0-46d98e32ba15" xlink:to="loc_agm_InConsolidatedTrustsMember_1fe6ae59-994b-4b3d-98b6-343a8e94dcce" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StatementBusinessSegmentsAxis_d2e236a6-7866-494e-8e87-6036567403ec" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_StatementBusinessSegmentsAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfAccountsNotesLoansAndFinancingReceivableTable_c9407375-8839-47d1-ac9c-8010dddf8d59" xlink:to="loc_us-gaap_StatementBusinessSegmentsAxis_d2e236a6-7866-494e-8e87-6036567403ec" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SegmentDomain_d2e236a6-7866-494e-8e87-6036567403ec_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SegmentDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementBusinessSegmentsAxis_d2e236a6-7866-494e-8e87-6036567403ec" xlink:to="loc_us-gaap_SegmentDomain_d2e236a6-7866-494e-8e87-6036567403ec_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SegmentDomain_05abd924-2b19-453a-831d-21f5a5806e69" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SegmentDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementBusinessSegmentsAxis_d2e236a6-7866-494e-8e87-6036567403ec" xlink:to="loc_us-gaap_SegmentDomain_05abd924-2b19-453a-831d-21f5a5806e69" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_AgriculturalFinanceMember_45989c2b-3845-4f53-b3c8-420160b0e0c4" xlink:href="agm-20240331.xsd#agm_AgriculturalFinanceMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_05abd924-2b19-453a-831d-21f5a5806e69" xlink:to="loc_agm_AgriculturalFinanceMember_45989c2b-3845-4f53-b3c8-420160b0e0c4" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_AgricultureFinanceFarmAndRanchSegmentMember_f566ac47-68eb-4a4a-8004-63dfefd3bd91" xlink:href="agm-20240331.xsd#agm_AgricultureFinanceFarmAndRanchSegmentMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_agm_AgriculturalFinanceMember_45989c2b-3845-4f53-b3c8-420160b0e0c4" xlink:to="loc_agm_AgricultureFinanceFarmAndRanchSegmentMember_f566ac47-68eb-4a4a-8004-63dfefd3bd91" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_AgricultureFinanceCorporateAgFinanceSegmentMember_879f34a4-def5-4350-a282-15373795c892" xlink:href="agm-20240331.xsd#agm_AgricultureFinanceCorporateAgFinanceSegmentMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_agm_AgriculturalFinanceMember_45989c2b-3845-4f53-b3c8-420160b0e0c4" xlink:to="loc_agm_AgricultureFinanceCorporateAgFinanceSegmentMember_879f34a4-def5-4350-a282-15373795c892" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_RuralInfrastructureFinanceMember_7bb3b067-637d-468b-882b-b69dc3311607" xlink:href="agm-20240331.xsd#agm_RuralInfrastructureFinanceMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_05abd924-2b19-453a-831d-21f5a5806e69" xlink:to="loc_agm_RuralInfrastructureFinanceMember_7bb3b067-637d-468b-882b-b69dc3311607" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinancingReceivableRecordedInvestmentByClassOfFinancingReceivableAxis_c4b7e427-5cfc-4eec-ad70-837dd42409e6" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FinancingReceivableRecordedInvestmentByClassOfFinancingReceivableAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfAccountsNotesLoansAndFinancingReceivableTable_c9407375-8839-47d1-ac9c-8010dddf8d59" xlink:to="loc_us-gaap_FinancingReceivableRecordedInvestmentByClassOfFinancingReceivableAxis_c4b7e427-5cfc-4eec-ad70-837dd42409e6" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinancingReceivableRecordedInvestmentClassOfFinancingReceivableDomain_c4b7e427-5cfc-4eec-ad70-837dd42409e6_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FinancingReceivableRecordedInvestmentClassOfFinancingReceivableDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_FinancingReceivableRecordedInvestmentByClassOfFinancingReceivableAxis_c4b7e427-5cfc-4eec-ad70-837dd42409e6" xlink:to="loc_us-gaap_FinancingReceivableRecordedInvestmentClassOfFinancingReceivableDomain_c4b7e427-5cfc-4eec-ad70-837dd42409e6_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinancingReceivableRecordedInvestmentClassOfFinancingReceivableDomain_ea0930aa-d70c-45c4-b114-bb6f3b96db73" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FinancingReceivableRecordedInvestmentClassOfFinancingReceivableDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_FinancingReceivableRecordedInvestmentByClassOfFinancingReceivableAxis_c4b7e427-5cfc-4eec-ad70-837dd42409e6" xlink:to="loc_us-gaap_FinancingReceivableRecordedInvestmentClassOfFinancingReceivableDomain_ea0930aa-d70c-45c4-b114-bb6f3b96db73" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RealEstateLoanMember_6a281e57-3fea-48b5-91e3-0ad4bb2dc686" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_RealEstateLoanMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FinancingReceivableRecordedInvestmentClassOfFinancingReceivableDomain_ea0930aa-d70c-45c4-b114-bb6f3b96db73" xlink:to="loc_us-gaap_RealEstateLoanMember_6a281e57-3fea-48b5-91e3-0ad4bb2dc686" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinancingReceivableExcludingAccruedInterestBeforeAllowanceForCreditLossFeeAndLoanInProcess_bd474577-7440-461e-b96c-d957eda85cb8" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FinancingReceivableExcludingAccruedInterestBeforeAllowanceForCreditLossFeeAndLoanInProcess"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AccountsNotesAndLoansReceivableLineItems_85a9be73-adac-46be-9e07-2db3138368de" xlink:to="loc_us-gaap_FinancingReceivableExcludingAccruedInterestBeforeAllowanceForCreditLossFeeAndLoanInProcess_bd474577-7440-461e-b96c-d957eda85cb8" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinancingReceivableUnamortizedLoanCommitmentOriginationFeeAndPremiumDiscount_8a71d704-3d9a-4bbb-bddc-e55a859beefb" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FinancingReceivableUnamortizedLoanCommitmentOriginationFeeAndPremiumDiscount"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AccountsNotesAndLoansReceivableLineItems_85a9be73-adac-46be-9e07-2db3138368de" xlink:to="loc_us-gaap_FinancingReceivableUnamortizedLoanCommitmentOriginationFeeAndPremiumDiscount_8a71d704-3d9a-4bbb-bddc-e55a859beefb" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_FinancingReceivableExcludingAccruedInterestBeforeAllowanceForCreditLossAndLoansHeldForSaleFairValueDisclosure_2eb627f1-5d44-46f2-9987-089f24fdc8c2" xlink:href="agm-20240331.xsd#agm_FinancingReceivableExcludingAccruedInterestBeforeAllowanceForCreditLossAndLoansHeldForSaleFairValueDisclosure"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AccountsNotesAndLoansReceivableLineItems_85a9be73-adac-46be-9e07-2db3138368de" xlink:to="loc_agm_FinancingReceivableExcludingAccruedInterestBeforeAllowanceForCreditLossAndLoansHeldForSaleFairValueDisclosure_2eb627f1-5d44-46f2-9987-089f24fdc8c2" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinancingReceivableAllowanceForCreditLossExcludingAccruedInterest_f12734e0-4711-417b-b59c-241420e02a2e" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FinancingReceivableAllowanceForCreditLossExcludingAccruedInterest"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AccountsNotesAndLoansReceivableLineItems_85a9be73-adac-46be-9e07-2db3138368de" xlink:to="loc_us-gaap_FinancingReceivableAllowanceForCreditLossExcludingAccruedInterest_f12734e0-4711-417b-b59c-241420e02a2e" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinancingReceivableExcludingAccruedInterestAfterAllowanceForCreditLoss_58d1e516-1418-40d3-90dc-c42f37ab46f8" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FinancingReceivableExcludingAccruedInterestAfterAllowanceForCreditLoss"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AccountsNotesAndLoansReceivableLineItems_85a9be73-adac-46be-9e07-2db3138368de" xlink:to="loc_us-gaap_FinancingReceivableExcludingAccruedInterestAfterAllowanceForCreditLoss_58d1e516-1418-40d3-90dc-c42f37ab46f8" xlink:type="arc" order="4"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.farmermac.com/role/LOANSAllowanceforLossesDetails" xlink:type="simple" xlink:href="agm-20240331.xsd#LOANSAllowanceforLossesDetails"/>
  <link:definitionLink xlink:role="http://www.farmermac.com/role/LOANSAllowanceforLossesDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinancingReceivableAllowanceForCreditLossesLineItems_6cc3430a-fd47-4d15-831b-16e8938822b5" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FinancingReceivableAllowanceForCreditLossesLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ScheduleOfFinancingReceivableAllowanceForCreditLossesTable_b71222e3-3e00-437f-86df-98b493d5c249" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ScheduleOfFinancingReceivableAllowanceForCreditLossesTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_FinancingReceivableAllowanceForCreditLossesLineItems_6cc3430a-fd47-4d15-831b-16e8938822b5" xlink:to="loc_us-gaap_ScheduleOfFinancingReceivableAllowanceForCreditLossesTable_b71222e3-3e00-437f-86df-98b493d5c249" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StatementBusinessSegmentsAxis_d10b569e-5a93-45be-81bb-13f1e3954be2" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_StatementBusinessSegmentsAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfFinancingReceivableAllowanceForCreditLossesTable_b71222e3-3e00-437f-86df-98b493d5c249" xlink:to="loc_us-gaap_StatementBusinessSegmentsAxis_d10b569e-5a93-45be-81bb-13f1e3954be2" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SegmentDomain_d10b569e-5a93-45be-81bb-13f1e3954be2_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SegmentDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementBusinessSegmentsAxis_d10b569e-5a93-45be-81bb-13f1e3954be2" xlink:to="loc_us-gaap_SegmentDomain_d10b569e-5a93-45be-81bb-13f1e3954be2_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SegmentDomain_7ecfad52-382b-4942-9568-72cf9e6c72a2" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SegmentDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementBusinessSegmentsAxis_d10b569e-5a93-45be-81bb-13f1e3954be2" xlink:to="loc_us-gaap_SegmentDomain_7ecfad52-382b-4942-9568-72cf9e6c72a2" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_AgriculturalFinanceMember_307c6ad5-51ef-427c-8171-9dac8e2294be" xlink:href="agm-20240331.xsd#agm_AgriculturalFinanceMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_7ecfad52-382b-4942-9568-72cf9e6c72a2" xlink:to="loc_agm_AgriculturalFinanceMember_307c6ad5-51ef-427c-8171-9dac8e2294be" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_AgricultureFinanceFarmAndRanchSegmentMember_871340de-2236-41b1-a31f-5941e0edf4bd" xlink:href="agm-20240331.xsd#agm_AgricultureFinanceFarmAndRanchSegmentMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_agm_AgriculturalFinanceMember_307c6ad5-51ef-427c-8171-9dac8e2294be" xlink:to="loc_agm_AgricultureFinanceFarmAndRanchSegmentMember_871340de-2236-41b1-a31f-5941e0edf4bd" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_AgricultureFinanceCorporateAgFinanceSegmentMember_1e0c091b-6d27-4b74-8124-bb26a9819f3d" xlink:href="agm-20240331.xsd#agm_AgricultureFinanceCorporateAgFinanceSegmentMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_agm_AgriculturalFinanceMember_307c6ad5-51ef-427c-8171-9dac8e2294be" xlink:to="loc_agm_AgricultureFinanceCorporateAgFinanceSegmentMember_1e0c091b-6d27-4b74-8124-bb26a9819f3d" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_RuralInfrastructureFinanceMember_c17ce109-d08f-487f-9285-25341e899c3c" xlink:href="agm-20240331.xsd#agm_RuralInfrastructureFinanceMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_7ecfad52-382b-4942-9568-72cf9e6c72a2" xlink:to="loc_agm_RuralInfrastructureFinanceMember_c17ce109-d08f-487f-9285-25341e899c3c" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinancingReceivableRecordedInvestmentByClassOfFinancingReceivableAxis_97dfb7f4-68a0-446c-9e72-0618fcc40f6b" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FinancingReceivableRecordedInvestmentByClassOfFinancingReceivableAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfFinancingReceivableAllowanceForCreditLossesTable_b71222e3-3e00-437f-86df-98b493d5c249" xlink:to="loc_us-gaap_FinancingReceivableRecordedInvestmentByClassOfFinancingReceivableAxis_97dfb7f4-68a0-446c-9e72-0618fcc40f6b" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinancingReceivableRecordedInvestmentClassOfFinancingReceivableDomain_97dfb7f4-68a0-446c-9e72-0618fcc40f6b_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FinancingReceivableRecordedInvestmentClassOfFinancingReceivableDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_FinancingReceivableRecordedInvestmentByClassOfFinancingReceivableAxis_97dfb7f4-68a0-446c-9e72-0618fcc40f6b" xlink:to="loc_us-gaap_FinancingReceivableRecordedInvestmentClassOfFinancingReceivableDomain_97dfb7f4-68a0-446c-9e72-0618fcc40f6b_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinancingReceivableRecordedInvestmentClassOfFinancingReceivableDomain_d9a6fba2-8c04-4b6b-8cf1-3a64356498fc" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FinancingReceivableRecordedInvestmentClassOfFinancingReceivableDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_FinancingReceivableRecordedInvestmentByClassOfFinancingReceivableAxis_97dfb7f4-68a0-446c-9e72-0618fcc40f6b" xlink:to="loc_us-gaap_FinancingReceivableRecordedInvestmentClassOfFinancingReceivableDomain_d9a6fba2-8c04-4b6b-8cf1-3a64356498fc" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RealEstateLoanMember_3e123e8b-7c2e-45f4-9b22-0ff7fb081c11" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_RealEstateLoanMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FinancingReceivableRecordedInvestmentClassOfFinancingReceivableDomain_d9a6fba2-8c04-4b6b-8cf1-3a64356498fc" xlink:to="loc_us-gaap_RealEstateLoanMember_3e123e8b-7c2e-45f4-9b22-0ff7fb081c11" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinancingReceivableAllowanceForCreditLossExcludingAccruedInterest_b01ee210-4f0c-445e-b80f-4aec31a92eb5" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FinancingReceivableAllowanceForCreditLossExcludingAccruedInterest"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FinancingReceivableAllowanceForCreditLossesLineItems_6cc3430a-fd47-4d15-831b-16e8938822b5" xlink:to="loc_us-gaap_FinancingReceivableAllowanceForCreditLossExcludingAccruedInterest_b01ee210-4f0c-445e-b80f-4aec31a92eb5" xlink:type="arc" order="0"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.farmermac.com/role/LOANSChangesintheAllowanceforLossesDetails" xlink:type="simple" xlink:href="agm-20240331.xsd#LOANSChangesintheAllowanceforLossesDetails"/>
  <link:definitionLink xlink:role="http://www.farmermac.com/role/LOANSChangesintheAllowanceforLossesDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinancingReceivableAllowanceForCreditLossesLineItems_98276230-9273-4554-82d7-70c5c166d2dc" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FinancingReceivableAllowanceForCreditLossesLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ScheduleOfFinancingReceivableAllowanceForCreditLossesTable_8291bd1c-d68c-4be2-881b-700f4a6d4d1c" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ScheduleOfFinancingReceivableAllowanceForCreditLossesTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_FinancingReceivableAllowanceForCreditLossesLineItems_98276230-9273-4554-82d7-70c5c166d2dc" xlink:to="loc_us-gaap_ScheduleOfFinancingReceivableAllowanceForCreditLossesTable_8291bd1c-d68c-4be2-881b-700f4a6d4d1c" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StatementBusinessSegmentsAxis_a1305e80-31a9-494f-9d17-abd8e8bde53b" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_StatementBusinessSegmentsAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfFinancingReceivableAllowanceForCreditLossesTable_8291bd1c-d68c-4be2-881b-700f4a6d4d1c" xlink:to="loc_us-gaap_StatementBusinessSegmentsAxis_a1305e80-31a9-494f-9d17-abd8e8bde53b" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SegmentDomain_a1305e80-31a9-494f-9d17-abd8e8bde53b_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SegmentDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementBusinessSegmentsAxis_a1305e80-31a9-494f-9d17-abd8e8bde53b" xlink:to="loc_us-gaap_SegmentDomain_a1305e80-31a9-494f-9d17-abd8e8bde53b_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SegmentDomain_855ee069-3d08-44d2-91c3-0ade2881acec" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SegmentDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementBusinessSegmentsAxis_a1305e80-31a9-494f-9d17-abd8e8bde53b" xlink:to="loc_us-gaap_SegmentDomain_855ee069-3d08-44d2-91c3-0ade2881acec" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_AgriculturalFinanceMember_2d7f9127-77be-4ceb-8e1e-8b338919febb" xlink:href="agm-20240331.xsd#agm_AgriculturalFinanceMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_855ee069-3d08-44d2-91c3-0ade2881acec" xlink:to="loc_agm_AgriculturalFinanceMember_2d7f9127-77be-4ceb-8e1e-8b338919febb" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_AgricultureFinanceFarmAndRanchSegmentMember_bacc5017-c464-4148-8c32-71dbe6f4548f" xlink:href="agm-20240331.xsd#agm_AgricultureFinanceFarmAndRanchSegmentMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_agm_AgriculturalFinanceMember_2d7f9127-77be-4ceb-8e1e-8b338919febb" xlink:to="loc_agm_AgricultureFinanceFarmAndRanchSegmentMember_bacc5017-c464-4148-8c32-71dbe6f4548f" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_AgricultureFinanceCorporateAgFinanceSegmentMember_949f6db6-d39f-49c0-b226-99511fc8b606" xlink:href="agm-20240331.xsd#agm_AgricultureFinanceCorporateAgFinanceSegmentMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_agm_AgriculturalFinanceMember_2d7f9127-77be-4ceb-8e1e-8b338919febb" xlink:to="loc_agm_AgricultureFinanceCorporateAgFinanceSegmentMember_949f6db6-d39f-49c0-b226-99511fc8b606" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_RuralInfrastructureFinanceMember_0dc5865d-32ed-495f-9ff5-f71cdd0f908a" xlink:href="agm-20240331.xsd#agm_RuralInfrastructureFinanceMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_855ee069-3d08-44d2-91c3-0ade2881acec" xlink:to="loc_agm_RuralInfrastructureFinanceMember_0dc5865d-32ed-495f-9ff5-f71cdd0f908a" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_RuralInfrastructureRuralUtilitiesSegementMember_0b525652-d505-4055-bbbc-3bb1a9cc1215" xlink:href="agm-20240331.xsd#agm_RuralInfrastructureRuralUtilitiesSegementMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_agm_RuralInfrastructureFinanceMember_0dc5865d-32ed-495f-9ff5-f71cdd0f908a" xlink:to="loc_agm_RuralInfrastructureRuralUtilitiesSegementMember_0b525652-d505-4055-bbbc-3bb1a9cc1215" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_RuralInfrastructureRenewableEnergySegmentMember_4f3dd608-748a-4820-8973-9a35aed3e762" xlink:href="agm-20240331.xsd#agm_RuralInfrastructureRenewableEnergySegmentMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_agm_RuralInfrastructureFinanceMember_0dc5865d-32ed-495f-9ff5-f71cdd0f908a" xlink:to="loc_agm_RuralInfrastructureRenewableEnergySegmentMember_4f3dd608-748a-4820-8973-9a35aed3e762" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_TreasuryFundingSegmentMember_9e87f327-1f4e-43ae-8996-e4c427330993" xlink:href="agm-20240331.xsd#agm_TreasuryFundingSegmentMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_855ee069-3d08-44d2-91c3-0ade2881acec" xlink:to="loc_agm_TreasuryFundingSegmentMember_9e87f327-1f4e-43ae-8996-e4c427330993" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_TreasuryInvestmentsSegmentMember_b18d35ef-eefc-4ff1-a2a6-82f92c38cb74" xlink:href="agm-20240331.xsd#agm_TreasuryInvestmentsSegmentMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_855ee069-3d08-44d2-91c3-0ade2881acec" xlink:to="loc_agm_TreasuryInvestmentsSegmentMember_b18d35ef-eefc-4ff1-a2a6-82f92c38cb74" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CorporateMember_57778eb5-dcfb-4c9e-ab78-98393e987220" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_CorporateMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_855ee069-3d08-44d2-91c3-0ade2881acec" xlink:to="loc_us-gaap_CorporateMember_57778eb5-dcfb-4c9e-ab78-98393e987220" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CollateralAxis_7d7a5a46-bced-43ba-9e95-9b6b825167b7" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_CollateralAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfFinancingReceivableAllowanceForCreditLossesTable_8291bd1c-d68c-4be2-881b-700f4a6d4d1c" xlink:to="loc_us-gaap_CollateralAxis_7d7a5a46-bced-43ba-9e95-9b6b825167b7" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CollateralDomain_7d7a5a46-bced-43ba-9e95-9b6b825167b7_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_CollateralDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_CollateralAxis_7d7a5a46-bced-43ba-9e95-9b6b825167b7" xlink:to="loc_us-gaap_CollateralDomain_7d7a5a46-bced-43ba-9e95-9b6b825167b7_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CollateralDomain_76042bc0-e51a-45bb-bf7d-53749dd3bb4d" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_CollateralDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_CollateralAxis_7d7a5a46-bced-43ba-9e95-9b6b825167b7" xlink:to="loc_us-gaap_CollateralDomain_76042bc0-e51a-45bb-bf7d-53749dd3bb4d" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CommercialRealEstateMember_be3f0746-614e-4ce0-abd9-e03720373a0c" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_CommercialRealEstateMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_CollateralDomain_76042bc0-e51a-45bb-bf7d-53749dd3bb4d" xlink:to="loc_us-gaap_CommercialRealEstateMember_be3f0746-614e-4ce0-abd9-e03720373a0c" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CollateralPledgedMember_e239f965-e068-4271-8eaa-28e78c69ed57" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_CollateralPledgedMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_CollateralDomain_76042bc0-e51a-45bb-bf7d-53749dd3bb4d" xlink:to="loc_us-gaap_CollateralPledgedMember_e239f965-e068-4271-8eaa-28e78c69ed57" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinancingReceivableAllowanceForCreditLossesRollForward_12ecb542-a42b-4700-92ee-05f8e73adaa9" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FinancingReceivableAllowanceForCreditLossesRollForward"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FinancingReceivableAllowanceForCreditLossesLineItems_98276230-9273-4554-82d7-70c5c166d2dc" xlink:to="loc_us-gaap_FinancingReceivableAllowanceForCreditLossesRollForward_12ecb542-a42b-4700-92ee-05f8e73adaa9" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinancingReceivableAllowanceForCreditLossExcludingAccruedInterest_c8571763-a491-45d5-9e96-b7c8b4d200f3" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FinancingReceivableAllowanceForCreditLossExcludingAccruedInterest"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FinancingReceivableAllowanceForCreditLossesRollForward_12ecb542-a42b-4700-92ee-05f8e73adaa9" xlink:to="loc_us-gaap_FinancingReceivableAllowanceForCreditLossExcludingAccruedInterest_c8571763-a491-45d5-9e96-b7c8b4d200f3" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinancingReceivableExcludingAccruedInterestCreditLossExpenseReversal_2f724ecb-a0fb-467f-86c9-c91dcebe2c14" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FinancingReceivableExcludingAccruedInterestCreditLossExpenseReversal"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FinancingReceivableAllowanceForCreditLossesRollForward_12ecb542-a42b-4700-92ee-05f8e73adaa9" xlink:to="loc_us-gaap_FinancingReceivableExcludingAccruedInterestCreditLossExpenseReversal_2f724ecb-a0fb-467f-86c9-c91dcebe2c14" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinancingReceivableExcludingAccruedInterestAllowanceForCreditLossWriteoff_6431ba00-0350-4cf2-9c53-38d8345384d4" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FinancingReceivableExcludingAccruedInterestAllowanceForCreditLossWriteoff"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FinancingReceivableAllowanceForCreditLossesRollForward_12ecb542-a42b-4700-92ee-05f8e73adaa9" xlink:to="loc_us-gaap_FinancingReceivableExcludingAccruedInterestAllowanceForCreditLossWriteoff_6431ba00-0350-4cf2-9c53-38d8345384d4" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinancingReceivableAllowanceForCreditLossExcludingAccruedInterest_658f42d1-8c87-489d-ac44-33c04b3311e4" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FinancingReceivableAllowanceForCreditLossExcludingAccruedInterest"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.farmermac.com/role/LOANSUnpaidPrincipalBalancesbyDelinquencyStatusDetails" xlink:type="simple" xlink:href="agm-20240331.xsd#LOANSUnpaidPrincipalBalancesbyDelinquencyStatusDetails"/>
  <link:definitionLink xlink:role="http://www.farmermac.com/role/LOANSUnpaidPrincipalBalancesbyDelinquencyStatusDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinancingReceivableRecordedInvestmentPastDueLineItems_1c84912d-30a2-4087-abe7-136d3c0a880a" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FinancingReceivableRecordedInvestmentPastDueLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ScheduleOfFinancingReceivablesPastDueTable_a4c6561c-4d4f-4de8-9ac6-2ba3be33cbd9" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ScheduleOfFinancingReceivablesPastDueTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_FinancingReceivableRecordedInvestmentPastDueLineItems_1c84912d-30a2-4087-abe7-136d3c0a880a" xlink:to="loc_us-gaap_ScheduleOfFinancingReceivablesPastDueTable_a4c6561c-4d4f-4de8-9ac6-2ba3be33cbd9" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinancingReceivablesPeriodPastDueAxis_5763269a-85a4-4d83-938d-b4cd40e3f341" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FinancingReceivablesPeriodPastDueAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfFinancingReceivablesPastDueTable_a4c6561c-4d4f-4de8-9ac6-2ba3be33cbd9" xlink:to="loc_us-gaap_FinancingReceivablesPeriodPastDueAxis_5763269a-85a4-4d83-938d-b4cd40e3f341" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinancingReceivablesPeriodPastDueDomain_5763269a-85a4-4d83-938d-b4cd40e3f341_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FinancingReceivablesPeriodPastDueDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_FinancingReceivablesPeriodPastDueAxis_5763269a-85a4-4d83-938d-b4cd40e3f341" xlink:to="loc_us-gaap_FinancingReceivablesPeriodPastDueDomain_5763269a-85a4-4d83-938d-b4cd40e3f341_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinancingReceivablesPeriodPastDueDomain_2be756f9-4581-4d18-ac69-ac147504009d" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FinancingReceivablesPeriodPastDueDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_FinancingReceivablesPeriodPastDueAxis_5763269a-85a4-4d83-938d-b4cd40e3f341" xlink:to="loc_us-gaap_FinancingReceivablesPeriodPastDueDomain_2be756f9-4581-4d18-ac69-ac147504009d" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinancialAssetNotPastDueMember_e5a4ec3e-10b4-461d-97ff-6e9165df70a1" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FinancialAssetNotPastDueMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FinancingReceivablesPeriodPastDueDomain_2be756f9-4581-4d18-ac69-ac147504009d" xlink:to="loc_us-gaap_FinancialAssetNotPastDueMember_e5a4ec3e-10b4-461d-97ff-6e9165df70a1" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinancialAssetPastDueMember_a31670f5-220b-4bde-a3cd-b008474f3917" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FinancialAssetPastDueMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FinancingReceivablesPeriodPastDueDomain_2be756f9-4581-4d18-ac69-ac147504009d" xlink:to="loc_us-gaap_FinancialAssetPastDueMember_a31670f5-220b-4bde-a3cd-b008474f3917" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinancingReceivables30To59DaysPastDueMember_347a0558-a4bb-4bcd-8d3a-57a4ef9b07fe" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FinancingReceivables30To59DaysPastDueMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FinancialAssetPastDueMember_a31670f5-220b-4bde-a3cd-b008474f3917" xlink:to="loc_us-gaap_FinancingReceivables30To59DaysPastDueMember_347a0558-a4bb-4bcd-8d3a-57a4ef9b07fe" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinancingReceivables60To89DaysPastDueMember_efbc5e8b-a9c1-45ab-adab-b6020b053315" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FinancingReceivables60To89DaysPastDueMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FinancialAssetPastDueMember_a31670f5-220b-4bde-a3cd-b008474f3917" xlink:to="loc_us-gaap_FinancingReceivables60To89DaysPastDueMember_efbc5e8b-a9c1-45ab-adab-b6020b053315" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinancingReceivablesEqualToGreaterThan90DaysPastDueMember_404ca0ff-35ee-490a-b91a-bfa942b593a2" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FinancingReceivablesEqualToGreaterThan90DaysPastDueMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FinancialAssetPastDueMember_a31670f5-220b-4bde-a3cd-b008474f3917" xlink:to="loc_us-gaap_FinancingReceivablesEqualToGreaterThan90DaysPastDueMember_404ca0ff-35ee-490a-b91a-bfa942b593a2" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StatementBusinessSegmentsAxis_e09e0971-20c3-4101-8a18-3fd746114392" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_StatementBusinessSegmentsAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfFinancingReceivablesPastDueTable_a4c6561c-4d4f-4de8-9ac6-2ba3be33cbd9" xlink:to="loc_us-gaap_StatementBusinessSegmentsAxis_e09e0971-20c3-4101-8a18-3fd746114392" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SegmentDomain_e09e0971-20c3-4101-8a18-3fd746114392_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SegmentDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementBusinessSegmentsAxis_e09e0971-20c3-4101-8a18-3fd746114392" xlink:to="loc_us-gaap_SegmentDomain_e09e0971-20c3-4101-8a18-3fd746114392_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SegmentDomain_4d3db3cb-6dfe-43bb-ac1e-fbf4c32b3674" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SegmentDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementBusinessSegmentsAxis_e09e0971-20c3-4101-8a18-3fd746114392" xlink:to="loc_us-gaap_SegmentDomain_4d3db3cb-6dfe-43bb-ac1e-fbf4c32b3674" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_AgriculturalFinanceMember_3cc68c8e-ed11-48c9-a89b-5a7fe4016b8a" xlink:href="agm-20240331.xsd#agm_AgriculturalFinanceMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_4d3db3cb-6dfe-43bb-ac1e-fbf4c32b3674" xlink:to="loc_agm_AgriculturalFinanceMember_3cc68c8e-ed11-48c9-a89b-5a7fe4016b8a" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_AgricultureFinanceFarmAndRanchSegmentMember_445e0f3c-0db9-4430-9532-f54a39501cd4" xlink:href="agm-20240331.xsd#agm_AgricultureFinanceFarmAndRanchSegmentMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_agm_AgriculturalFinanceMember_3cc68c8e-ed11-48c9-a89b-5a7fe4016b8a" xlink:to="loc_agm_AgricultureFinanceFarmAndRanchSegmentMember_445e0f3c-0db9-4430-9532-f54a39501cd4" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_AgricultureFinanceCorporateAgFinanceSegmentMember_8bf7d419-5e71-4837-b87f-73540750c329" xlink:href="agm-20240331.xsd#agm_AgricultureFinanceCorporateAgFinanceSegmentMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_agm_AgriculturalFinanceMember_3cc68c8e-ed11-48c9-a89b-5a7fe4016b8a" xlink:to="loc_agm_AgricultureFinanceCorporateAgFinanceSegmentMember_8bf7d419-5e71-4837-b87f-73540750c329" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_RuralInfrastructureFinanceMember_4cacbf98-55c9-4cde-b904-04c3adf445b2" xlink:href="agm-20240331.xsd#agm_RuralInfrastructureFinanceMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_4d3db3cb-6dfe-43bb-ac1e-fbf4c32b3674" xlink:to="loc_agm_RuralInfrastructureFinanceMember_4cacbf98-55c9-4cde-b904-04c3adf445b2" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinancingReceivableExcludingAccruedInterestBeforeAllowanceForCreditLoss_b84c2386-4f9a-4fca-bbed-3e7f5cb3ab82" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FinancingReceivableExcludingAccruedInterestBeforeAllowanceForCreditLoss"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FinancingReceivableRecordedInvestmentPastDueLineItems_1c84912d-30a2-4087-abe7-136d3c0a880a" xlink:to="loc_us-gaap_FinancingReceivableExcludingAccruedInterestBeforeAllowanceForCreditLoss_b84c2386-4f9a-4fca-bbed-3e7f5cb3ab82" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinancingReceivableExcludingAccruedInterestNonaccrual_e0c9c1c6-a735-49ff-9223-c153546b0cbd" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FinancingReceivableExcludingAccruedInterestNonaccrual"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FinancingReceivableRecordedInvestmentPastDueLineItems_1c84912d-30a2-4087-abe7-136d3c0a880a" xlink:to="loc_us-gaap_FinancingReceivableExcludingAccruedInterestNonaccrual_e0c9c1c6-a735-49ff-9223-c153546b0cbd" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinancingReceivableExcludingAccruedInterestBeforeAllowanceForCreditLossFeeAndLoanInProcess_46337564-c752-4978-a0ef-58f5d9df2cc0" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FinancingReceivableExcludingAccruedInterestBeforeAllowanceForCreditLossFeeAndLoanInProcess"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FinancingReceivableRecordedInvestmentPastDueLineItems_1c84912d-30a2-4087-abe7-136d3c0a880a" xlink:to="loc_us-gaap_FinancingReceivableExcludingAccruedInterestBeforeAllowanceForCreditLossFeeAndLoanInProcess_46337564-c752-4978-a0ef-58f5d9df2cc0" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinancingReceivableExcludingAccruedInterestNonaccrualNoAllowance_2a04007e-2e18-418f-ba60-45299938095b" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FinancingReceivableExcludingAccruedInterestNonaccrualNoAllowance"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FinancingReceivableRecordedInvestmentPastDueLineItems_1c84912d-30a2-4087-abe7-136d3c0a880a" xlink:to="loc_us-gaap_FinancingReceivableExcludingAccruedInterestNonaccrualNoAllowance_2a04007e-2e18-418f-ba60-45299938095b" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinancingReceivableNonaccrualInterestIncome_f7cdaa86-7092-48d5-95b3-67c2fd643206" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FinancingReceivableNonaccrualInterestIncome"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FinancingReceivableRecordedInvestmentPastDueLineItems_1c84912d-30a2-4087-abe7-136d3c0a880a" xlink:to="loc_us-gaap_FinancingReceivableNonaccrualInterestIncome_f7cdaa86-7092-48d5-95b3-67c2fd643206" xlink:type="arc" order="4"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.farmermac.com/role/LOANSScheduleofFinancingReceivablesCreditQualityIndicatorsDetails" xlink:type="simple" xlink:href="agm-20240331.xsd#LOANSScheduleofFinancingReceivablesCreditQualityIndicatorsDetails"/>
  <link:definitionLink xlink:role="http://www.farmermac.com/role/LOANSScheduleofFinancingReceivablesCreditQualityIndicatorsDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinancingReceivableRecordedInvestmentLineItems_82f4c580-2427-4c5b-ae62-9ca1e70c7a71" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FinancingReceivableRecordedInvestmentLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ScheduleOfFinancingReceivableRecordedInvestmentCreditQualityIndicatorTable_93ed6afa-6c66-4033-af0c-2512ff786d98" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ScheduleOfFinancingReceivableRecordedInvestmentCreditQualityIndicatorTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_FinancingReceivableRecordedInvestmentLineItems_82f4c580-2427-4c5b-ae62-9ca1e70c7a71" xlink:to="loc_us-gaap_ScheduleOfFinancingReceivableRecordedInvestmentCreditQualityIndicatorTable_93ed6afa-6c66-4033-af0c-2512ff786d98" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InternalCreditAssessmentAxis_a37a332f-5521-4d39-8887-c8e36740c6aa" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_InternalCreditAssessmentAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfFinancingReceivableRecordedInvestmentCreditQualityIndicatorTable_93ed6afa-6c66-4033-af0c-2512ff786d98" xlink:to="loc_us-gaap_InternalCreditAssessmentAxis_a37a332f-5521-4d39-8887-c8e36740c6aa" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InternalCreditAssessmentDomain_a37a332f-5521-4d39-8887-c8e36740c6aa_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_InternalCreditAssessmentDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_InternalCreditAssessmentAxis_a37a332f-5521-4d39-8887-c8e36740c6aa" xlink:to="loc_us-gaap_InternalCreditAssessmentDomain_a37a332f-5521-4d39-8887-c8e36740c6aa_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InternalCreditAssessmentDomain_045cd0a5-33bb-475d-8bac-0e325eaa6063" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_InternalCreditAssessmentDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_InternalCreditAssessmentAxis_a37a332f-5521-4d39-8887-c8e36740c6aa" xlink:to="loc_us-gaap_InternalCreditAssessmentDomain_045cd0a5-33bb-475d-8bac-0e325eaa6063" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PassMember_648cd531-8800-40dd-bc6a-9ea7d02f03da" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PassMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_InternalCreditAssessmentDomain_045cd0a5-33bb-475d-8bac-0e325eaa6063" xlink:to="loc_us-gaap_PassMember_648cd531-8800-40dd-bc6a-9ea7d02f03da" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SpecialMentionMember_cf827f67-592b-4f56-9913-b4db71aff18c" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SpecialMentionMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_InternalCreditAssessmentDomain_045cd0a5-33bb-475d-8bac-0e325eaa6063" xlink:to="loc_us-gaap_SpecialMentionMember_cf827f67-592b-4f56-9913-b4db71aff18c" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SubstandardMember_75d211ed-53f8-4384-ba9d-0c0aba6fa270" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SubstandardMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_InternalCreditAssessmentDomain_045cd0a5-33bb-475d-8bac-0e325eaa6063" xlink:to="loc_us-gaap_SubstandardMember_75d211ed-53f8-4384-ba9d-0c0aba6fa270" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StatementBusinessSegmentsAxis_c5b18d83-c66d-446e-abfb-fdd7377ce81f" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_StatementBusinessSegmentsAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfFinancingReceivableRecordedInvestmentCreditQualityIndicatorTable_93ed6afa-6c66-4033-af0c-2512ff786d98" xlink:to="loc_us-gaap_StatementBusinessSegmentsAxis_c5b18d83-c66d-446e-abfb-fdd7377ce81f" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SegmentDomain_c5b18d83-c66d-446e-abfb-fdd7377ce81f_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SegmentDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementBusinessSegmentsAxis_c5b18d83-c66d-446e-abfb-fdd7377ce81f" xlink:to="loc_us-gaap_SegmentDomain_c5b18d83-c66d-446e-abfb-fdd7377ce81f_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SegmentDomain_15b71483-ac9a-4aa4-9847-d6b931327365" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SegmentDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementBusinessSegmentsAxis_c5b18d83-c66d-446e-abfb-fdd7377ce81f" xlink:to="loc_us-gaap_SegmentDomain_15b71483-ac9a-4aa4-9847-d6b931327365" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_AgriculturalFinanceMember_f7153a04-1cb2-4d3f-9fcf-e431d00ba73e" xlink:href="agm-20240331.xsd#agm_AgriculturalFinanceMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_15b71483-ac9a-4aa4-9847-d6b931327365" xlink:to="loc_agm_AgriculturalFinanceMember_f7153a04-1cb2-4d3f-9fcf-e431d00ba73e" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_AgricultureFinanceFarmAndRanchSegmentMember_e462ea6c-2c63-4d5d-be40-16b8f418addb" xlink:href="agm-20240331.xsd#agm_AgricultureFinanceFarmAndRanchSegmentMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_agm_AgriculturalFinanceMember_f7153a04-1cb2-4d3f-9fcf-e431d00ba73e" xlink:to="loc_agm_AgricultureFinanceFarmAndRanchSegmentMember_e462ea6c-2c63-4d5d-be40-16b8f418addb" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_AgricultureFinanceCorporateAgFinanceSegmentMember_03ffa412-9683-4cab-9a8f-07b6967536f7" xlink:href="agm-20240331.xsd#agm_AgricultureFinanceCorporateAgFinanceSegmentMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_agm_AgriculturalFinanceMember_f7153a04-1cb2-4d3f-9fcf-e431d00ba73e" xlink:to="loc_agm_AgricultureFinanceCorporateAgFinanceSegmentMember_03ffa412-9683-4cab-9a8f-07b6967536f7" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_RuralInfrastructureFinanceMember_31626800-83ac-4675-bbe8-91d6e372ea68" xlink:href="agm-20240331.xsd#agm_RuralInfrastructureFinanceMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_15b71483-ac9a-4aa4-9847-d6b931327365" xlink:to="loc_agm_RuralInfrastructureFinanceMember_31626800-83ac-4675-bbe8-91d6e372ea68" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_FinancingReceivableOriginatedInCurrentFiscalYearAbstract_47201204-b86a-4149-8ab0-94ba1bfd5cd7" xlink:href="agm-20240331.xsd#agm_FinancingReceivableOriginatedInCurrentFiscalYearAbstract"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FinancingReceivableRecordedInvestmentLineItems_82f4c580-2427-4c5b-ae62-9ca1e70c7a71" xlink:to="loc_agm_FinancingReceivableOriginatedInCurrentFiscalYearAbstract_47201204-b86a-4149-8ab0-94ba1bfd5cd7" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinancingReceivableExcludingAccruedInterestYearOneOriginatedCurrentFiscalYear_fc7a5a5b-c17e-45d3-b5cd-b562de8d0dfe" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FinancingReceivableExcludingAccruedInterestYearOneOriginatedCurrentFiscalYear"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_agm_FinancingReceivableOriginatedInCurrentFiscalYearAbstract_47201204-b86a-4149-8ab0-94ba1bfd5cd7" xlink:to="loc_us-gaap_FinancingReceivableExcludingAccruedInterestYearOneOriginatedCurrentFiscalYear_fc7a5a5b-c17e-45d3-b5cd-b562de8d0dfe" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_FinancingReceivableOriginatedInCurrentFiscalYearExcludingAccruedInterestAllowanceForCreditLossWriteOff_2ff843e4-0e72-43f6-a9b9-c1953451cd0e" xlink:href="agm-20240331.xsd#agm_FinancingReceivableOriginatedInCurrentFiscalYearExcludingAccruedInterestAllowanceForCreditLossWriteOff"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_agm_FinancingReceivableOriginatedInCurrentFiscalYearAbstract_47201204-b86a-4149-8ab0-94ba1bfd5cd7" xlink:to="loc_agm_FinancingReceivableOriginatedInCurrentFiscalYearExcludingAccruedInterestAllowanceForCreditLossWriteOff_2ff843e4-0e72-43f6-a9b9-c1953451cd0e" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_FinancingReceivableOriginatedInFiscalYearBeforeLatestFiscalYearAbstract_9c74809a-ec42-4ce1-8e41-48c4b8458738" xlink:href="agm-20240331.xsd#agm_FinancingReceivableOriginatedInFiscalYearBeforeLatestFiscalYearAbstract"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FinancingReceivableRecordedInvestmentLineItems_82f4c580-2427-4c5b-ae62-9ca1e70c7a71" xlink:to="loc_agm_FinancingReceivableOriginatedInFiscalYearBeforeLatestFiscalYearAbstract_9c74809a-ec42-4ce1-8e41-48c4b8458738" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinancingReceivableExcludingAccruedInterestYearTwoOriginatedFiscalYearBeforeCurrentFiscalYear_2a93c165-53cd-4609-a80c-69628d02325e" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FinancingReceivableExcludingAccruedInterestYearTwoOriginatedFiscalYearBeforeCurrentFiscalYear"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_agm_FinancingReceivableOriginatedInFiscalYearBeforeLatestFiscalYearAbstract_9c74809a-ec42-4ce1-8e41-48c4b8458738" xlink:to="loc_us-gaap_FinancingReceivableExcludingAccruedInterestYearTwoOriginatedFiscalYearBeforeCurrentFiscalYear_2a93c165-53cd-4609-a80c-69628d02325e" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_FinancingReceivableOriginatedInFiscalYearBeforeLatestFiscalYearExcludingAccruedInterestAllowanceForCreditLossWriteOff_8db17fb6-a0be-4e2b-b24a-ee12369e8ff3" xlink:href="agm-20240331.xsd#agm_FinancingReceivableOriginatedInFiscalYearBeforeLatestFiscalYearExcludingAccruedInterestAllowanceForCreditLossWriteOff"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_agm_FinancingReceivableOriginatedInFiscalYearBeforeLatestFiscalYearAbstract_9c74809a-ec42-4ce1-8e41-48c4b8458738" xlink:to="loc_agm_FinancingReceivableOriginatedInFiscalYearBeforeLatestFiscalYearExcludingAccruedInterestAllowanceForCreditLossWriteOff_8db17fb6-a0be-4e2b-b24a-ee12369e8ff3" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_FinancingReceivableOriginatedTwoYearsBeforeLatestFiscalYearAbstract_54c6a845-ea51-42b2-b6e2-ec2e96a64ce1" xlink:href="agm-20240331.xsd#agm_FinancingReceivableOriginatedTwoYearsBeforeLatestFiscalYearAbstract"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FinancingReceivableRecordedInvestmentLineItems_82f4c580-2427-4c5b-ae62-9ca1e70c7a71" xlink:to="loc_agm_FinancingReceivableOriginatedTwoYearsBeforeLatestFiscalYearAbstract_54c6a845-ea51-42b2-b6e2-ec2e96a64ce1" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinancingReceivableExcludingAccruedInterestYearThreeOriginatedTwoYearsBeforeCurrentFiscalYear_29af4e0f-abe6-441a-8c6b-6d738959e107" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FinancingReceivableExcludingAccruedInterestYearThreeOriginatedTwoYearsBeforeCurrentFiscalYear"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_agm_FinancingReceivableOriginatedTwoYearsBeforeLatestFiscalYearAbstract_54c6a845-ea51-42b2-b6e2-ec2e96a64ce1" xlink:to="loc_us-gaap_FinancingReceivableExcludingAccruedInterestYearThreeOriginatedTwoYearsBeforeCurrentFiscalYear_29af4e0f-abe6-441a-8c6b-6d738959e107" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_FinancingReceivableOriginatedTwoYearsBeforeLatestFiscalYearExcludingAccruedInterestAllowanceForCreditLossWriteOff_b7d0fa8e-5b96-4c81-87ea-965c4fbace3b" xlink:href="agm-20240331.xsd#agm_FinancingReceivableOriginatedTwoYearsBeforeLatestFiscalYearExcludingAccruedInterestAllowanceForCreditLossWriteOff"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_agm_FinancingReceivableOriginatedTwoYearsBeforeLatestFiscalYearAbstract_54c6a845-ea51-42b2-b6e2-ec2e96a64ce1" xlink:to="loc_agm_FinancingReceivableOriginatedTwoYearsBeforeLatestFiscalYearExcludingAccruedInterestAllowanceForCreditLossWriteOff_b7d0fa8e-5b96-4c81-87ea-965c4fbace3b" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_FinancingReceivableOriginatedThreeYearsBeforeLatestFiscalYearAbstract_1bd0d87d-d9ad-44cd-8a62-206fd08b6735" xlink:href="agm-20240331.xsd#agm_FinancingReceivableOriginatedThreeYearsBeforeLatestFiscalYearAbstract"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FinancingReceivableRecordedInvestmentLineItems_82f4c580-2427-4c5b-ae62-9ca1e70c7a71" xlink:to="loc_agm_FinancingReceivableOriginatedThreeYearsBeforeLatestFiscalYearAbstract_1bd0d87d-d9ad-44cd-8a62-206fd08b6735" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinancingReceivableExcludingAccruedInterestYearFourOriginatedThreeYearsBeforeCurrentFiscalYear_acc618eb-5d03-416e-8e81-5adf5e7be7b4" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FinancingReceivableExcludingAccruedInterestYearFourOriginatedThreeYearsBeforeCurrentFiscalYear"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_agm_FinancingReceivableOriginatedThreeYearsBeforeLatestFiscalYearAbstract_1bd0d87d-d9ad-44cd-8a62-206fd08b6735" xlink:to="loc_us-gaap_FinancingReceivableExcludingAccruedInterestYearFourOriginatedThreeYearsBeforeCurrentFiscalYear_acc618eb-5d03-416e-8e81-5adf5e7be7b4" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_FinancingReceivableOriginatedThreeYearsBeforeLatestFiscalYearExcludingAccruedInterestAllowanceForCreditLossWriteOff_74ee68e0-d900-4558-a4cd-c9568281a07d" xlink:href="agm-20240331.xsd#agm_FinancingReceivableOriginatedThreeYearsBeforeLatestFiscalYearExcludingAccruedInterestAllowanceForCreditLossWriteOff"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_agm_FinancingReceivableOriginatedThreeYearsBeforeLatestFiscalYearAbstract_1bd0d87d-d9ad-44cd-8a62-206fd08b6735" xlink:to="loc_agm_FinancingReceivableOriginatedThreeYearsBeforeLatestFiscalYearExcludingAccruedInterestAllowanceForCreditLossWriteOff_74ee68e0-d900-4558-a4cd-c9568281a07d" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_FinancingReceivableOriginatedFourYearsBeforeLatestFiscalYearAbstract_04c8c957-dca8-411c-8521-de58617040ba" xlink:href="agm-20240331.xsd#agm_FinancingReceivableOriginatedFourYearsBeforeLatestFiscalYearAbstract"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FinancingReceivableRecordedInvestmentLineItems_82f4c580-2427-4c5b-ae62-9ca1e70c7a71" xlink:to="loc_agm_FinancingReceivableOriginatedFourYearsBeforeLatestFiscalYearAbstract_04c8c957-dca8-411c-8521-de58617040ba" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinancingReceivableExcludingAccruedInterestYearFiveOriginatedFourYearsBeforeCurrentFiscalYear_d2ce1ffc-ac54-4b2c-a2e5-825ce7511324" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FinancingReceivableExcludingAccruedInterestYearFiveOriginatedFourYearsBeforeCurrentFiscalYear"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_agm_FinancingReceivableOriginatedFourYearsBeforeLatestFiscalYearAbstract_04c8c957-dca8-411c-8521-de58617040ba" xlink:to="loc_us-gaap_FinancingReceivableExcludingAccruedInterestYearFiveOriginatedFourYearsBeforeCurrentFiscalYear_d2ce1ffc-ac54-4b2c-a2e5-825ce7511324" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_FinancingReceivableOriginatedFourYearsBeforeLatestFiscalYearExcludingAccruedInterestAllowanceForCreditLossWriteOff_9c85b8d7-c1e2-4b79-a8a4-fdd8210ce30f" xlink:href="agm-20240331.xsd#agm_FinancingReceivableOriginatedFourYearsBeforeLatestFiscalYearExcludingAccruedInterestAllowanceForCreditLossWriteOff"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_agm_FinancingReceivableOriginatedFourYearsBeforeLatestFiscalYearAbstract_04c8c957-dca8-411c-8521-de58617040ba" xlink:to="loc_agm_FinancingReceivableOriginatedFourYearsBeforeLatestFiscalYearExcludingAccruedInterestAllowanceForCreditLossWriteOff_9c85b8d7-c1e2-4b79-a8a4-fdd8210ce30f" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_FinancingReceivableOriginatedFiveOrMoreYearsBeforeLatestFiscalYearAbstract_d062b107-5ba8-443f-a936-9de42394d2c1" xlink:href="agm-20240331.xsd#agm_FinancingReceivableOriginatedFiveOrMoreYearsBeforeLatestFiscalYearAbstract"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FinancingReceivableRecordedInvestmentLineItems_82f4c580-2427-4c5b-ae62-9ca1e70c7a71" xlink:to="loc_agm_FinancingReceivableOriginatedFiveOrMoreYearsBeforeLatestFiscalYearAbstract_d062b107-5ba8-443f-a936-9de42394d2c1" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinancingReceivableExcludingAccruedInterestOriginatedMoreThanFiveYearsBeforeCurrentFiscalYear_1894438e-a67a-4dc7-93e8-6bad739bea43" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FinancingReceivableExcludingAccruedInterestOriginatedMoreThanFiveYearsBeforeCurrentFiscalYear"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_agm_FinancingReceivableOriginatedFiveOrMoreYearsBeforeLatestFiscalYearAbstract_d062b107-5ba8-443f-a936-9de42394d2c1" xlink:to="loc_us-gaap_FinancingReceivableExcludingAccruedInterestOriginatedMoreThanFiveYearsBeforeCurrentFiscalYear_1894438e-a67a-4dc7-93e8-6bad739bea43" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_FinancingReceivableOriginatedFiveOrMoreYearsBeforeLatestFiscalYearExcludingAccruedInterestAllowanceForCreditLossWriteOff_ae63e171-95ee-4eaa-846e-2f6d0e8e7296" xlink:href="agm-20240331.xsd#agm_FinancingReceivableOriginatedFiveOrMoreYearsBeforeLatestFiscalYearExcludingAccruedInterestAllowanceForCreditLossWriteOff"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_agm_FinancingReceivableOriginatedFiveOrMoreYearsBeforeLatestFiscalYearAbstract_d062b107-5ba8-443f-a936-9de42394d2c1" xlink:to="loc_agm_FinancingReceivableOriginatedFiveOrMoreYearsBeforeLatestFiscalYearExcludingAccruedInterestAllowanceForCreditLossWriteOff_ae63e171-95ee-4eaa-846e-2f6d0e8e7296" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_FinancingReceivableRevolvingAbstract_0c14c2ee-6c9d-4ef7-9c83-281981e50466" xlink:href="agm-20240331.xsd#agm_FinancingReceivableRevolvingAbstract"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FinancingReceivableRecordedInvestmentLineItems_82f4c580-2427-4c5b-ae62-9ca1e70c7a71" xlink:to="loc_agm_FinancingReceivableRevolvingAbstract_0c14c2ee-6c9d-4ef7-9c83-281981e50466" xlink:type="arc" order="6"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinancingReceivableExcludingAccruedInterestRevolving_55df4922-c5f8-4b2b-a84c-9cfd2ae42b64" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FinancingReceivableExcludingAccruedInterestRevolving"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_agm_FinancingReceivableRevolvingAbstract_0c14c2ee-6c9d-4ef7-9c83-281981e50466" xlink:to="loc_us-gaap_FinancingReceivableExcludingAccruedInterestRevolving_55df4922-c5f8-4b2b-a84c-9cfd2ae42b64" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_FinancingReceivableRevolvingExcludingAccruedInterestAllowanceForCreditLossWriteOff_a9c6f7ac-cc19-4869-b47d-f26aef9d44a7" xlink:href="agm-20240331.xsd#agm_FinancingReceivableRevolvingExcludingAccruedInterestAllowanceForCreditLossWriteOff"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_agm_FinancingReceivableRevolvingAbstract_0c14c2ee-6c9d-4ef7-9c83-281981e50466" xlink:to="loc_agm_FinancingReceivableRevolvingExcludingAccruedInterestAllowanceForCreditLossWriteOff_a9c6f7ac-cc19-4869-b47d-f26aef9d44a7" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinancingReceivableBeforeAllowanceForCreditLossAbstract_eda4cef4-fb6b-44a0-bb40-468270c21f7c" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FinancingReceivableBeforeAllowanceForCreditLossAbstract"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FinancingReceivableRecordedInvestmentLineItems_82f4c580-2427-4c5b-ae62-9ca1e70c7a71" xlink:to="loc_us-gaap_FinancingReceivableBeforeAllowanceForCreditLossAbstract_eda4cef4-fb6b-44a0-bb40-468270c21f7c" xlink:type="arc" order="7"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinancingReceivableExcludingAccruedInterestBeforeAllowanceForCreditLoss_31196d3d-77f8-403f-ab14-78d279140ed3" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FinancingReceivableExcludingAccruedInterestBeforeAllowanceForCreditLoss"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FinancingReceivableBeforeAllowanceForCreditLossAbstract_eda4cef4-fb6b-44a0-bb40-468270c21f7c" xlink:to="loc_us-gaap_FinancingReceivableExcludingAccruedInterestBeforeAllowanceForCreditLoss_31196d3d-77f8-403f-ab14-78d279140ed3" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinancingReceivableExcludingAccruedInterestAllowanceForCreditLossWriteoff_b93625b0-0bcc-4f43-961d-d712f24643e9" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FinancingReceivableExcludingAccruedInterestAllowanceForCreditLossWriteoff"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FinancingReceivableBeforeAllowanceForCreditLossAbstract_eda4cef4-fb6b-44a0-bb40-468270c21f7c" xlink:to="loc_us-gaap_FinancingReceivableExcludingAccruedInterestAllowanceForCreditLossWriteoff_b93625b0-0bcc-4f43-961d-d712f24643e9" xlink:type="arc" order="2"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.farmermac.com/role/GUARANTEESANDCOMMITMENTSOffBalanceSheetGuaranteedSecuritiesDetails" xlink:type="simple" xlink:href="agm-20240331.xsd#GUARANTEESANDCOMMITMENTSOffBalanceSheetGuaranteedSecuritiesDetails"/>
  <link:definitionLink xlink:role="http://www.farmermac.com/role/GUARANTEESANDCOMMITMENTSOffBalanceSheetGuaranteedSecuritiesDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_GuaranteeObligationsLineItems_8fdd95dd-cbb1-43c4-97ee-74a5242736f3" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_GuaranteeObligationsLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ScheduleOfGuaranteeObligationsTable_83256f6a-fdf2-47a0-a0bc-eced7547988b" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ScheduleOfGuaranteeObligationsTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_GuaranteeObligationsLineItems_8fdd95dd-cbb1-43c4-97ee-74a5242736f3" xlink:to="loc_us-gaap_ScheduleOfGuaranteeObligationsTable_83256f6a-fdf2-47a0-a0bc-eced7547988b" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StatementBusinessSegmentsAxis_d5cc82a1-4757-400d-bc86-08b326577577" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_StatementBusinessSegmentsAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfGuaranteeObligationsTable_83256f6a-fdf2-47a0-a0bc-eced7547988b" xlink:to="loc_us-gaap_StatementBusinessSegmentsAxis_d5cc82a1-4757-400d-bc86-08b326577577" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SegmentDomain_d5cc82a1-4757-400d-bc86-08b326577577_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SegmentDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementBusinessSegmentsAxis_d5cc82a1-4757-400d-bc86-08b326577577" xlink:to="loc_us-gaap_SegmentDomain_d5cc82a1-4757-400d-bc86-08b326577577_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SegmentDomain_35fee878-d0b9-4d88-8441-f039141cc443" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SegmentDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementBusinessSegmentsAxis_d5cc82a1-4757-400d-bc86-08b326577577" xlink:to="loc_us-gaap_SegmentDomain_35fee878-d0b9-4d88-8441-f039141cc443" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_AgriculturalFinanceMember_af698967-00fc-4f91-a1e1-21f5db990c7f" xlink:href="agm-20240331.xsd#agm_AgriculturalFinanceMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_35fee878-d0b9-4d88-8441-f039141cc443" xlink:to="loc_agm_AgriculturalFinanceMember_af698967-00fc-4f91-a1e1-21f5db990c7f" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_GuaranteeObligationsByNatureAxis_cf507b0b-c71d-4644-b95d-f50f8f8fbbe4" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_GuaranteeObligationsByNatureAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfGuaranteeObligationsTable_83256f6a-fdf2-47a0-a0bc-eced7547988b" xlink:to="loc_us-gaap_GuaranteeObligationsByNatureAxis_cf507b0b-c71d-4644-b95d-f50f8f8fbbe4" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_GuaranteeObligationsNatureDomain_cf507b0b-c71d-4644-b95d-f50f8f8fbbe4_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_GuaranteeObligationsNatureDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_GuaranteeObligationsByNatureAxis_cf507b0b-c71d-4644-b95d-f50f8f8fbbe4" xlink:to="loc_us-gaap_GuaranteeObligationsNatureDomain_cf507b0b-c71d-4644-b95d-f50f8f8fbbe4_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_GuaranteeObligationsNatureDomain_b0f6a322-c0ad-4b24-ae73-93dcbba5dda0" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_GuaranteeObligationsNatureDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_GuaranteeObligationsByNatureAxis_cf507b0b-c71d-4644-b95d-f50f8f8fbbe4" xlink:to="loc_us-gaap_GuaranteeObligationsNatureDomain_b0f6a322-c0ad-4b24-ae73-93dcbba5dda0" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_FarmerMacGuaranteedSecuritiesMember_e89cdca8-d985-42b1-8ec3-26c86277f8cd" xlink:href="agm-20240331.xsd#agm_FarmerMacGuaranteedSecuritiesMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_GuaranteeObligationsNatureDomain_b0f6a322-c0ad-4b24-ae73-93dcbba5dda0" xlink:to="loc_agm_FarmerMacGuaranteedSecuritiesMember_e89cdca8-d985-42b1-8ec3-26c86277f8cd" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_ConsolidatedEntitiesAxis_03513e0d-12aa-400b-89d1-df5ebf89c88a" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_ConsolidatedEntitiesAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfGuaranteeObligationsTable_83256f6a-fdf2-47a0-a0bc-eced7547988b" xlink:to="loc_srt_ConsolidatedEntitiesAxis_03513e0d-12aa-400b-89d1-df5ebf89c88a" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_ConsolidatedEntitiesDomain_03513e0d-12aa-400b-89d1-df5ebf89c88a_default" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_ConsolidatedEntitiesDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_srt_ConsolidatedEntitiesAxis_03513e0d-12aa-400b-89d1-df5ebf89c88a" xlink:to="loc_srt_ConsolidatedEntitiesDomain_03513e0d-12aa-400b-89d1-df5ebf89c88a_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_ConsolidatedEntitiesDomain_d5177b24-d427-429a-8401-411d8087abf7" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_ConsolidatedEntitiesDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_srt_ConsolidatedEntitiesAxis_03513e0d-12aa-400b-89d1-df5ebf89c88a" xlink:to="loc_srt_ConsolidatedEntitiesDomain_d5177b24-d427-429a-8401-411d8087abf7" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_VariableInterestEntityNotPrimaryBeneficiaryMember_d5fd74ea-5880-4f78-a4b8-f0e4475e891f" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_VariableInterestEntityNotPrimaryBeneficiaryMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_ConsolidatedEntitiesDomain_d5177b24-d427-429a-8401-411d8087abf7" xlink:to="loc_us-gaap_VariableInterestEntityNotPrimaryBeneficiaryMember_d5fd74ea-5880-4f78-a4b8-f0e4475e891f" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_GuaranteeObligationsMaximumExposure_2b7b891d-81ac-49af-af4f-80fb6469a698" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_GuaranteeObligationsMaximumExposure"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_GuaranteeObligationsLineItems_8fdd95dd-cbb1-43c4-97ee-74a5242736f3" xlink:to="loc_us-gaap_GuaranteeObligationsMaximumExposure_2b7b891d-81ac-49af-af4f-80fb6469a698" xlink:type="arc" order="0"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.farmermac.com/role/GUARANTEESANDCOMMITMENTSScheduleofUnderlyingOffBalanceSheetGuaranteedSecuritiesDetails" xlink:type="simple" xlink:href="agm-20240331.xsd#GUARANTEESANDCOMMITMENTSScheduleofUnderlyingOffBalanceSheetGuaranteedSecuritiesDetails"/>
  <link:definitionLink xlink:role="http://www.farmermac.com/role/GUARANTEESANDCOMMITMENTSScheduleofUnderlyingOffBalanceSheetGuaranteedSecuritiesDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_GuaranteeObligationsLineItems_110887c1-a762-4c83-804a-ed6eeb4f306c" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_GuaranteeObligationsLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ScheduleOfGuaranteeObligationsTable_69a4f9a6-132f-4610-9086-005d61eda15c" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ScheduleOfGuaranteeObligationsTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_GuaranteeObligationsLineItems_110887c1-a762-4c83-804a-ed6eeb4f306c" xlink:to="loc_us-gaap_ScheduleOfGuaranteeObligationsTable_69a4f9a6-132f-4610-9086-005d61eda15c" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_GuaranteeObligationsByNatureAxis_57d26204-27a7-4571-a6c6-174b484a2381" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_GuaranteeObligationsByNatureAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfGuaranteeObligationsTable_69a4f9a6-132f-4610-9086-005d61eda15c" xlink:to="loc_us-gaap_GuaranteeObligationsByNatureAxis_57d26204-27a7-4571-a6c6-174b484a2381" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_GuaranteeObligationsNatureDomain_57d26204-27a7-4571-a6c6-174b484a2381_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_GuaranteeObligationsNatureDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_GuaranteeObligationsByNatureAxis_57d26204-27a7-4571-a6c6-174b484a2381" xlink:to="loc_us-gaap_GuaranteeObligationsNatureDomain_57d26204-27a7-4571-a6c6-174b484a2381_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_GuaranteeObligationsNatureDomain_b3c3455b-bf53-4003-ac0f-0b09d4e356b4" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_GuaranteeObligationsNatureDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_GuaranteeObligationsByNatureAxis_57d26204-27a7-4571-a6c6-174b484a2381" xlink:to="loc_us-gaap_GuaranteeObligationsNatureDomain_b3c3455b-bf53-4003-ac0f-0b09d4e356b4" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_FarmerMacGuaranteedSecuritiesMember_e5d227e9-a465-4087-89b5-f91f5a48748d" xlink:href="agm-20240331.xsd#agm_FarmerMacGuaranteedSecuritiesMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_GuaranteeObligationsNatureDomain_b3c3455b-bf53-4003-ac0f-0b09d4e356b4" xlink:to="loc_agm_FarmerMacGuaranteedSecuritiesMember_e5d227e9-a465-4087-89b5-f91f5a48748d" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_GuaranteeObligationsCurrentCarryingValue_adead28e-ba14-41a0-b177-239dd9bf81f5" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_GuaranteeObligationsCurrentCarryingValue"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_GuaranteeObligationsLineItems_110887c1-a762-4c83-804a-ed6eeb4f306c" xlink:to="loc_us-gaap_GuaranteeObligationsCurrentCarryingValue_adead28e-ba14-41a0-b177-239dd9bf81f5" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_WeightedAverageRemainingMaturityLoansUnderlyingGuaranteesNotHeldByTransferor_e0855da2-cf77-42a4-a983-fd23b240c052" xlink:href="agm-20240331.xsd#agm_WeightedAverageRemainingMaturityLoansUnderlyingGuaranteesNotHeldByTransferor"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_GuaranteeObligationsLineItems_110887c1-a762-4c83-804a-ed6eeb4f306c" xlink:to="loc_agm_WeightedAverageRemainingMaturityLoansUnderlyingGuaranteesNotHeldByTransferor_e0855da2-cf77-42a4-a983-fd23b240c052" xlink:type="arc" order="1"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.farmermac.com/role/GUARANTEESANDCOMMITMENTSScheduleofLongTermStandbyPurchaseCommitmentsDetails" xlink:type="simple" xlink:href="agm-20240331.xsd#GUARANTEESANDCOMMITMENTSScheduleofLongTermStandbyPurchaseCommitmentsDetails"/>
  <link:definitionLink xlink:role="http://www.farmermac.com/role/GUARANTEESANDCOMMITMENTSScheduleofLongTermStandbyPurchaseCommitmentsDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_GuaranteeObligationsLineItems_0b875fea-a6f4-4b7e-9315-de7f0e7bdd14" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_GuaranteeObligationsLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ScheduleOfGuaranteeObligationsTable_8858a2ea-abaf-4d85-ad58-5034186be238" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ScheduleOfGuaranteeObligationsTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_GuaranteeObligationsLineItems_0b875fea-a6f4-4b7e-9315-de7f0e7bdd14" xlink:to="loc_us-gaap_ScheduleOfGuaranteeObligationsTable_8858a2ea-abaf-4d85-ad58-5034186be238" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_UnrecordedMaximumPotentialExposureOnGuaranteesAxis_01f391b6-c29d-4a9b-93c3-dea9bdf8d4b0" xlink:href="agm-20240331.xsd#agm_UnrecordedMaximumPotentialExposureOnGuaranteesAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfGuaranteeObligationsTable_8858a2ea-abaf-4d85-ad58-5034186be238" xlink:to="loc_agm_UnrecordedMaximumPotentialExposureOnGuaranteesAxis_01f391b6-c29d-4a9b-93c3-dea9bdf8d4b0" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_UnrecordedMaximumPotentialExposureOnGuaranteesDomain_01f391b6-c29d-4a9b-93c3-dea9bdf8d4b0_default" xlink:href="agm-20240331.xsd#agm_UnrecordedMaximumPotentialExposureOnGuaranteesDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_agm_UnrecordedMaximumPotentialExposureOnGuaranteesAxis_01f391b6-c29d-4a9b-93c3-dea9bdf8d4b0" xlink:to="loc_agm_UnrecordedMaximumPotentialExposureOnGuaranteesDomain_01f391b6-c29d-4a9b-93c3-dea9bdf8d4b0_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_UnrecordedMaximumPotentialExposureOnGuaranteesDomain_49b537b1-e488-4ff7-87ca-871bc85af424" xlink:href="agm-20240331.xsd#agm_UnrecordedMaximumPotentialExposureOnGuaranteesDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_agm_UnrecordedMaximumPotentialExposureOnGuaranteesAxis_01f391b6-c29d-4a9b-93c3-dea9bdf8d4b0" xlink:to="loc_agm_UnrecordedMaximumPotentialExposureOnGuaranteesDomain_49b537b1-e488-4ff7-87ca-871bc85af424" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_GuaranteeobligationsissuedafterJanuary12003Member_190cfb74-0ac6-49cf-aaa6-53f8a2c8b962" xlink:href="agm-20240331.xsd#agm_GuaranteeobligationsissuedafterJanuary12003Member"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_agm_UnrecordedMaximumPotentialExposureOnGuaranteesDomain_49b537b1-e488-4ff7-87ca-871bc85af424" xlink:to="loc_agm_GuaranteeobligationsissuedafterJanuary12003Member_190cfb74-0ac6-49cf-aaa6-53f8a2c8b962" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_GuaranteeObligationsByNatureAxis_5f095557-727e-4c3b-80e3-97c8f0dcd841" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_GuaranteeObligationsByNatureAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfGuaranteeObligationsTable_8858a2ea-abaf-4d85-ad58-5034186be238" xlink:to="loc_us-gaap_GuaranteeObligationsByNatureAxis_5f095557-727e-4c3b-80e3-97c8f0dcd841" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_GuaranteeObligationsNatureDomain_5f095557-727e-4c3b-80e3-97c8f0dcd841_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_GuaranteeObligationsNatureDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_GuaranteeObligationsByNatureAxis_5f095557-727e-4c3b-80e3-97c8f0dcd841" xlink:to="loc_us-gaap_GuaranteeObligationsNatureDomain_5f095557-727e-4c3b-80e3-97c8f0dcd841_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_GuaranteeObligationsNatureDomain_40462b66-8243-474d-b163-849562c7f803" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_GuaranteeObligationsNatureDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_GuaranteeObligationsByNatureAxis_5f095557-727e-4c3b-80e3-97c8f0dcd841" xlink:to="loc_us-gaap_GuaranteeObligationsNatureDomain_40462b66-8243-474d-b163-849562c7f803" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_LongTermStandbyPurchaseCommitmentsMember_cdbf94c3-4ac6-4e4c-aa7c-53953e7163c1" xlink:href="agm-20240331.xsd#agm_LongTermStandbyPurchaseCommitmentsMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_GuaranteeObligationsNatureDomain_40462b66-8243-474d-b163-849562c7f803" xlink:to="loc_agm_LongTermStandbyPurchaseCommitmentsMember_cdbf94c3-4ac6-4e4c-aa7c-53953e7163c1" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_GuaranteeObligationsCurrentCarryingValue_affcf0b4-f599-49f4-a367-abf1f21d5b06" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_GuaranteeObligationsCurrentCarryingValue"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_GuaranteeObligationsLineItems_0b875fea-a6f4-4b7e-9315-de7f0e7bdd14" xlink:to="loc_us-gaap_GuaranteeObligationsCurrentCarryingValue_affcf0b4-f599-49f4-a367-abf1f21d5b06" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_GuaranteeObligationsMaximumExposure_7105c62d-7dab-4b7e-8000-73260587c1d3" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_GuaranteeObligationsMaximumExposure"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_GuaranteeObligationsLineItems_0b875fea-a6f4-4b7e-9315-de7f0e7bdd14" xlink:to="loc_us-gaap_GuaranteeObligationsMaximumExposure_7105c62d-7dab-4b7e-8000-73260587c1d3" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_WeightedAverageRemainingMaturityLoansUnderlyingGuaranteesNotHeldByTransferor_5528ce05-00fc-4c14-9cfb-3fbf55dcb66b" xlink:href="agm-20240331.xsd#agm_WeightedAverageRemainingMaturityLoansUnderlyingGuaranteesNotHeldByTransferor"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_GuaranteeObligationsLineItems_0b875fea-a6f4-4b7e-9315-de7f0e7bdd14" xlink:to="loc_agm_WeightedAverageRemainingMaturityLoansUnderlyingGuaranteesNotHeldByTransferor_5528ce05-00fc-4c14-9cfb-3fbf55dcb66b" xlink:type="arc" order="2"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.farmermac.com/role/GUARANTEESANDCOMMITMENTSReserveForLossesDetails" xlink:type="simple" xlink:href="agm-20240331.xsd#GUARANTEESANDCOMMITMENTSReserveForLossesDetails"/>
  <link:definitionLink xlink:role="http://www.farmermac.com/role/GUARANTEESANDCOMMITMENTSReserveForLossesDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_GuaranteeObligationsLineItems_4bdb6e7c-5648-40f3-b3bd-03945ed7c114" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_GuaranteeObligationsLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ScheduleOfGuaranteeObligationsTable_4e8f88cc-8929-40e6-947c-cf9d10973e37" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ScheduleOfGuaranteeObligationsTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_GuaranteeObligationsLineItems_4bdb6e7c-5648-40f3-b3bd-03945ed7c114" xlink:to="loc_us-gaap_ScheduleOfGuaranteeObligationsTable_4e8f88cc-8929-40e6-947c-cf9d10973e37" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StatementBusinessSegmentsAxis_39fe7d23-9db8-4ff5-b9c6-6c2ec9182828" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_StatementBusinessSegmentsAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfGuaranteeObligationsTable_4e8f88cc-8929-40e6-947c-cf9d10973e37" xlink:to="loc_us-gaap_StatementBusinessSegmentsAxis_39fe7d23-9db8-4ff5-b9c6-6c2ec9182828" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SegmentDomain_39fe7d23-9db8-4ff5-b9c6-6c2ec9182828_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SegmentDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementBusinessSegmentsAxis_39fe7d23-9db8-4ff5-b9c6-6c2ec9182828" xlink:to="loc_us-gaap_SegmentDomain_39fe7d23-9db8-4ff5-b9c6-6c2ec9182828_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SegmentDomain_b9424b3d-8363-46fb-936a-4ffd3708b560" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SegmentDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementBusinessSegmentsAxis_39fe7d23-9db8-4ff5-b9c6-6c2ec9182828" xlink:to="loc_us-gaap_SegmentDomain_b9424b3d-8363-46fb-936a-4ffd3708b560" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_AgriculturalFinanceMember_e9bfac3c-75ab-420c-93be-4c3efdbce720" xlink:href="agm-20240331.xsd#agm_AgriculturalFinanceMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_b9424b3d-8363-46fb-936a-4ffd3708b560" xlink:to="loc_agm_AgriculturalFinanceMember_e9bfac3c-75ab-420c-93be-4c3efdbce720" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_RuralInfrastructureFinanceMember_cae2d3ce-a685-4e9a-98c2-7b735b32f753" xlink:href="agm-20240331.xsd#agm_RuralInfrastructureFinanceMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_b9424b3d-8363-46fb-936a-4ffd3708b560" xlink:to="loc_agm_RuralInfrastructureFinanceMember_cae2d3ce-a685-4e9a-98c2-7b735b32f753" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_ReserveForLosses_a75154f0-4c37-4ef9-8911-0ac8341b0c74" xlink:href="agm-20240331.xsd#agm_ReserveForLosses"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_GuaranteeObligationsLineItems_4bdb6e7c-5648-40f3-b3bd-03945ed7c114" xlink:to="loc_agm_ReserveForLosses_a75154f0-4c37-4ef9-8911-0ac8341b0c74" xlink:type="arc" order="0"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.farmermac.com/role/GUARANTEESANDCOMMITMENTSChangesinReserveforLossesDetails" xlink:type="simple" xlink:href="agm-20240331.xsd#GUARANTEESANDCOMMITMENTSChangesinReserveforLossesDetails"/>
  <link:definitionLink xlink:role="http://www.farmermac.com/role/GUARANTEESANDCOMMITMENTSChangesinReserveforLossesDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_GuaranteeObligationsLineItems_617535f7-ef55-4389-9279-2be33a918804" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_GuaranteeObligationsLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ScheduleOfGuaranteeObligationsTable_57a120b8-89cd-4540-9730-4a5f68e4a7d9" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ScheduleOfGuaranteeObligationsTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_GuaranteeObligationsLineItems_617535f7-ef55-4389-9279-2be33a918804" xlink:to="loc_us-gaap_ScheduleOfGuaranteeObligationsTable_57a120b8-89cd-4540-9730-4a5f68e4a7d9" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StatementBusinessSegmentsAxis_67398574-a734-44d3-b0df-dada9d42a362" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_StatementBusinessSegmentsAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfGuaranteeObligationsTable_57a120b8-89cd-4540-9730-4a5f68e4a7d9" xlink:to="loc_us-gaap_StatementBusinessSegmentsAxis_67398574-a734-44d3-b0df-dada9d42a362" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SegmentDomain_67398574-a734-44d3-b0df-dada9d42a362_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SegmentDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementBusinessSegmentsAxis_67398574-a734-44d3-b0df-dada9d42a362" xlink:to="loc_us-gaap_SegmentDomain_67398574-a734-44d3-b0df-dada9d42a362_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SegmentDomain_7e4b2377-6277-4f25-9700-7dee091bae12" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SegmentDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementBusinessSegmentsAxis_67398574-a734-44d3-b0df-dada9d42a362" xlink:to="loc_us-gaap_SegmentDomain_7e4b2377-6277-4f25-9700-7dee091bae12" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_AgriculturalFinanceMember_6fc1720d-c6d0-4482-91be-bd198a259cbc" xlink:href="agm-20240331.xsd#agm_AgriculturalFinanceMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_7e4b2377-6277-4f25-9700-7dee091bae12" xlink:to="loc_agm_AgriculturalFinanceMember_6fc1720d-c6d0-4482-91be-bd198a259cbc" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_RuralInfrastructureFinanceMember_f3dfcda6-bcf2-4598-b3e7-99e5c56e69aa" xlink:href="agm-20240331.xsd#agm_RuralInfrastructureFinanceMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_7e4b2377-6277-4f25-9700-7dee091bae12" xlink:to="loc_agm_RuralInfrastructureFinanceMember_f3dfcda6-bcf2-4598-b3e7-99e5c56e69aa" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinancingReceivableAllowanceForCreditLossesRollForward_69bb9d99-2c15-4861-af60-a7396654b94e" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FinancingReceivableAllowanceForCreditLossesRollForward"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_GuaranteeObligationsLineItems_617535f7-ef55-4389-9279-2be33a918804" xlink:to="loc_us-gaap_FinancingReceivableAllowanceForCreditLossesRollForward_69bb9d99-2c15-4861-af60-a7396654b94e" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_ReserveForLosses_3c4ce51e-8f0a-4546-8928-1e151f57987a" xlink:href="agm-20240331.xsd#agm_ReserveForLosses"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FinancingReceivableAllowanceForCreditLossesRollForward_69bb9d99-2c15-4861-af60-a7396654b94e" xlink:to="loc_agm_ReserveForLosses_3c4ce51e-8f0a-4546-8928-1e151f57987a" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProvisionForOtherCreditLosses_4dbd0177-2cdf-4eb9-a82e-349fc54989ed" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ProvisionForOtherCreditLosses"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FinancingReceivableAllowanceForCreditLossesRollForward_69bb9d99-2c15-4861-af60-a7396654b94e" xlink:to="loc_us-gaap_ProvisionForOtherCreditLosses_4dbd0177-2cdf-4eb9-a82e-349fc54989ed" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_ReserveForLosses_e2e13440-d6ad-447c-bd68-c1d574aeb0da" xlink:href="agm-20240331.xsd#agm_ReserveForLosses"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.farmermac.com/role/GUARANTEESANDCOMMITMENTSUnpaidPrincipalBalancesbyDelinquencyStatusDetails" xlink:type="simple" xlink:href="agm-20240331.xsd#GUARANTEESANDCOMMITMENTSUnpaidPrincipalBalancesbyDelinquencyStatusDetails"/>
  <link:definitionLink xlink:role="http://www.farmermac.com/role/GUARANTEESANDCOMMITMENTSUnpaidPrincipalBalancesbyDelinquencyStatusDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_GuaranteeObligationsLineItems_fe6927be-ef24-4e94-bbf4-b02b96f9a0ae" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_GuaranteeObligationsLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ScheduleOfGuaranteeObligationsTable_e3b75e05-f74a-4800-b39f-458454dcb4f8" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ScheduleOfGuaranteeObligationsTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_GuaranteeObligationsLineItems_fe6927be-ef24-4e94-bbf4-b02b96f9a0ae" xlink:to="loc_us-gaap_ScheduleOfGuaranteeObligationsTable_e3b75e05-f74a-4800-b39f-458454dcb4f8" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StatementBusinessSegmentsAxis_107fbb92-bf11-4970-a1b0-a062866b333c" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_StatementBusinessSegmentsAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfGuaranteeObligationsTable_e3b75e05-f74a-4800-b39f-458454dcb4f8" xlink:to="loc_us-gaap_StatementBusinessSegmentsAxis_107fbb92-bf11-4970-a1b0-a062866b333c" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SegmentDomain_107fbb92-bf11-4970-a1b0-a062866b333c_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SegmentDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementBusinessSegmentsAxis_107fbb92-bf11-4970-a1b0-a062866b333c" xlink:to="loc_us-gaap_SegmentDomain_107fbb92-bf11-4970-a1b0-a062866b333c_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SegmentDomain_4953f99a-38e5-4084-8e6f-50d8250b98d3" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SegmentDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementBusinessSegmentsAxis_107fbb92-bf11-4970-a1b0-a062866b333c" xlink:to="loc_us-gaap_SegmentDomain_4953f99a-38e5-4084-8e6f-50d8250b98d3" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_AgriculturalFinanceMember_58e49c3a-efbb-4f54-a41a-28812b4f461f" xlink:href="agm-20240331.xsd#agm_AgriculturalFinanceMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_4953f99a-38e5-4084-8e6f-50d8250b98d3" xlink:to="loc_agm_AgriculturalFinanceMember_58e49c3a-efbb-4f54-a41a-28812b4f461f" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_RuralInfrastructureFinanceMember_b23610a4-b67b-4169-ac4c-b06cb894c4b4" xlink:href="agm-20240331.xsd#agm_RuralInfrastructureFinanceMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_4953f99a-38e5-4084-8e6f-50d8250b98d3" xlink:to="loc_agm_RuralInfrastructureFinanceMember_b23610a4-b67b-4169-ac4c-b06cb894c4b4" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinancingReceivablesPeriodPastDueAxis_c9c42b4c-c6a3-40d8-a935-6160bf8fc693" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FinancingReceivablesPeriodPastDueAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfGuaranteeObligationsTable_e3b75e05-f74a-4800-b39f-458454dcb4f8" xlink:to="loc_us-gaap_FinancingReceivablesPeriodPastDueAxis_c9c42b4c-c6a3-40d8-a935-6160bf8fc693" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinancingReceivablesPeriodPastDueDomain_c9c42b4c-c6a3-40d8-a935-6160bf8fc693_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FinancingReceivablesPeriodPastDueDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_FinancingReceivablesPeriodPastDueAxis_c9c42b4c-c6a3-40d8-a935-6160bf8fc693" xlink:to="loc_us-gaap_FinancingReceivablesPeriodPastDueDomain_c9c42b4c-c6a3-40d8-a935-6160bf8fc693_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinancingReceivablesPeriodPastDueDomain_bbcbf28e-1a4c-480d-9931-c0652de57fd3" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FinancingReceivablesPeriodPastDueDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_FinancingReceivablesPeriodPastDueAxis_c9c42b4c-c6a3-40d8-a935-6160bf8fc693" xlink:to="loc_us-gaap_FinancingReceivablesPeriodPastDueDomain_bbcbf28e-1a4c-480d-9931-c0652de57fd3" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinancialAssetNotPastDueMember_f9d0c9ec-551d-4c41-aefd-6b95f97bbe0a" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FinancialAssetNotPastDueMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FinancingReceivablesPeriodPastDueDomain_bbcbf28e-1a4c-480d-9931-c0652de57fd3" xlink:to="loc_us-gaap_FinancialAssetNotPastDueMember_f9d0c9ec-551d-4c41-aefd-6b95f97bbe0a" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinancialAssetPastDueMember_f797a7dd-3d56-48ba-9eaf-9e3085731fcd" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FinancialAssetPastDueMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FinancingReceivablesPeriodPastDueDomain_bbcbf28e-1a4c-480d-9931-c0652de57fd3" xlink:to="loc_us-gaap_FinancialAssetPastDueMember_f797a7dd-3d56-48ba-9eaf-9e3085731fcd" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinancingReceivables30To59DaysPastDueMember_7881ae12-f9f2-4d0d-a1fc-f05ceb014102" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FinancingReceivables30To59DaysPastDueMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FinancialAssetPastDueMember_f797a7dd-3d56-48ba-9eaf-9e3085731fcd" xlink:to="loc_us-gaap_FinancingReceivables30To59DaysPastDueMember_7881ae12-f9f2-4d0d-a1fc-f05ceb014102" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinancingReceivables60To89DaysPastDueMember_ed3ac3b9-62f5-4d54-a029-c50437127ebd" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FinancingReceivables60To89DaysPastDueMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FinancialAssetPastDueMember_f797a7dd-3d56-48ba-9eaf-9e3085731fcd" xlink:to="loc_us-gaap_FinancingReceivables60To89DaysPastDueMember_ed3ac3b9-62f5-4d54-a029-c50437127ebd" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinancingReceivablesEqualToGreaterThan90DaysPastDueMember_7e8058ca-71a6-45a1-99cd-19dbf6a2c618" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FinancingReceivablesEqualToGreaterThan90DaysPastDueMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FinancialAssetPastDueMember_f797a7dd-3d56-48ba-9eaf-9e3085731fcd" xlink:to="loc_us-gaap_FinancingReceivablesEqualToGreaterThan90DaysPastDueMember_7e8058ca-71a6-45a1-99cd-19dbf6a2c618" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_GuaranteeObligationsByNatureAxis_b318c263-63e1-4be9-8b21-4b8c87ffec7a" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_GuaranteeObligationsByNatureAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfGuaranteeObligationsTable_e3b75e05-f74a-4800-b39f-458454dcb4f8" xlink:to="loc_us-gaap_GuaranteeObligationsByNatureAxis_b318c263-63e1-4be9-8b21-4b8c87ffec7a" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_GuaranteeObligationsNatureDomain_b318c263-63e1-4be9-8b21-4b8c87ffec7a_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_GuaranteeObligationsNatureDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_GuaranteeObligationsByNatureAxis_b318c263-63e1-4be9-8b21-4b8c87ffec7a" xlink:to="loc_us-gaap_GuaranteeObligationsNatureDomain_b318c263-63e1-4be9-8b21-4b8c87ffec7a_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_GuaranteeObligationsNatureDomain_50e8cdf3-3897-4243-894b-edffce63e3cf" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_GuaranteeObligationsNatureDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_GuaranteeObligationsByNatureAxis_b318c263-63e1-4be9-8b21-4b8c87ffec7a" xlink:to="loc_us-gaap_GuaranteeObligationsNatureDomain_50e8cdf3-3897-4243-894b-edffce63e3cf" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_LongTermStandbyPurchaseCommitmentsAndGuaranteedSecuritiesMember_ef9f38c5-7471-4e3b-9a5b-9fc9c13c262c" xlink:href="agm-20240331.xsd#agm_LongTermStandbyPurchaseCommitmentsAndGuaranteedSecuritiesMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_GuaranteeObligationsNatureDomain_50e8cdf3-3897-4243-894b-edffce63e3cf" xlink:to="loc_agm_LongTermStandbyPurchaseCommitmentsAndGuaranteedSecuritiesMember_ef9f38c5-7471-4e3b-9a5b-9fc9c13c262c" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_LongTermStandbyPurchaseCommitmentsMember_3471e49a-5b47-4ba6-8d71-6589173473ea" xlink:href="agm-20240331.xsd#agm_LongTermStandbyPurchaseCommitmentsMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_GuaranteeObligationsNatureDomain_50e8cdf3-3897-4243-894b-edffce63e3cf" xlink:to="loc_agm_LongTermStandbyPurchaseCommitmentsMember_3471e49a-5b47-4ba6-8d71-6589173473ea" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinancingReceivableExcludingAccruedInterestBeforeAllowanceForCreditLoss_a884d99b-b815-4098-a6e3-61cdc6a695da" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FinancingReceivableExcludingAccruedInterestBeforeAllowanceForCreditLoss"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_GuaranteeObligationsLineItems_fe6927be-ef24-4e94-bbf4-b02b96f9a0ae" xlink:to="loc_us-gaap_FinancingReceivableExcludingAccruedInterestBeforeAllowanceForCreditLoss_a884d99b-b815-4098-a6e3-61cdc6a695da" xlink:type="arc" order="0"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.farmermac.com/role/GUARANTEESANDCOMMITMENTSCreditQualityIndicatorsDetails" xlink:type="simple" xlink:href="agm-20240331.xsd#GUARANTEESANDCOMMITMENTSCreditQualityIndicatorsDetails"/>
  <link:definitionLink xlink:role="http://www.farmermac.com/role/GUARANTEESANDCOMMITMENTSCreditQualityIndicatorsDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_GuaranteeObligationsLineItems_56c9f13e-237b-4080-9da8-03f5e2324f12" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_GuaranteeObligationsLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ScheduleOfGuaranteeObligationsTable_328bffdc-357c-40e8-9ed6-d7d06d896aa3" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ScheduleOfGuaranteeObligationsTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_GuaranteeObligationsLineItems_56c9f13e-237b-4080-9da8-03f5e2324f12" xlink:to="loc_us-gaap_ScheduleOfGuaranteeObligationsTable_328bffdc-357c-40e8-9ed6-d7d06d896aa3" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_GuaranteeObligationsByNatureAxis_e9feb539-34bc-4e03-abac-2bf3198b583a" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_GuaranteeObligationsByNatureAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfGuaranteeObligationsTable_328bffdc-357c-40e8-9ed6-d7d06d896aa3" xlink:to="loc_us-gaap_GuaranteeObligationsByNatureAxis_e9feb539-34bc-4e03-abac-2bf3198b583a" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_GuaranteeObligationsNatureDomain_e9feb539-34bc-4e03-abac-2bf3198b583a_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_GuaranteeObligationsNatureDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_GuaranteeObligationsByNatureAxis_e9feb539-34bc-4e03-abac-2bf3198b583a" xlink:to="loc_us-gaap_GuaranteeObligationsNatureDomain_e9feb539-34bc-4e03-abac-2bf3198b583a_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_GuaranteeObligationsNatureDomain_df4c3d1f-fc79-4e0b-acb3-e33f6ae1af03" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_GuaranteeObligationsNatureDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_GuaranteeObligationsByNatureAxis_e9feb539-34bc-4e03-abac-2bf3198b583a" xlink:to="loc_us-gaap_GuaranteeObligationsNatureDomain_df4c3d1f-fc79-4e0b-acb3-e33f6ae1af03" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_LongTermStandbyPurchaseCommitmentsAndGuaranteedSecuritiesMember_a9290fba-6be2-45b8-bd4c-d0dacae0481c" xlink:href="agm-20240331.xsd#agm_LongTermStandbyPurchaseCommitmentsAndGuaranteedSecuritiesMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_GuaranteeObligationsNatureDomain_df4c3d1f-fc79-4e0b-acb3-e33f6ae1af03" xlink:to="loc_agm_LongTermStandbyPurchaseCommitmentsAndGuaranteedSecuritiesMember_a9290fba-6be2-45b8-bd4c-d0dacae0481c" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_LongTermStandbyPurchaseCommitmentsMember_c4472e77-78c5-4360-960b-b88564e94c00" xlink:href="agm-20240331.xsd#agm_LongTermStandbyPurchaseCommitmentsMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_GuaranteeObligationsNatureDomain_df4c3d1f-fc79-4e0b-acb3-e33f6ae1af03" xlink:to="loc_agm_LongTermStandbyPurchaseCommitmentsMember_c4472e77-78c5-4360-960b-b88564e94c00" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InternalCreditAssessmentAxis_114e01c6-4262-4e02-a4b9-0a9a0938411f" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_InternalCreditAssessmentAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfGuaranteeObligationsTable_328bffdc-357c-40e8-9ed6-d7d06d896aa3" xlink:to="loc_us-gaap_InternalCreditAssessmentAxis_114e01c6-4262-4e02-a4b9-0a9a0938411f" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InternalCreditAssessmentDomain_114e01c6-4262-4e02-a4b9-0a9a0938411f_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_InternalCreditAssessmentDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_InternalCreditAssessmentAxis_114e01c6-4262-4e02-a4b9-0a9a0938411f" xlink:to="loc_us-gaap_InternalCreditAssessmentDomain_114e01c6-4262-4e02-a4b9-0a9a0938411f_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InternalCreditAssessmentDomain_7a615373-9f21-4dc1-9af0-efa618ef038d" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_InternalCreditAssessmentDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_InternalCreditAssessmentAxis_114e01c6-4262-4e02-a4b9-0a9a0938411f" xlink:to="loc_us-gaap_InternalCreditAssessmentDomain_7a615373-9f21-4dc1-9af0-efa618ef038d" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PassMember_10fe3edf-af27-4994-9d80-766f64b957ea" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PassMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_InternalCreditAssessmentDomain_7a615373-9f21-4dc1-9af0-efa618ef038d" xlink:to="loc_us-gaap_PassMember_10fe3edf-af27-4994-9d80-766f64b957ea" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SpecialMentionMember_a516d51f-ed0d-4ba3-9295-5d1e15b2ce68" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SpecialMentionMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_InternalCreditAssessmentDomain_7a615373-9f21-4dc1-9af0-efa618ef038d" xlink:to="loc_us-gaap_SpecialMentionMember_a516d51f-ed0d-4ba3-9295-5d1e15b2ce68" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SubstandardMember_543210d0-aff8-413b-8ead-3c3586ad3553" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SubstandardMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_InternalCreditAssessmentDomain_7a615373-9f21-4dc1-9af0-efa618ef038d" xlink:to="loc_us-gaap_SubstandardMember_543210d0-aff8-413b-8ead-3c3586ad3553" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StatementBusinessSegmentsAxis_ef83733e-5dde-49be-9e5e-ff4e814349f7" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_StatementBusinessSegmentsAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfGuaranteeObligationsTable_328bffdc-357c-40e8-9ed6-d7d06d896aa3" xlink:to="loc_us-gaap_StatementBusinessSegmentsAxis_ef83733e-5dde-49be-9e5e-ff4e814349f7" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SegmentDomain_ef83733e-5dde-49be-9e5e-ff4e814349f7_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SegmentDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementBusinessSegmentsAxis_ef83733e-5dde-49be-9e5e-ff4e814349f7" xlink:to="loc_us-gaap_SegmentDomain_ef83733e-5dde-49be-9e5e-ff4e814349f7_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SegmentDomain_c8c6a611-795f-411c-826c-a25a8de509ef" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SegmentDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementBusinessSegmentsAxis_ef83733e-5dde-49be-9e5e-ff4e814349f7" xlink:to="loc_us-gaap_SegmentDomain_c8c6a611-795f-411c-826c-a25a8de509ef" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_AgriculturalFinanceMember_71bf4c31-78ff-475a-9989-3231dd6fcc83" xlink:href="agm-20240331.xsd#agm_AgriculturalFinanceMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_c8c6a611-795f-411c-826c-a25a8de509ef" xlink:to="loc_agm_AgriculturalFinanceMember_71bf4c31-78ff-475a-9989-3231dd6fcc83" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_RuralInfrastructureFinanceMember_6e6d0a3d-c381-4919-8aa5-50e92d8247d8" xlink:href="agm-20240331.xsd#agm_RuralInfrastructureFinanceMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_c8c6a611-795f-411c-826c-a25a8de509ef" xlink:to="loc_agm_RuralInfrastructureFinanceMember_6e6d0a3d-c381-4919-8aa5-50e92d8247d8" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_FinancingReceivableOriginatedInCurrentFiscalYearAbstract_451700ff-3108-42cc-9830-3e3a5c83143a" xlink:href="agm-20240331.xsd#agm_FinancingReceivableOriginatedInCurrentFiscalYearAbstract"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_GuaranteeObligationsLineItems_56c9f13e-237b-4080-9da8-03f5e2324f12" xlink:to="loc_agm_FinancingReceivableOriginatedInCurrentFiscalYearAbstract_451700ff-3108-42cc-9830-3e3a5c83143a" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinancingReceivableExcludingAccruedInterestYearOneOriginatedCurrentFiscalYear_75df0067-8558-411b-8db0-d7a08abf1332" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FinancingReceivableExcludingAccruedInterestYearOneOriginatedCurrentFiscalYear"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_agm_FinancingReceivableOriginatedInCurrentFiscalYearAbstract_451700ff-3108-42cc-9830-3e3a5c83143a" xlink:to="loc_us-gaap_FinancingReceivableExcludingAccruedInterestYearOneOriginatedCurrentFiscalYear_75df0067-8558-411b-8db0-d7a08abf1332" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_FinancingReceivableOriginatedInCurrentFiscalYearExcludingAccruedInterestAllowanceForCreditLossWriteOff_1297463a-da6f-41a1-b1c1-e1147c965ef8" xlink:href="agm-20240331.xsd#agm_FinancingReceivableOriginatedInCurrentFiscalYearExcludingAccruedInterestAllowanceForCreditLossWriteOff"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_agm_FinancingReceivableOriginatedInCurrentFiscalYearAbstract_451700ff-3108-42cc-9830-3e3a5c83143a" xlink:to="loc_agm_FinancingReceivableOriginatedInCurrentFiscalYearExcludingAccruedInterestAllowanceForCreditLossWriteOff_1297463a-da6f-41a1-b1c1-e1147c965ef8" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_FinancingReceivableOriginatedInFiscalYearBeforeLatestFiscalYearAbstract_eda53946-7182-4e95-bd81-5656c71fc9ff" xlink:href="agm-20240331.xsd#agm_FinancingReceivableOriginatedInFiscalYearBeforeLatestFiscalYearAbstract"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_GuaranteeObligationsLineItems_56c9f13e-237b-4080-9da8-03f5e2324f12" xlink:to="loc_agm_FinancingReceivableOriginatedInFiscalYearBeforeLatestFiscalYearAbstract_eda53946-7182-4e95-bd81-5656c71fc9ff" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinancingReceivableExcludingAccruedInterestYearTwoOriginatedFiscalYearBeforeCurrentFiscalYear_cfd04206-73d4-4e7e-abec-b688edafaa9b" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FinancingReceivableExcludingAccruedInterestYearTwoOriginatedFiscalYearBeforeCurrentFiscalYear"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_agm_FinancingReceivableOriginatedInFiscalYearBeforeLatestFiscalYearAbstract_eda53946-7182-4e95-bd81-5656c71fc9ff" xlink:to="loc_us-gaap_FinancingReceivableExcludingAccruedInterestYearTwoOriginatedFiscalYearBeforeCurrentFiscalYear_cfd04206-73d4-4e7e-abec-b688edafaa9b" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_FinancingReceivableOriginatedInFiscalYearBeforeLatestFiscalYearExcludingAccruedInterestAllowanceForCreditLossWriteOff_82e2ed82-d35c-488d-95ab-2b5ccab984d0" xlink:href="agm-20240331.xsd#agm_FinancingReceivableOriginatedInFiscalYearBeforeLatestFiscalYearExcludingAccruedInterestAllowanceForCreditLossWriteOff"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_agm_FinancingReceivableOriginatedInFiscalYearBeforeLatestFiscalYearAbstract_eda53946-7182-4e95-bd81-5656c71fc9ff" xlink:to="loc_agm_FinancingReceivableOriginatedInFiscalYearBeforeLatestFiscalYearExcludingAccruedInterestAllowanceForCreditLossWriteOff_82e2ed82-d35c-488d-95ab-2b5ccab984d0" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_FinancingReceivableOriginatedTwoYearsBeforeLatestFiscalYearAbstract_cc4fa3fe-9bc4-4c9c-8cb5-742b282ca07c" xlink:href="agm-20240331.xsd#agm_FinancingReceivableOriginatedTwoYearsBeforeLatestFiscalYearAbstract"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_GuaranteeObligationsLineItems_56c9f13e-237b-4080-9da8-03f5e2324f12" xlink:to="loc_agm_FinancingReceivableOriginatedTwoYearsBeforeLatestFiscalYearAbstract_cc4fa3fe-9bc4-4c9c-8cb5-742b282ca07c" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinancingReceivableExcludingAccruedInterestYearThreeOriginatedTwoYearsBeforeCurrentFiscalYear_c1f6c04e-af2f-41ef-a52b-ca49b0b4785f" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FinancingReceivableExcludingAccruedInterestYearThreeOriginatedTwoYearsBeforeCurrentFiscalYear"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_agm_FinancingReceivableOriginatedTwoYearsBeforeLatestFiscalYearAbstract_cc4fa3fe-9bc4-4c9c-8cb5-742b282ca07c" xlink:to="loc_us-gaap_FinancingReceivableExcludingAccruedInterestYearThreeOriginatedTwoYearsBeforeCurrentFiscalYear_c1f6c04e-af2f-41ef-a52b-ca49b0b4785f" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_FinancingReceivableOriginatedTwoYearsBeforeLatestFiscalYearExcludingAccruedInterestAllowanceForCreditLossWriteOff_b689f337-a062-4652-8dcf-6dfa596cebcd" xlink:href="agm-20240331.xsd#agm_FinancingReceivableOriginatedTwoYearsBeforeLatestFiscalYearExcludingAccruedInterestAllowanceForCreditLossWriteOff"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_agm_FinancingReceivableOriginatedTwoYearsBeforeLatestFiscalYearAbstract_cc4fa3fe-9bc4-4c9c-8cb5-742b282ca07c" xlink:to="loc_agm_FinancingReceivableOriginatedTwoYearsBeforeLatestFiscalYearExcludingAccruedInterestAllowanceForCreditLossWriteOff_b689f337-a062-4652-8dcf-6dfa596cebcd" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_FinancingReceivableOriginatedThreeYearsBeforeLatestFiscalYearAbstract_7b0850f3-3a77-434e-8458-364a317b69ea" xlink:href="agm-20240331.xsd#agm_FinancingReceivableOriginatedThreeYearsBeforeLatestFiscalYearAbstract"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_GuaranteeObligationsLineItems_56c9f13e-237b-4080-9da8-03f5e2324f12" xlink:to="loc_agm_FinancingReceivableOriginatedThreeYearsBeforeLatestFiscalYearAbstract_7b0850f3-3a77-434e-8458-364a317b69ea" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinancingReceivableExcludingAccruedInterestYearFourOriginatedThreeYearsBeforeCurrentFiscalYear_48c111e5-8677-44f7-b5f1-d7725a77f746" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FinancingReceivableExcludingAccruedInterestYearFourOriginatedThreeYearsBeforeCurrentFiscalYear"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_agm_FinancingReceivableOriginatedThreeYearsBeforeLatestFiscalYearAbstract_7b0850f3-3a77-434e-8458-364a317b69ea" xlink:to="loc_us-gaap_FinancingReceivableExcludingAccruedInterestYearFourOriginatedThreeYearsBeforeCurrentFiscalYear_48c111e5-8677-44f7-b5f1-d7725a77f746" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_FinancingReceivableOriginatedThreeYearsBeforeLatestFiscalYearExcludingAccruedInterestAllowanceForCreditLossWriteOff_1d375dda-caef-4fd6-8ffc-ebbfabeb0e34" xlink:href="agm-20240331.xsd#agm_FinancingReceivableOriginatedThreeYearsBeforeLatestFiscalYearExcludingAccruedInterestAllowanceForCreditLossWriteOff"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_agm_FinancingReceivableOriginatedThreeYearsBeforeLatestFiscalYearAbstract_7b0850f3-3a77-434e-8458-364a317b69ea" xlink:to="loc_agm_FinancingReceivableOriginatedThreeYearsBeforeLatestFiscalYearExcludingAccruedInterestAllowanceForCreditLossWriteOff_1d375dda-caef-4fd6-8ffc-ebbfabeb0e34" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_FinancingReceivableOriginatedFourYearsBeforeLatestFiscalYearAbstract_b85e15e9-87de-4782-9ec5-aa6c660183b9" xlink:href="agm-20240331.xsd#agm_FinancingReceivableOriginatedFourYearsBeforeLatestFiscalYearAbstract"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_GuaranteeObligationsLineItems_56c9f13e-237b-4080-9da8-03f5e2324f12" xlink:to="loc_agm_FinancingReceivableOriginatedFourYearsBeforeLatestFiscalYearAbstract_b85e15e9-87de-4782-9ec5-aa6c660183b9" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinancingReceivableExcludingAccruedInterestYearFiveOriginatedFourYearsBeforeCurrentFiscalYear_1857c494-25a1-4b36-aa75-74daea27822a" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FinancingReceivableExcludingAccruedInterestYearFiveOriginatedFourYearsBeforeCurrentFiscalYear"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_agm_FinancingReceivableOriginatedFourYearsBeforeLatestFiscalYearAbstract_b85e15e9-87de-4782-9ec5-aa6c660183b9" xlink:to="loc_us-gaap_FinancingReceivableExcludingAccruedInterestYearFiveOriginatedFourYearsBeforeCurrentFiscalYear_1857c494-25a1-4b36-aa75-74daea27822a" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_FinancingReceivableOriginatedFourYearsBeforeLatestFiscalYearExcludingAccruedInterestAllowanceForCreditLossWriteOff_6f5cbe16-bf1c-46ff-a715-c9c82f4fa997" xlink:href="agm-20240331.xsd#agm_FinancingReceivableOriginatedFourYearsBeforeLatestFiscalYearExcludingAccruedInterestAllowanceForCreditLossWriteOff"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_agm_FinancingReceivableOriginatedFourYearsBeforeLatestFiscalYearAbstract_b85e15e9-87de-4782-9ec5-aa6c660183b9" xlink:to="loc_agm_FinancingReceivableOriginatedFourYearsBeforeLatestFiscalYearExcludingAccruedInterestAllowanceForCreditLossWriteOff_6f5cbe16-bf1c-46ff-a715-c9c82f4fa997" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_FinancingReceivableOriginatedFiveOrMoreYearsBeforeLatestFiscalYearAbstract_b8fa9d57-8158-432d-9589-9bf13c73e857" xlink:href="agm-20240331.xsd#agm_FinancingReceivableOriginatedFiveOrMoreYearsBeforeLatestFiscalYearAbstract"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_GuaranteeObligationsLineItems_56c9f13e-237b-4080-9da8-03f5e2324f12" xlink:to="loc_agm_FinancingReceivableOriginatedFiveOrMoreYearsBeforeLatestFiscalYearAbstract_b8fa9d57-8158-432d-9589-9bf13c73e857" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinancingReceivableExcludingAccruedInterestOriginatedMoreThanFiveYearsBeforeCurrentFiscalYear_9cfd3e7b-aefd-4805-b449-cc303939a1fa" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FinancingReceivableExcludingAccruedInterestOriginatedMoreThanFiveYearsBeforeCurrentFiscalYear"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_agm_FinancingReceivableOriginatedFiveOrMoreYearsBeforeLatestFiscalYearAbstract_b8fa9d57-8158-432d-9589-9bf13c73e857" xlink:to="loc_us-gaap_FinancingReceivableExcludingAccruedInterestOriginatedMoreThanFiveYearsBeforeCurrentFiscalYear_9cfd3e7b-aefd-4805-b449-cc303939a1fa" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_FinancingReceivableOriginatedFiveOrMoreYearsBeforeLatestFiscalYearExcludingAccruedInterestAllowanceForCreditLossWriteOff_107074f6-fbf8-4f30-9747-a3b5c8c76a20" xlink:href="agm-20240331.xsd#agm_FinancingReceivableOriginatedFiveOrMoreYearsBeforeLatestFiscalYearExcludingAccruedInterestAllowanceForCreditLossWriteOff"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_agm_FinancingReceivableOriginatedFiveOrMoreYearsBeforeLatestFiscalYearAbstract_b8fa9d57-8158-432d-9589-9bf13c73e857" xlink:to="loc_agm_FinancingReceivableOriginatedFiveOrMoreYearsBeforeLatestFiscalYearExcludingAccruedInterestAllowanceForCreditLossWriteOff_107074f6-fbf8-4f30-9747-a3b5c8c76a20" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_FinancingReceivableRevolvingAbstract_8ac76e23-b2f6-4cc3-94f8-def7e313fd3d" xlink:href="agm-20240331.xsd#agm_FinancingReceivableRevolvingAbstract"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_GuaranteeObligationsLineItems_56c9f13e-237b-4080-9da8-03f5e2324f12" xlink:to="loc_agm_FinancingReceivableRevolvingAbstract_8ac76e23-b2f6-4cc3-94f8-def7e313fd3d" xlink:type="arc" order="6"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinancingReceivableExcludingAccruedInterestRevolving_b1ee823d-fde5-42c9-b31d-763e1147b323" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FinancingReceivableExcludingAccruedInterestRevolving"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_agm_FinancingReceivableRevolvingAbstract_8ac76e23-b2f6-4cc3-94f8-def7e313fd3d" xlink:to="loc_us-gaap_FinancingReceivableExcludingAccruedInterestRevolving_b1ee823d-fde5-42c9-b31d-763e1147b323" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_FinancingReceivableRevolvingExcludingAccruedInterestAllowanceForCreditLossWriteOff_2b99d72a-ee59-49c9-891e-2c973e164965" xlink:href="agm-20240331.xsd#agm_FinancingReceivableRevolvingExcludingAccruedInterestAllowanceForCreditLossWriteOff"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_agm_FinancingReceivableRevolvingAbstract_8ac76e23-b2f6-4cc3-94f8-def7e313fd3d" xlink:to="loc_agm_FinancingReceivableRevolvingExcludingAccruedInterestAllowanceForCreditLossWriteOff_2b99d72a-ee59-49c9-891e-2c973e164965" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinancingReceivableBeforeAllowanceForCreditLossAbstract_d86d2d20-7623-420e-bd01-fa3a9f01a6e2" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FinancingReceivableBeforeAllowanceForCreditLossAbstract"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_GuaranteeObligationsLineItems_56c9f13e-237b-4080-9da8-03f5e2324f12" xlink:to="loc_us-gaap_FinancingReceivableBeforeAllowanceForCreditLossAbstract_d86d2d20-7623-420e-bd01-fa3a9f01a6e2" xlink:type="arc" order="7"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinancingReceivableExcludingAccruedInterestBeforeAllowanceForCreditLoss_1dc720cd-6747-4045-8f39-f443a6fe985f" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FinancingReceivableExcludingAccruedInterestBeforeAllowanceForCreditLoss"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FinancingReceivableBeforeAllowanceForCreditLossAbstract_d86d2d20-7623-420e-bd01-fa3a9f01a6e2" xlink:to="loc_us-gaap_FinancingReceivableExcludingAccruedInterestBeforeAllowanceForCreditLoss_1dc720cd-6747-4045-8f39-f443a6fe985f" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinancingReceivableExcludingAccruedInterestAllowanceForCreditLossWriteoff_35cd54c7-97f1-4a37-aa82-a3e251a02617" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FinancingReceivableExcludingAccruedInterestAllowanceForCreditLossWriteoff"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FinancingReceivableBeforeAllowanceForCreditLossAbstract_d86d2d20-7623-420e-bd01-fa3a9f01a6e2" xlink:to="loc_us-gaap_FinancingReceivableExcludingAccruedInterestAllowanceForCreditLossWriteoff_35cd54c7-97f1-4a37-aa82-a3e251a02617" xlink:type="arc" order="2"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.farmermac.com/role/NOTESPAYABLENarrativeDetails" xlink:type="simple" xlink:href="agm-20240331.xsd#NOTESPAYABLENarrativeDetails"/>
  <link:definitionLink xlink:role="http://www.farmermac.com/role/NOTESPAYABLENarrativeDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtInstrumentLineItems_a1bc66bc-fd7d-4a4a-8c80-837c726c66ef" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtInstrumentLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtInstrumentTable_da1084be-515e-4b43-9791-2d80905bc29f" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtInstrumentTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_DebtInstrumentLineItems_a1bc66bc-fd7d-4a4a-8c80-837c726c66ef" xlink:to="loc_us-gaap_DebtInstrumentTable_da1084be-515e-4b43-9791-2d80905bc29f" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtInstrumentAxis_3b682527-41a4-45e4-98f0-f79e436be05e" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtInstrumentAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_DebtInstrumentTable_da1084be-515e-4b43-9791-2d80905bc29f" xlink:to="loc_us-gaap_DebtInstrumentAxis_3b682527-41a4-45e4-98f0-f79e436be05e" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtInstrumentNameDomain_3b682527-41a4-45e4-98f0-f79e436be05e_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtInstrumentNameDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_DebtInstrumentAxis_3b682527-41a4-45e4-98f0-f79e436be05e" xlink:to="loc_us-gaap_DebtInstrumentNameDomain_3b682527-41a4-45e4-98f0-f79e436be05e_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtInstrumentNameDomain_9de9def5-c1b5-4f7b-8249-cfca37fa96e4" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtInstrumentNameDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_DebtInstrumentAxis_3b682527-41a4-45e4-98f0-f79e436be05e" xlink:to="loc_us-gaap_DebtInstrumentNameDomain_9de9def5-c1b5-4f7b-8249-cfca37fa96e4" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_DiscountNotesMember_bb02d183-ff9d-43fe-8118-2e4255537b47" xlink:href="agm-20240331.xsd#agm_DiscountNotesMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentNameDomain_9de9def5-c1b5-4f7b-8249-cfca37fa96e4" xlink:to="loc_agm_DiscountNotesMember_bb02d183-ff9d-43fe-8118-2e4255537b47" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_MediumTermNotesMember_86a77f78-9a16-45f5-8261-4d9f614e4426" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_MediumTermNotesMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentNameDomain_9de9def5-c1b5-4f7b-8249-cfca37fa96e4" xlink:to="loc_us-gaap_MediumTermNotesMember_86a77f78-9a16-45f5-8261-4d9f614e4426" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NotesPayableToBanksMember_5006f1c1-a877-4c87-b7c1-ddaa887d3268" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_NotesPayableToBanksMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentNameDomain_9de9def5-c1b5-4f7b-8249-cfca37fa96e4" xlink:to="loc_us-gaap_NotesPayableToBanksMember_5006f1c1-a877-4c87-b7c1-ddaa887d3268" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_RangeAxis_c89d942c-d427-49cd-a6ef-f64f65ef6606" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_RangeAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_DebtInstrumentTable_da1084be-515e-4b43-9791-2d80905bc29f" xlink:to="loc_srt_RangeAxis_c89d942c-d427-49cd-a6ef-f64f65ef6606" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_RangeMember_c89d942c-d427-49cd-a6ef-f64f65ef6606_default" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_RangeMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_srt_RangeAxis_c89d942c-d427-49cd-a6ef-f64f65ef6606" xlink:to="loc_srt_RangeMember_c89d942c-d427-49cd-a6ef-f64f65ef6606_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_RangeMember_f82bfcdd-7c4a-4579-87a4-35f766a01cfd" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_RangeMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_srt_RangeAxis_c89d942c-d427-49cd-a6ef-f64f65ef6606" xlink:to="loc_srt_RangeMember_f82bfcdd-7c4a-4579-87a4-35f766a01cfd" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_MinimumMember_d479f5ca-4664-4366-9509-df5c81733a51" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_MinimumMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_RangeMember_f82bfcdd-7c4a-4579-87a4-35f766a01cfd" xlink:to="loc_srt_MinimumMember_d479f5ca-4664-4366-9509-df5c81733a51" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_MaximumMember_57cee9f4-49e4-42d5-a0e2-f2febac5f6de" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_MaximumMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_RangeMember_f82bfcdd-7c4a-4579-87a4-35f766a01cfd" xlink:to="loc_srt_MaximumMember_57cee9f4-49e4-42d5-a0e2-f2febac5f6de" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtInstrumentTerm_b608730f-b9ca-4a19-b097-d6271f1ef28d" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtInstrumentTerm"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentLineItems_a1bc66bc-fd7d-4a4a-8c80-837c726c66ef" xlink:to="loc_us-gaap_DebtInstrumentTerm_b608730f-b9ca-4a19-b097-d6271f1ef28d" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShorttermDebtMaximumMonthendOutstandingAmount_89a2e3ac-af85-46f2-82d8-7fa5661fcc4e" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ShorttermDebtMaximumMonthendOutstandingAmount"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentLineItems_a1bc66bc-fd7d-4a4a-8c80-837c726c66ef" xlink:to="loc_us-gaap_ShorttermDebtMaximumMonthendOutstandingAmount_89a2e3ac-af85-46f2-82d8-7fa5661fcc4e" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_MediumTermNotesCalledDuringThePeriod_237a0d7d-6bee-404d-9e78-925b25633b4b" xlink:href="agm-20240331.xsd#agm_MediumTermNotesCalledDuringThePeriod"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentLineItems_a1bc66bc-fd7d-4a4a-8c80-837c726c66ef" xlink:to="loc_agm_MediumTermNotesCalledDuringThePeriod_237a0d7d-6bee-404d-9e78-925b25633b4b" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LineOfCreditFacilityMaximumBorrowingCapacity_331e247e-87c6-4f89-a340-f155c472840f" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LineOfCreditFacilityMaximumBorrowingCapacity"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentLineItems_a1bc66bc-fd7d-4a4a-8c80-837c726c66ef" xlink:to="loc_us-gaap_LineOfCreditFacilityMaximumBorrowingCapacity_331e247e-87c6-4f89-a340-f155c472840f" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ExtinguishmentOfDebtAmount_6265d053-9661-4978-b627-915bfdbf3d17" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ExtinguishmentOfDebtAmount"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentLineItems_a1bc66bc-fd7d-4a4a-8c80-837c726c66ef" xlink:to="loc_us-gaap_ExtinguishmentOfDebtAmount_6265d053-9661-4978-b627-915bfdbf3d17" xlink:type="arc" order="4"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.farmermac.com/role/NOTESPAYABLEBorrowingsDetails" xlink:type="simple" xlink:href="agm-20240331.xsd#NOTESPAYABLEBorrowingsDetails"/>
  <link:definitionLink xlink:role="http://www.farmermac.com/role/NOTESPAYABLEBorrowingsDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtInstrumentLineItems_e9a841f3-cfd6-4d50-a8d4-5f96e3fcbc63" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtInstrumentLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtInstrumentTable_1fd1e052-9ba2-4071-bb27-a53b44925715" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtInstrumentTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_DebtInstrumentLineItems_e9a841f3-cfd6-4d50-a8d4-5f96e3fcbc63" xlink:to="loc_us-gaap_DebtInstrumentTable_1fd1e052-9ba2-4071-bb27-a53b44925715" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtInstrumentAxis_203038b4-33fc-4784-b10f-f66faa58b903" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtInstrumentAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_DebtInstrumentTable_1fd1e052-9ba2-4071-bb27-a53b44925715" xlink:to="loc_us-gaap_DebtInstrumentAxis_203038b4-33fc-4784-b10f-f66faa58b903" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtInstrumentNameDomain_203038b4-33fc-4784-b10f-f66faa58b903_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtInstrumentNameDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_DebtInstrumentAxis_203038b4-33fc-4784-b10f-f66faa58b903" xlink:to="loc_us-gaap_DebtInstrumentNameDomain_203038b4-33fc-4784-b10f-f66faa58b903_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtInstrumentNameDomain_768be208-8452-4402-824e-99bff0cbe132" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtInstrumentNameDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_DebtInstrumentAxis_203038b4-33fc-4784-b10f-f66faa58b903" xlink:to="loc_us-gaap_DebtInstrumentNameDomain_768be208-8452-4402-824e-99bff0cbe132" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NotesPayableToBanksMember_a1369011-befd-4b7f-80c6-d982b8dbc766" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_NotesPayableToBanksMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentNameDomain_768be208-8452-4402-824e-99bff0cbe132" xlink:to="loc_us-gaap_NotesPayableToBanksMember_a1369011-befd-4b7f-80c6-d982b8dbc766" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_MediumTermNotesMember_f11d3af5-267e-4c41-8a0a-cc8d40b959c6" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_MediumTermNotesMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentNameDomain_768be208-8452-4402-824e-99bff0cbe132" xlink:to="loc_us-gaap_MediumTermNotesMember_f11d3af5-267e-4c41-8a0a-cc8d40b959c6" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongTermDebtMember_7ec94a1d-b1f9-47ef-a3c7-c338a96913e5" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LongTermDebtMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentNameDomain_768be208-8452-4402-824e-99bff0cbe132" xlink:to="loc_us-gaap_LongTermDebtMember_7ec94a1d-b1f9-47ef-a3c7-c338a96913e5" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtInstrumentRedemptionPeriodAxis_464146de-6d68-4ab9-8324-25703c36a0bb" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtInstrumentRedemptionPeriodAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_DebtInstrumentTable_1fd1e052-9ba2-4071-bb27-a53b44925715" xlink:to="loc_us-gaap_DebtInstrumentRedemptionPeriodAxis_464146de-6d68-4ab9-8324-25703c36a0bb" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtInstrumentRedemptionPeriodDomain_464146de-6d68-4ab9-8324-25703c36a0bb_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtInstrumentRedemptionPeriodDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_DebtInstrumentRedemptionPeriodAxis_464146de-6d68-4ab9-8324-25703c36a0bb" xlink:to="loc_us-gaap_DebtInstrumentRedemptionPeriodDomain_464146de-6d68-4ab9-8324-25703c36a0bb_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtInstrumentRedemptionPeriodDomain_56ae3be9-839d-4cbd-ae83-88183a6fc7d8" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtInstrumentRedemptionPeriodDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_DebtInstrumentRedemptionPeriodAxis_464146de-6d68-4ab9-8324-25703c36a0bb" xlink:to="loc_us-gaap_DebtInstrumentRedemptionPeriodDomain_56ae3be9-839d-4cbd-ae83-88183a6fc7d8" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtInstrumentRedemptionPeriodTwoMember_736be5d6-a279-4f63-8630-7a93517a196a" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtInstrumentRedemptionPeriodTwoMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentRedemptionPeriodDomain_56ae3be9-839d-4cbd-ae83-88183a6fc7d8" xlink:to="loc_us-gaap_DebtInstrumentRedemptionPeriodTwoMember_736be5d6-a279-4f63-8630-7a93517a196a" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtInstrumentRedemptionPeriodThreeMember_70d72596-ca09-4eb0-a0e5-d3d6fddf7588" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtInstrumentRedemptionPeriodThreeMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentRedemptionPeriodDomain_56ae3be9-839d-4cbd-ae83-88183a6fc7d8" xlink:to="loc_us-gaap_DebtInstrumentRedemptionPeriodThreeMember_70d72596-ca09-4eb0-a0e5-d3d6fddf7588" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtInstrumentRedemptionPeriodFourMember_1370c828-c80e-43d7-949a-f37cd92ad897" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtInstrumentRedemptionPeriodFourMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentRedemptionPeriodDomain_56ae3be9-839d-4cbd-ae83-88183a6fc7d8" xlink:to="loc_us-gaap_DebtInstrumentRedemptionPeriodFourMember_1370c828-c80e-43d7-949a-f37cd92ad897" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtInstrumentRedemptionPeriodFiveMember_52c8268e-b387-438e-bc39-4f8b59746df5" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtInstrumentRedemptionPeriodFiveMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentRedemptionPeriodDomain_56ae3be9-839d-4cbd-ae83-88183a6fc7d8" xlink:to="loc_us-gaap_DebtInstrumentRedemptionPeriodFiveMember_52c8268e-b387-438e-bc39-4f8b59746df5" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_DebtInstrumentRedemptionAfterPeriodFiveMember_394ce2dc-d7bc-491e-a750-59c58fbc9cce" xlink:href="agm-20240331.xsd#agm_DebtInstrumentRedemptionAfterPeriodFiveMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentRedemptionPeriodDomain_56ae3be9-839d-4cbd-ae83-88183a6fc7d8" xlink:to="loc_agm_DebtInstrumentRedemptionAfterPeriodFiveMember_394ce2dc-d7bc-491e-a750-59c58fbc9cce" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShortTermBorrowingsAbstract_fa828230-3300-4c6f-bb73-103162d48ef6" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ShortTermBorrowingsAbstract"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentLineItems_e9a841f3-cfd6-4d50-a8d4-5f96e3fcbc63" xlink:to="loc_us-gaap_ShortTermBorrowingsAbstract_fa828230-3300-4c6f-bb73-103162d48ef6" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongTermDebtCurrent_a1a44c3f-afc2-47d6-979e-b4c5111887cf" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LongTermDebtCurrent"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShortTermBorrowingsAbstract_fa828230-3300-4c6f-bb73-103162d48ef6" xlink:to="loc_us-gaap_LongTermDebtCurrent_a1a44c3f-afc2-47d6-979e-b4c5111887cf" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShortTermDebtWeightedAverageInterestRate_4aa8289f-2dfc-4431-ae13-953af25e97be" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ShortTermDebtWeightedAverageInterestRate"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShortTermBorrowingsAbstract_fa828230-3300-4c6f-bb73-103162d48ef6" xlink:to="loc_us-gaap_ShortTermDebtWeightedAverageInterestRate_4aa8289f-2dfc-4431-ae13-953af25e97be" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShorttermDebtAverageOutstandingAmount_1cb3f500-078a-4ff8-89d6-9f9bf419a192" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ShorttermDebtAverageOutstandingAmount"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShortTermBorrowingsAbstract_fa828230-3300-4c6f-bb73-103162d48ef6" xlink:to="loc_us-gaap_ShorttermDebtAverageOutstandingAmount_1cb3f500-078a-4ff8-89d6-9f9bf419a192" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtInstrumentInterestRateDuringPeriod_c11a5aa7-334f-4a4b-8c47-a5761da8ba0a" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtInstrumentInterestRateDuringPeriod"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShortTermBorrowingsAbstract_fa828230-3300-4c6f-bb73-103162d48ef6" xlink:to="loc_us-gaap_DebtInstrumentInterestRateDuringPeriod_c11a5aa7-334f-4a4b-8c47-a5761da8ba0a" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongtermDebtCurrentAndNoncurrentAbstract_30eb4a42-0b7e-4e2e-a7a9-cc4228f1530b" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LongtermDebtCurrentAndNoncurrentAbstract"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentLineItems_e9a841f3-cfd6-4d50-a8d4-5f96e3fcbc63" xlink:to="loc_us-gaap_LongtermDebtCurrentAndNoncurrentAbstract_30eb4a42-0b7e-4e2e-a7a9-cc4228f1530b" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_MaturitiesOfLongTermDebtAbstract_c35e6b7d-44a5-4368-81b0-ab3d903cd2e9" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_MaturitiesOfLongTermDebtAbstract"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LongtermDebtCurrentAndNoncurrentAbstract_30eb4a42-0b7e-4e2e-a7a9-cc4228f1530b" xlink:to="loc_us-gaap_MaturitiesOfLongTermDebtAbstract_c35e6b7d-44a5-4368-81b0-ab3d903cd2e9" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInYearTwo_969ecb22-e133-4473-8aef-28e0d83564c6" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInYearTwo"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_MaturitiesOfLongTermDebtAbstract_c35e6b7d-44a5-4368-81b0-ab3d903cd2e9" xlink:to="loc_us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInYearTwo_969ecb22-e133-4473-8aef-28e0d83564c6" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInYearThree_7fc990a7-5812-49a4-bc65-efa272aeba07" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInYearThree"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_MaturitiesOfLongTermDebtAbstract_c35e6b7d-44a5-4368-81b0-ab3d903cd2e9" xlink:to="loc_us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInYearThree_7fc990a7-5812-49a4-bc65-efa272aeba07" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInYearFour_7a493167-cb33-468d-9aba-34b301a12159" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInYearFour"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_MaturitiesOfLongTermDebtAbstract_c35e6b7d-44a5-4368-81b0-ab3d903cd2e9" xlink:to="loc_us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInYearFour_7a493167-cb33-468d-9aba-34b301a12159" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInYearFive_20061f43-1f68-4e65-a016-ed4add7725a2" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInYearFive"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_MaturitiesOfLongTermDebtAbstract_c35e6b7d-44a5-4368-81b0-ab3d903cd2e9" xlink:to="loc_us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInYearFive_20061f43-1f68-4e65-a016-ed4add7725a2" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalAfterYearFive_f135326c-c7a3-433e-8ef0-eafa4c291610" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalAfterYearFive"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_MaturitiesOfLongTermDebtAbstract_c35e6b7d-44a5-4368-81b0-ab3d903cd2e9" xlink:to="loc_us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalAfterYearFive_f135326c-c7a3-433e-8ef0-eafa4c291610" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongTermDebtNoncurrent_d82fedc6-df6e-45f7-a2ea-1b7ff3d6e001" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LongTermDebtNoncurrent"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_MaturitiesOfLongTermDebtAbstract_c35e6b7d-44a5-4368-81b0-ab3d903cd2e9" xlink:to="loc_us-gaap_LongTermDebtNoncurrent_d82fedc6-df6e-45f7-a2ea-1b7ff3d6e001" xlink:type="arc" order="6"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongTermDebt_e466c2ab-26f6-43f5-8313-cddee41e63cd" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LongTermDebt"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_MaturitiesOfLongTermDebtAbstract_c35e6b7d-44a5-4368-81b0-ab3d903cd2e9" xlink:to="loc_us-gaap_LongTermDebt_e466c2ab-26f6-43f5-8313-cddee41e63cd" xlink:type="arc" order="7"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_LongTermDebtHedgingAdjustments_382a9e08-12d3-41bf-b06d-958682ccd09e" xlink:href="agm-20240331.xsd#agm_LongTermDebtHedgingAdjustments"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_MaturitiesOfLongTermDebtAbstract_c35e6b7d-44a5-4368-81b0-ab3d903cd2e9" xlink:to="loc_agm_LongTermDebtHedgingAdjustments_382a9e08-12d3-41bf-b06d-958682ccd09e" xlink:type="arc" order="8"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_LongTermDebtNetOfHedgingAdjustments_e5b7a82e-23b2-4090-9e6d-eb362afcfe5c" xlink:href="agm-20240331.xsd#agm_LongTermDebtNetOfHedgingAdjustments"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_MaturitiesOfLongTermDebtAbstract_c35e6b7d-44a5-4368-81b0-ab3d903cd2e9" xlink:to="loc_agm_LongTermDebtNetOfHedgingAdjustments_e5b7a82e-23b2-4090-9e6d-eb362afcfe5c" xlink:type="arc" order="9"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongtermDebtWeightedAverageInterestRate_8513b87b-d1d2-44b0-ac5e-44ed6620f1c8" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LongtermDebtWeightedAverageInterestRate"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LongtermDebtCurrentAndNoncurrentAbstract_30eb4a42-0b7e-4e2e-a7a9-cc4228f1530b" xlink:to="loc_us-gaap_LongtermDebtWeightedAverageInterestRate_8513b87b-d1d2-44b0-ac5e-44ed6620f1c8" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtWeightedAverageInterestRate_49b94d2e-8d45-4ead-90cc-709a1e6efeeb" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtWeightedAverageInterestRate"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LongtermDebtCurrentAndNoncurrentAbstract_30eb4a42-0b7e-4e2e-a7a9-cc4228f1530b" xlink:to="loc_us-gaap_DebtWeightedAverageInterestRate_49b94d2e-8d45-4ead-90cc-709a1e6efeeb" xlink:type="arc" order="3"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.farmermac.com/role/NOTESPAYABLECallableMediumTermNotesDetails" xlink:type="simple" xlink:href="agm-20240331.xsd#NOTESPAYABLECallableMediumTermNotesDetails"/>
  <link:definitionLink xlink:role="http://www.farmermac.com/role/NOTESPAYABLECallableMediumTermNotesDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtInstrumentLineItems_e6285707-23bb-45ae-bbff-0436cc693a5e" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtInstrumentLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtInstrumentTable_b0771d40-b4b3-4a38-9193-9adf15a80973" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtInstrumentTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_DebtInstrumentLineItems_e6285707-23bb-45ae-bbff-0436cc693a5e" xlink:to="loc_us-gaap_DebtInstrumentTable_b0771d40-b4b3-4a38-9193-9adf15a80973" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtInstrumentAxis_91975b6e-c68f-4cdd-85de-3058e511caef" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtInstrumentAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_DebtInstrumentTable_b0771d40-b4b3-4a38-9193-9adf15a80973" xlink:to="loc_us-gaap_DebtInstrumentAxis_91975b6e-c68f-4cdd-85de-3058e511caef" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtInstrumentNameDomain_91975b6e-c68f-4cdd-85de-3058e511caef_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtInstrumentNameDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_DebtInstrumentAxis_91975b6e-c68f-4cdd-85de-3058e511caef" xlink:to="loc_us-gaap_DebtInstrumentNameDomain_91975b6e-c68f-4cdd-85de-3058e511caef_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtInstrumentNameDomain_c409c41a-bbcf-42f3-b877-be370e8fc606" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtInstrumentNameDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_DebtInstrumentAxis_91975b6e-c68f-4cdd-85de-3058e511caef" xlink:to="loc_us-gaap_DebtInstrumentNameDomain_c409c41a-bbcf-42f3-b877-be370e8fc606" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CallOptionMember_fbefa909-f2e3-49c9-99df-d96ceca5b46a" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_CallOptionMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentNameDomain_c409c41a-bbcf-42f3-b877-be370e8fc606" xlink:to="loc_us-gaap_CallOptionMember_fbefa909-f2e3-49c9-99df-d96ceca5b46a" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongtermDebtTypeAxis_e568a9e5-3053-46cd-957e-31b67276271b" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LongtermDebtTypeAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_DebtInstrumentTable_b0771d40-b4b3-4a38-9193-9adf15a80973" xlink:to="loc_us-gaap_LongtermDebtTypeAxis_e568a9e5-3053-46cd-957e-31b67276271b" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongtermDebtTypeDomain_e568a9e5-3053-46cd-957e-31b67276271b_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LongtermDebtTypeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_LongtermDebtTypeAxis_e568a9e5-3053-46cd-957e-31b67276271b" xlink:to="loc_us-gaap_LongtermDebtTypeDomain_e568a9e5-3053-46cd-957e-31b67276271b_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongtermDebtTypeDomain_0d56b690-3266-48bc-8605-46cfacf15b43" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LongtermDebtTypeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_LongtermDebtTypeAxis_e568a9e5-3053-46cd-957e-31b67276271b" xlink:to="loc_us-gaap_LongtermDebtTypeDomain_0d56b690-3266-48bc-8605-46cfacf15b43" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_DueYearOneMember_ac0fd974-3202-438c-9516-4273cf8be2ea" xlink:href="agm-20240331.xsd#agm_DueYearOneMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LongtermDebtTypeDomain_0d56b690-3266-48bc-8605-46cfacf15b43" xlink:to="loc_agm_DueYearOneMember_ac0fd974-3202-438c-9516-4273cf8be2ea" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_DueYearTwoMember_be501783-4c6a-4e67-b7b0-c941e3fe311c" xlink:href="agm-20240331.xsd#agm_DueYearTwoMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LongtermDebtTypeDomain_0d56b690-3266-48bc-8605-46cfacf15b43" xlink:to="loc_agm_DueYearTwoMember_be501783-4c6a-4e67-b7b0-c941e3fe311c" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_DueYearThreeMember_1944e7a6-8875-4b8d-a712-f05d06b433d7" xlink:href="agm-20240331.xsd#agm_DueYearThreeMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LongtermDebtTypeDomain_0d56b690-3266-48bc-8605-46cfacf15b43" xlink:to="loc_agm_DueYearThreeMember_1944e7a6-8875-4b8d-a712-f05d06b433d7" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_DueYearFourMember_97d4a345-db2c-4d4b-9ae3-61932ffac2d4" xlink:href="agm-20240331.xsd#agm_DueYearFourMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LongtermDebtTypeDomain_0d56b690-3266-48bc-8605-46cfacf15b43" xlink:to="loc_agm_DueYearFourMember_97d4a345-db2c-4d4b-9ae3-61932ffac2d4" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_DueAfterYearFourMember_ce1b1aec-6f1b-43e8-a06d-c4dd0bc40807" xlink:href="agm-20240331.xsd#agm_DueAfterYearFourMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LongtermDebtTypeDomain_0d56b690-3266-48bc-8605-46cfacf15b43" xlink:to="loc_agm_DueAfterYearFourMember_ce1b1aec-6f1b-43e8-a06d-c4dd0bc40807" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInNextTwelveMonths_a248b0e7-9460-4baa-9d2b-48c9db312937" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInNextTwelveMonths"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentLineItems_e6285707-23bb-45ae-bbff-0436cc693a5e" xlink:to="loc_us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInNextTwelveMonths_a248b0e7-9460-4baa-9d2b-48c9db312937" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInYearTwo_b0d3381b-85de-4d9a-a4a4-09dc90258935" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInYearTwo"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentLineItems_e6285707-23bb-45ae-bbff-0436cc693a5e" xlink:to="loc_us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInYearTwo_b0d3381b-85de-4d9a-a4a4-09dc90258935" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInYearThree_380111c0-ac73-4937-9ef0-4555384bb4e2" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInYearThree"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentLineItems_e6285707-23bb-45ae-bbff-0436cc693a5e" xlink:to="loc_us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInYearThree_380111c0-ac73-4937-9ef0-4555384bb4e2" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInYearFour_f858c03d-6a20-4e45-b636-e136e1e0b82a" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInYearFour"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentLineItems_e6285707-23bb-45ae-bbff-0436cc693a5e" xlink:to="loc_us-gaap_LongTermDebtMaturitiesRepaymentsOfPrincipalInYearFour_f858c03d-6a20-4e45-b636-e136e1e0b82a" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_LongTermDebtMaturityAfterYearFour_00c9aff2-769b-4d0e-b966-0f537c3e217f" xlink:href="agm-20240331.xsd#agm_LongTermDebtMaturityAfterYearFour"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentLineItems_e6285707-23bb-45ae-bbff-0436cc693a5e" xlink:to="loc_agm_LongTermDebtMaturityAfterYearFour_00c9aff2-769b-4d0e-b966-0f537c3e217f" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongTermDebt_dd1ec405-41b7-4653-9ecd-197f9b004c94" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LongTermDebt"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentLineItems_e6285707-23bb-45ae-bbff-0436cc693a5e" xlink:to="loc_us-gaap_LongTermDebt_dd1ec405-41b7-4653-9ecd-197f9b004c94" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongtermDebtWeightedAverageInterestRate_5e845ad9-b639-4fb5-bf1f-13008efbd7ca" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LongtermDebtWeightedAverageInterestRate"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentLineItems_e6285707-23bb-45ae-bbff-0436cc693a5e" xlink:to="loc_us-gaap_LongtermDebtWeightedAverageInterestRate_5e845ad9-b639-4fb5-bf1f-13008efbd7ca" xlink:type="arc" order="6"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.farmermac.com/role/NOTESPAYABLEEarliestInterestResetDateofBorrowingOutstandingDetails" xlink:type="simple" xlink:href="agm-20240331.xsd#NOTESPAYABLEEarliestInterestResetDateofBorrowingOutstandingDetails"/>
  <link:definitionLink xlink:role="http://www.farmermac.com/role/NOTESPAYABLEEarliestInterestResetDateofBorrowingOutstandingDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtInstrumentLineItems_b8aae328-4b03-4b55-ad9e-4f3196cab202" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtInstrumentLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtInstrumentTable_16c76c87-24e9-490b-8dab-0545959096a9" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtInstrumentTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_DebtInstrumentLineItems_b8aae328-4b03-4b55-ad9e-4f3196cab202" xlink:to="loc_us-gaap_DebtInstrumentTable_16c76c87-24e9-490b-8dab-0545959096a9" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongtermDebtTypeAxis_a1afebe5-0fd8-467b-a06f-694c659ff88e" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LongtermDebtTypeAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_DebtInstrumentTable_16c76c87-24e9-490b-8dab-0545959096a9" xlink:to="loc_us-gaap_LongtermDebtTypeAxis_a1afebe5-0fd8-467b-a06f-694c659ff88e" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongtermDebtTypeDomain_a1afebe5-0fd8-467b-a06f-694c659ff88e_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LongtermDebtTypeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_LongtermDebtTypeAxis_a1afebe5-0fd8-467b-a06f-694c659ff88e" xlink:to="loc_us-gaap_LongtermDebtTypeDomain_a1afebe5-0fd8-467b-a06f-694c659ff88e_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongtermDebtTypeDomain_da704431-fa7d-4eb1-9401-49c2ba85b6b9" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LongtermDebtTypeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_LongtermDebtTypeAxis_a1afebe5-0fd8-467b-a06f-694c659ff88e" xlink:to="loc_us-gaap_LongtermDebtTypeDomain_da704431-fa7d-4eb1-9401-49c2ba85b6b9" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_DueWithinOneYearMember_8a923032-0adb-4f32-9863-a14606bf72a2" xlink:href="agm-20240331.xsd#agm_DueWithinOneYearMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LongtermDebtTypeDomain_da704431-fa7d-4eb1-9401-49c2ba85b6b9" xlink:to="loc_agm_DueWithinOneYearMember_8a923032-0adb-4f32-9863-a14606bf72a2" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_DueYearOneMember_16b274ee-d8d5-47a3-9b7b-f9abb59cc193" xlink:href="agm-20240331.xsd#agm_DueYearOneMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LongtermDebtTypeDomain_da704431-fa7d-4eb1-9401-49c2ba85b6b9" xlink:to="loc_agm_DueYearOneMember_16b274ee-d8d5-47a3-9b7b-f9abb59cc193" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_DueYearTwoMember_73243471-094d-4df2-ace6-99e25af641a4" xlink:href="agm-20240331.xsd#agm_DueYearTwoMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LongtermDebtTypeDomain_da704431-fa7d-4eb1-9401-49c2ba85b6b9" xlink:to="loc_agm_DueYearTwoMember_73243471-094d-4df2-ace6-99e25af641a4" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_DueYearThreeMember_fcf850cb-86a8-4a12-ac1e-774f1b9c1b25" xlink:href="agm-20240331.xsd#agm_DueYearThreeMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LongtermDebtTypeDomain_da704431-fa7d-4eb1-9401-49c2ba85b6b9" xlink:to="loc_agm_DueYearThreeMember_fcf850cb-86a8-4a12-ac1e-774f1b9c1b25" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_DueYearFourMember_28b58a4a-571f-4ebd-a449-aa5646945df7" xlink:href="agm-20240331.xsd#agm_DueYearFourMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LongtermDebtTypeDomain_da704431-fa7d-4eb1-9401-49c2ba85b6b9" xlink:to="loc_agm_DueYearFourMember_28b58a4a-571f-4ebd-a449-aa5646945df7" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_DueAfterFourYearsMember_22ac23e5-43e5-41ca-8ffe-b04cd92f49fe" xlink:href="agm-20240331.xsd#agm_DueAfterFourYearsMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LongtermDebtTypeDomain_da704431-fa7d-4eb1-9401-49c2ba85b6b9" xlink:to="loc_agm_DueAfterFourYearsMember_22ac23e5-43e5-41ca-8ffe-b04cd92f49fe" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_LongTermDebtWithInterestRateResetMaturityReminderOfTheFiscalYear_41fa288f-3a53-4774-9cf5-db20baff2829" xlink:href="agm-20240331.xsd#agm_LongTermDebtWithInterestRateResetMaturityReminderOfTheFiscalYear"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentLineItems_b8aae328-4b03-4b55-ad9e-4f3196cab202" xlink:to="loc_agm_LongTermDebtWithInterestRateResetMaturityReminderOfTheFiscalYear_41fa288f-3a53-4774-9cf5-db20baff2829" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_LongTermDebtWithInterestRateResetMaturityYearOne_4090132d-5b80-4e90-a101-4248128077ff" xlink:href="agm-20240331.xsd#agm_LongTermDebtWithInterestRateResetMaturityYearOne"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentLineItems_b8aae328-4b03-4b55-ad9e-4f3196cab202" xlink:to="loc_agm_LongTermDebtWithInterestRateResetMaturityYearOne_4090132d-5b80-4e90-a101-4248128077ff" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_LongTermDebtWithInterestRateResetMaturityYearTwo_f1f74ba4-b0c3-4e15-a4ae-7d78f25e6735" xlink:href="agm-20240331.xsd#agm_LongTermDebtWithInterestRateResetMaturityYearTwo"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentLineItems_b8aae328-4b03-4b55-ad9e-4f3196cab202" xlink:to="loc_agm_LongTermDebtWithInterestRateResetMaturityYearTwo_f1f74ba4-b0c3-4e15-a4ae-7d78f25e6735" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_LongTermDebtWithInterestRateResetMaturityYearThree_0bba9239-bd42-420d-bbfa-e2222bf9e509" xlink:href="agm-20240331.xsd#agm_LongTermDebtWithInterestRateResetMaturityYearThree"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentLineItems_b8aae328-4b03-4b55-ad9e-4f3196cab202" xlink:to="loc_agm_LongTermDebtWithInterestRateResetMaturityYearThree_0bba9239-bd42-420d-bbfa-e2222bf9e509" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_LongTermDebtWithInterestRateResetMaturityYearFour_bdd2b95a-b00a-440e-89b5-7253faa47199" xlink:href="agm-20240331.xsd#agm_LongTermDebtWithInterestRateResetMaturityYearFour"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentLineItems_b8aae328-4b03-4b55-ad9e-4f3196cab202" xlink:to="loc_agm_LongTermDebtWithInterestRateResetMaturityYearFour_bdd2b95a-b00a-440e-89b5-7253faa47199" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_LongTermDebtWithInterestRateResetMaturityAfterYearFour_04064c65-fa18-4f83-82c7-61ff971bc886" xlink:href="agm-20240331.xsd#agm_LongTermDebtWithInterestRateResetMaturityAfterYearFour"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentLineItems_b8aae328-4b03-4b55-ad9e-4f3196cab202" xlink:to="loc_agm_LongTermDebtWithInterestRateResetMaturityAfterYearFour_04064c65-fa18-4f83-82c7-61ff971bc886" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_LongTermDebtWithInterestRateReset_302f3eb6-9b3e-4cb4-bd92-b15a3436ff18" xlink:href="agm-20240331.xsd#agm_LongTermDebtWithInterestRateReset"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentLineItems_b8aae328-4b03-4b55-ad9e-4f3196cab202" xlink:to="loc_agm_LongTermDebtWithInterestRateReset_302f3eb6-9b3e-4cb4-bd92-b15a3436ff18" xlink:type="arc" order="6"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShortTermDebtWeightedAverageInterestRate_8e59ec91-339e-44b3-9489-0fc93a1fbc87" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ShortTermDebtWeightedAverageInterestRate"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentLineItems_b8aae328-4b03-4b55-ad9e-4f3196cab202" xlink:to="loc_us-gaap_ShortTermDebtWeightedAverageInterestRate_8e59ec91-339e-44b3-9489-0fc93a1fbc87" xlink:type="arc" order="7"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongtermDebtWeightedAverageInterestRate_3ec893f0-829b-4e38-ad1a-bfd3e7ce31e9" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LongtermDebtWeightedAverageInterestRate"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentLineItems_b8aae328-4b03-4b55-ad9e-4f3196cab202" xlink:to="loc_us-gaap_LongtermDebtWeightedAverageInterestRate_3ec893f0-829b-4e38-ad1a-bfd3e7ce31e9" xlink:type="arc" order="8"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtWeightedAverageInterestRate_d16463a4-3bc2-4140-9e8d-988c8b330767" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtWeightedAverageInterestRate"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentLineItems_b8aae328-4b03-4b55-ad9e-4f3196cab202" xlink:to="loc_us-gaap_DebtWeightedAverageInterestRate_d16463a4-3bc2-4140-9e8d-988c8b330767" xlink:type="arc" order="9"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.farmermac.com/role/EQUITYDetails" xlink:type="simple" xlink:href="agm-20240331.xsd#EQUITYDetails"/>
  <link:definitionLink xlink:role="http://www.farmermac.com/role/EQUITYDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ClassOfStockLineItems_560a9706-3297-453f-acc8-81c214db60dc" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ClassOfStockLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ScheduleOfStockByClassTable_0cbd9881-b0c9-4c38-a32d-61fc11e21a60" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ScheduleOfStockByClassTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_ClassOfStockLineItems_560a9706-3297-453f-acc8-81c214db60dc" xlink:to="loc_us-gaap_ScheduleOfStockByClassTable_0cbd9881-b0c9-4c38-a32d-61fc11e21a60" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StatementClassOfStockAxis_40a6172c-fe2a-493e-87d0-262bc1c1325b" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_StatementClassOfStockAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfStockByClassTable_0cbd9881-b0c9-4c38-a32d-61fc11e21a60" xlink:to="loc_us-gaap_StatementClassOfStockAxis_40a6172c-fe2a-493e-87d0-262bc1c1325b" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ClassOfStockDomain_40a6172c-fe2a-493e-87d0-262bc1c1325b_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ClassOfStockDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementClassOfStockAxis_40a6172c-fe2a-493e-87d0-262bc1c1325b" xlink:to="loc_us-gaap_ClassOfStockDomain_40a6172c-fe2a-493e-87d0-262bc1c1325b_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ClassOfStockDomain_bfb9685a-b93a-4b3b-b29f-8a40b8a2463a" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ClassOfStockDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementClassOfStockAxis_40a6172c-fe2a-493e-87d0-262bc1c1325b" xlink:to="loc_us-gaap_ClassOfStockDomain_bfb9685a-b93a-4b3b-b29f-8a40b8a2463a" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CommonClassCMember_ab9f6f1f-3382-4f53-8154-54be334899c0" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_CommonClassCMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockDomain_bfb9685a-b93a-4b3b-b29f-8a40b8a2463a" xlink:to="loc_us-gaap_CommonClassCMember_ab9f6f1f-3382-4f53-8154-54be334899c0" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CommonStockDividendsPerShareCashPaid_793ce2a2-3dd1-41a1-ae45-b0ff013dbca3" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_CommonStockDividendsPerShareCashPaid"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockLineItems_560a9706-3297-453f-acc8-81c214db60dc" xlink:to="loc_us-gaap_CommonStockDividendsPerShareCashPaid_793ce2a2-3dd1-41a1-ae45-b0ff013dbca3" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StockRepurchaseProgramRemainingAuthorizedRepurchaseAmount1_1c61f602-8d28-4a6f-80b7-12399e23a6b6" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_StockRepurchaseProgramRemainingAuthorizedRepurchaseAmount1"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockLineItems_560a9706-3297-453f-acc8-81c214db60dc" xlink:to="loc_us-gaap_StockRepurchaseProgramRemainingAuthorizedRepurchaseAmount1_1c61f602-8d28-4a6f-80b7-12399e23a6b6" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StockRepurchasedDuringPeriodShares_a62f9884-2338-41e5-a51f-402e28c2c833" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_StockRepurchasedDuringPeriodShares"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockLineItems_560a9706-3297-453f-acc8-81c214db60dc" xlink:to="loc_us-gaap_StockRepurchasedDuringPeriodShares_a62f9884-2338-41e5-a51f-402e28c2c833" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StockRepurchasedDuringPeriodValue_3ab854d0-cbca-4123-92f1-69c2ae96370c" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_StockRepurchasedDuringPeriodValue"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockLineItems_560a9706-3297-453f-acc8-81c214db60dc" xlink:to="loc_us-gaap_StockRepurchasedDuringPeriodValue_3ab854d0-cbca-4123-92f1-69c2ae96370c" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CapitalRequiredForCapitalAdequacy_2b34115e-6d03-43e3-aae5-e5a2f21e4b4e" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_CapitalRequiredForCapitalAdequacy"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockLineItems_560a9706-3297-453f-acc8-81c214db60dc" xlink:to="loc_us-gaap_CapitalRequiredForCapitalAdequacy_2b34115e-6d03-43e3-aae5-e5a2f21e4b4e" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Capital_e88a9d39-e41b-4391-8aa4-d738e36dae61" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_Capital"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockLineItems_560a9706-3297-453f-acc8-81c214db60dc" xlink:to="loc_us-gaap_Capital_e88a9d39-e41b-4391-8aa4-d738e36dae61" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ExcessCapital_9c5903de-dac6-40fe-bade-dfc479a568d4" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ExcessCapital"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockLineItems_560a9706-3297-453f-acc8-81c214db60dc" xlink:to="loc_us-gaap_ExcessCapital_9c5903de-dac6-40fe-bade-dfc479a568d4" xlink:type="arc" order="6"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.farmermac.com/role/FAIRVALUEDISCLOSURESScheduleofFairValueMeasurementsDetails" xlink:type="simple" xlink:href="agm-20240331.xsd#FAIRVALUEDISCLOSURESScheduleofFairValueMeasurementsDetails"/>
  <link:definitionLink xlink:role="http://www.farmermac.com/role/FAIRVALUEDISCLOSURESScheduleofFairValueMeasurementsDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisLineItems_a7b54309-2683-419d-9b13-db0203a5ab17" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisTable_5ff54d74-e79a-4c55-8f6e-e0a6f3f8bd34" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisLineItems_a7b54309-2683-419d-9b13-db0203a5ab17" xlink:to="loc_us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisTable_5ff54d74-e79a-4c55-8f6e-e0a6f3f8bd34" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_ProductOrServiceAxis_635e640e-50a5-438f-bd22-5787dd401b7e" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_ProductOrServiceAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisTable_5ff54d74-e79a-4c55-8f6e-e0a6f3f8bd34" xlink:to="loc_srt_ProductOrServiceAxis_635e640e-50a5-438f-bd22-5787dd401b7e" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_ProductsAndServicesDomain_635e640e-50a5-438f-bd22-5787dd401b7e_default" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_ProductsAndServicesDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_srt_ProductOrServiceAxis_635e640e-50a5-438f-bd22-5787dd401b7e" xlink:to="loc_srt_ProductsAndServicesDomain_635e640e-50a5-438f-bd22-5787dd401b7e_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_ProductsAndServicesDomain_9505c1a6-3bc5-450d-a821-82ef18934401" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_ProductsAndServicesDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_srt_ProductOrServiceAxis_635e640e-50a5-438f-bd22-5787dd401b7e" xlink:to="loc_srt_ProductsAndServicesDomain_9505c1a6-3bc5-450d-a821-82ef18934401" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_FloatingInterestRateMember_57a6b290-8575-4f1e-8966-59106110765e" xlink:href="agm-20240331.xsd#agm_FloatingInterestRateMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_ProductsAndServicesDomain_9505c1a6-3bc5-450d-a821-82ef18934401" xlink:to="loc_agm_FloatingInterestRateMember_57a6b290-8575-4f1e-8966-59106110765e" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_FixedInterestRateMember_d3091428-82d0-478d-a2e2-747a73e5eeff" xlink:href="agm-20240331.xsd#agm_FixedInterestRateMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_ProductsAndServicesDomain_9505c1a6-3bc5-450d-a821-82ef18934401" xlink:to="loc_agm_FixedInterestRateMember_d3091428-82d0-478d-a2e2-747a73e5eeff" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StatementBusinessSegmentsAxis_fd95f7f4-05bc-440c-b964-14e00cd7cd89" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_StatementBusinessSegmentsAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisTable_5ff54d74-e79a-4c55-8f6e-e0a6f3f8bd34" xlink:to="loc_us-gaap_StatementBusinessSegmentsAxis_fd95f7f4-05bc-440c-b964-14e00cd7cd89" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SegmentDomain_fd95f7f4-05bc-440c-b964-14e00cd7cd89_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SegmentDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementBusinessSegmentsAxis_fd95f7f4-05bc-440c-b964-14e00cd7cd89" xlink:to="loc_us-gaap_SegmentDomain_fd95f7f4-05bc-440c-b964-14e00cd7cd89_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SegmentDomain_d68d4a53-65b9-4c6f-a667-331d471cba7d" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SegmentDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementBusinessSegmentsAxis_fd95f7f4-05bc-440c-b964-14e00cd7cd89" xlink:to="loc_us-gaap_SegmentDomain_d68d4a53-65b9-4c6f-a667-331d471cba7d" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_InstitutionalCreditMember_a6a5f0a5-1c6c-4453-90da-6fbd522e723b" xlink:href="agm-20240331.xsd#agm_InstitutionalCreditMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_d68d4a53-65b9-4c6f-a667-331d471cba7d" xlink:to="loc_agm_InstitutionalCreditMember_a6a5f0a5-1c6c-4453-90da-6fbd522e723b" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_FarmerMacGuaranteedSecuritiesMember_0973cb95-96e2-4a63-82d8-000a159e9daf" xlink:href="agm-20240331.xsd#agm_FarmerMacGuaranteedSecuritiesMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_d68d4a53-65b9-4c6f-a667-331d471cba7d" xlink:to="loc_agm_FarmerMacGuaranteedSecuritiesMember_0973cb95-96e2-4a63-82d8-000a159e9daf" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_USDAGuaranteesMember_7dbfd776-4c57-436f-88d1-56a675f139b3" xlink:href="agm-20240331.xsd#agm_USDAGuaranteesMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_d68d4a53-65b9-4c6f-a667-331d471cba7d" xlink:to="loc_agm_USDAGuaranteesMember_7dbfd776-4c57-436f-88d1-56a675f139b3" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FairValueByMeasurementFrequencyAxis_b837eb14-06ef-4e36-93c8-885841d4540a" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FairValueByMeasurementFrequencyAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisTable_5ff54d74-e79a-4c55-8f6e-e0a6f3f8bd34" xlink:to="loc_us-gaap_FairValueByMeasurementFrequencyAxis_b837eb14-06ef-4e36-93c8-885841d4540a" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FairValueMeasurementFrequencyDomain_b837eb14-06ef-4e36-93c8-885841d4540a_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FairValueMeasurementFrequencyDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_FairValueByMeasurementFrequencyAxis_b837eb14-06ef-4e36-93c8-885841d4540a" xlink:to="loc_us-gaap_FairValueMeasurementFrequencyDomain_b837eb14-06ef-4e36-93c8-885841d4540a_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FairValueMeasurementFrequencyDomain_694e71ec-c00d-4997-8294-d2bfb01084e1" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FairValueMeasurementFrequencyDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_FairValueByMeasurementFrequencyAxis_b837eb14-06ef-4e36-93c8-885841d4540a" xlink:to="loc_us-gaap_FairValueMeasurementFrequencyDomain_694e71ec-c00d-4997-8294-d2bfb01084e1" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FairValueMeasurementsRecurringMember_76feee0b-2639-4c2d-a16e-2af624b25837" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FairValueMeasurementsRecurringMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueMeasurementFrequencyDomain_694e71ec-c00d-4997-8294-d2bfb01084e1" xlink:to="loc_us-gaap_FairValueMeasurementsRecurringMember_76feee0b-2639-4c2d-a16e-2af624b25837" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FairValueByFairValueHierarchyLevelAxis_18a76287-8933-4d8c-ae14-6924f5dbbeec" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FairValueByFairValueHierarchyLevelAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisTable_5ff54d74-e79a-4c55-8f6e-e0a6f3f8bd34" xlink:to="loc_us-gaap_FairValueByFairValueHierarchyLevelAxis_18a76287-8933-4d8c-ae14-6924f5dbbeec" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FairValueMeasurementsFairValueHierarchyDomain_18a76287-8933-4d8c-ae14-6924f5dbbeec_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FairValueMeasurementsFairValueHierarchyDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_FairValueByFairValueHierarchyLevelAxis_18a76287-8933-4d8c-ae14-6924f5dbbeec" xlink:to="loc_us-gaap_FairValueMeasurementsFairValueHierarchyDomain_18a76287-8933-4d8c-ae14-6924f5dbbeec_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FairValueMeasurementsFairValueHierarchyDomain_4611feec-1ccb-4868-8e2f-4c0b34b8f03a" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FairValueMeasurementsFairValueHierarchyDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_FairValueByFairValueHierarchyLevelAxis_18a76287-8933-4d8c-ae14-6924f5dbbeec" xlink:to="loc_us-gaap_FairValueMeasurementsFairValueHierarchyDomain_4611feec-1ccb-4868-8e2f-4c0b34b8f03a" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FairValueInputsLevel1Member_7cd304bc-35f4-41ce-acdb-0a14e505f81a" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FairValueInputsLevel1Member"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueMeasurementsFairValueHierarchyDomain_4611feec-1ccb-4868-8e2f-4c0b34b8f03a" xlink:to="loc_us-gaap_FairValueInputsLevel1Member_7cd304bc-35f4-41ce-acdb-0a14e505f81a" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FairValueInputsLevel2Member_9258b50c-9bd2-46f1-9297-ea3b17208f81" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FairValueInputsLevel2Member"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueMeasurementsFairValueHierarchyDomain_4611feec-1ccb-4868-8e2f-4c0b34b8f03a" xlink:to="loc_us-gaap_FairValueInputsLevel2Member_9258b50c-9bd2-46f1-9297-ea3b17208f81" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FairValueInputsLevel3Member_9208e137-d3c5-417e-b10e-346cc0320370" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FairValueInputsLevel3Member"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueMeasurementsFairValueHierarchyDomain_4611feec-1ccb-4868-8e2f-4c0b34b8f03a" xlink:to="loc_us-gaap_FairValueInputsLevel3Member_9208e137-d3c5-417e-b10e-346cc0320370" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinancialInstrumentAxis_9e96ea21-d6b8-48e7-a042-50642d87fd50" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FinancialInstrumentAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisTable_5ff54d74-e79a-4c55-8f6e-e0a6f3f8bd34" xlink:to="loc_us-gaap_FinancialInstrumentAxis_9e96ea21-d6b8-48e7-a042-50642d87fd50" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_9e96ea21-d6b8-48e7-a042-50642d87fd50_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_FinancialInstrumentAxis_9e96ea21-d6b8-48e7-a042-50642d87fd50" xlink:to="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_9e96ea21-d6b8-48e7-a042-50642d87fd50_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_328d5469-ccd8-4b58-8159-b7a3ade273bc" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_FinancialInstrumentAxis_9e96ea21-d6b8-48e7-a042-50642d87fd50" xlink:to="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_328d5469-ccd8-4b58-8159-b7a3ade273bc" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesMember_9b8098d9-09c0-4769-9490-3acc407a9d13" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtSecuritiesMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_328d5469-ccd8-4b58-8159-b7a3ade273bc" xlink:to="loc_us-gaap_DebtSecuritiesMember_9b8098d9-09c0-4769-9490-3acc407a9d13" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AuctionRateSecuritiesMember_8fc0907b-b195-4f36-b68d-b513c220909e" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AuctionRateSecuritiesMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtSecuritiesMember_9b8098d9-09c0-4769-9490-3acc407a9d13" xlink:to="loc_us-gaap_AuctionRateSecuritiesMember_8fc0907b-b195-4f36-b68d-b513c220909e" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_MortgageBackedSecuritiesMember_687f06e4-2f6d-4b84-b263-1305031ee09a" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_MortgageBackedSecuritiesMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtSecuritiesMember_9b8098d9-09c0-4769-9490-3acc407a9d13" xlink:to="loc_us-gaap_MortgageBackedSecuritiesMember_687f06e4-2f6d-4b84-b263-1305031ee09a" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_UsTreasuryUstInterestRateMember_f943bb67-07cd-4595-aed1-ceeb15654d80" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_UsTreasuryUstInterestRateMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtSecuritiesMember_9b8098d9-09c0-4769-9490-3acc407a9d13" xlink:to="loc_us-gaap_UsTreasuryUstInterestRateMember_f943bb67-07cd-4595-aed1-ceeb15654d80" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_USTreasurySecuritiesMember_7b03f595-43b1-4d6e-893f-cf4ccdebd04f" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_USTreasurySecuritiesMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtSecuritiesMember_9b8098d9-09c0-4769-9490-3acc407a9d13" xlink:to="loc_us-gaap_USTreasurySecuritiesMember_7b03f595-43b1-4d6e-893f-cf4ccdebd04f" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_USGovernmentSponsoredEnterprisesDebtSecuritiesMember_c1bbe17a-cf99-4ffe-92c9-9a82b6b74a8f" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_USGovernmentSponsoredEnterprisesDebtSecuritiesMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_328d5469-ccd8-4b58-8159-b7a3ade273bc" xlink:to="loc_us-gaap_USGovernmentSponsoredEnterprisesDebtSecuritiesMember_c1bbe17a-cf99-4ffe-92c9-9a82b6b74a8f" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FairValueByAssetClassAxis_8a408c7d-8b4d-4415-881c-f534d29d0f79" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FairValueByAssetClassAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisTable_5ff54d74-e79a-4c55-8f6e-e0a6f3f8bd34" xlink:to="loc_us-gaap_FairValueByAssetClassAxis_8a408c7d-8b4d-4415-881c-f534d29d0f79" xlink:type="arc" order="6"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FairValueAssetsMeasuredOnRecurringBasisUnobservableInputReconciliationByAssetClassDomain_8a408c7d-8b4d-4415-881c-f534d29d0f79_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FairValueAssetsMeasuredOnRecurringBasisUnobservableInputReconciliationByAssetClassDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_FairValueByAssetClassAxis_8a408c7d-8b4d-4415-881c-f534d29d0f79" xlink:to="loc_us-gaap_FairValueAssetsMeasuredOnRecurringBasisUnobservableInputReconciliationByAssetClassDomain_8a408c7d-8b4d-4415-881c-f534d29d0f79_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FairValueAssetsMeasuredOnRecurringBasisUnobservableInputReconciliationByAssetClassDomain_cd1b6def-83ae-4156-a34d-636ae38e2475" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FairValueAssetsMeasuredOnRecurringBasisUnobservableInputReconciliationByAssetClassDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_FairValueByAssetClassAxis_8a408c7d-8b4d-4415-881c-f534d29d0f79" xlink:to="loc_us-gaap_FairValueAssetsMeasuredOnRecurringBasisUnobservableInputReconciliationByAssetClassDomain_cd1b6def-83ae-4156-a34d-636ae38e2475" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_USGovernmentAgenciesDebtSecuritiesMember_d2e28ff1-0ff9-4911-baeb-f7c5c5921e32" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_USGovernmentAgenciesDebtSecuritiesMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueAssetsMeasuredOnRecurringBasisUnobservableInputReconciliationByAssetClassDomain_cd1b6def-83ae-4156-a34d-636ae38e2475" xlink:to="loc_us-gaap_USGovernmentAgenciesDebtSecuritiesMember_d2e28ff1-0ff9-4911-baeb-f7c5c5921e32" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AssetsFairValueDisclosureAbstract_c8f70fcc-1c25-42e6-8d8c-2e833cef680b" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AssetsFairValueDisclosureAbstract"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisLineItems_a7b54309-2683-419d-9b13-db0203a5ab17" xlink:to="loc_us-gaap_AssetsFairValueDisclosureAbstract_c8f70fcc-1c25-42e6-8d8c-2e833cef680b" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleExcludingAccruedInterest_3f8275ac-d543-4328-bbe0-e48b61383fe7" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtSecuritiesAvailableForSaleExcludingAccruedInterest"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AssetsFairValueDisclosureAbstract_c8f70fcc-1c25-42e6-8d8c-2e833cef680b" xlink:to="loc_us-gaap_DebtSecuritiesAvailableForSaleExcludingAccruedInterest_3f8275ac-d543-4328-bbe0-e48b61383fe7" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TradingSecuritiesDebt_f19e5b4c-37cd-4414-ac90-f5f92fe61ed8" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_TradingSecuritiesDebt"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AssetsFairValueDisclosureAbstract_c8f70fcc-1c25-42e6-8d8c-2e833cef680b" xlink:to="loc_us-gaap_TradingSecuritiesDebt_f19e5b4c-37cd-4414-ac90-f5f92fe61ed8" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeAssets_9e3ce21b-0005-482c-b00b-d6b6fef1b3bd" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DerivativeAssets"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AssetsFairValueDisclosureAbstract_c8f70fcc-1c25-42e6-8d8c-2e833cef680b" xlink:to="loc_us-gaap_DerivativeAssets_9e3ce21b-0005-482c-b00b-d6b6fef1b3bd" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_GuaranteeAsset_4080cc69-df6c-4f2d-a5b5-3c7d9cfedd6e" xlink:href="agm-20240331.xsd#agm_GuaranteeAsset"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AssetsFairValueDisclosureAbstract_c8f70fcc-1c25-42e6-8d8c-2e833cef680b" xlink:to="loc_agm_GuaranteeAsset_4080cc69-df6c-4f2d-a5b5-3c7d9cfedd6e" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AssetsFairValueDisclosure_918c5728-1da6-467c-9727-0db883c6ba68" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AssetsFairValueDisclosure"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AssetsFairValueDisclosureAbstract_c8f70fcc-1c25-42e6-8d8c-2e833cef680b" xlink:to="loc_us-gaap_AssetsFairValueDisclosure_918c5728-1da6-467c-9727-0db883c6ba68" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LiabilitiesFairValueDisclosureAbstract_a755f3e2-fbe5-46d3-8244-c12d4aaf3910" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LiabilitiesFairValueDisclosureAbstract"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisLineItems_a7b54309-2683-419d-9b13-db0203a5ab17" xlink:to="loc_us-gaap_LiabilitiesFairValueDisclosureAbstract_a755f3e2-fbe5-46d3-8244-c12d4aaf3910" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeLiabilities_3964c7a7-8038-4aaa-b8e2-e846d4770f88" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DerivativeLiabilities"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LiabilitiesFairValueDisclosureAbstract_a755f3e2-fbe5-46d3-8244-c12d4aaf3910" xlink:to="loc_us-gaap_DerivativeLiabilities_3964c7a7-8038-4aaa-b8e2-e846d4770f88" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LiabilitiesFairValueDisclosure_405d8858-f73b-47e5-905c-412f40140c4e" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LiabilitiesFairValueDisclosure"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LiabilitiesFairValueDisclosureAbstract_a755f3e2-fbe5-46d3-8244-c12d4aaf3910" xlink:to="loc_us-gaap_LiabilitiesFairValueDisclosure_405d8858-f73b-47e5-905c-412f40140c4e" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_FairValueAssetsAndLiabilitiesFairValueAsPercentOfTotalAssets_2dd27be5-dfcb-4126-887c-9fe42e043087" xlink:href="agm-20240331.xsd#agm_FairValueAssetsAndLiabilitiesFairValueAsPercentOfTotalAssets"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisLineItems_a7b54309-2683-419d-9b13-db0203a5ab17" xlink:to="loc_agm_FairValueAssetsAndLiabilitiesFairValueAsPercentOfTotalAssets_2dd27be5-dfcb-4126-887c-9fe42e043087" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_FairValueAssetsAndLiabilitiesFairValueAsPercentOfTotalFinancialInstrumentsMeasuredAtFairValue_2e4cfc97-13e6-43c9-9add-3957f564543d" xlink:href="agm-20240331.xsd#agm_FairValueAssetsAndLiabilitiesFairValueAsPercentOfTotalFinancialInstrumentsMeasuredAtFairValue"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisLineItems_a7b54309-2683-419d-9b13-db0203a5ab17" xlink:to="loc_agm_FairValueAssetsAndLiabilitiesFairValueAsPercentOfTotalFinancialInstrumentsMeasuredAtFairValue_2e4cfc97-13e6-43c9-9add-3957f564543d" xlink:type="arc" order="3"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.farmermac.com/role/FAIRVALUEDISCLOSURESScheduleofUnobservableInputReconciliationDetails" xlink:type="simple" xlink:href="agm-20240331.xsd#FAIRVALUEDISCLOSURESScheduleofUnobservableInputReconciliationDetails"/>
  <link:definitionLink xlink:role="http://www.farmermac.com/role/FAIRVALUEDISCLOSURESScheduleofUnobservableInputReconciliationDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FairValueAssetsMeasuredOnRecurringBasisUnobservableInputReconciliationLineItems_5e3d8148-97b9-416d-a598-c013c6184495" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FairValueAssetsMeasuredOnRecurringBasisUnobservableInputReconciliationLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FairValueAssetsMeasuredOnRecurringBasisUnobservableInputReconciliationTable_19bc2d49-8148-48a0-8fae-22a67811e2ac" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FairValueAssetsMeasuredOnRecurringBasisUnobservableInputReconciliationTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_FairValueAssetsMeasuredOnRecurringBasisUnobservableInputReconciliationLineItems_5e3d8148-97b9-416d-a598-c013c6184495" xlink:to="loc_us-gaap_FairValueAssetsMeasuredOnRecurringBasisUnobservableInputReconciliationTable_19bc2d49-8148-48a0-8fae-22a67811e2ac" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FairValueByAssetClassAxis_8c8475a5-da15-45a7-a2f1-9269721a4ec3" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FairValueByAssetClassAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_FairValueAssetsMeasuredOnRecurringBasisUnobservableInputReconciliationTable_19bc2d49-8148-48a0-8fae-22a67811e2ac" xlink:to="loc_us-gaap_FairValueByAssetClassAxis_8c8475a5-da15-45a7-a2f1-9269721a4ec3" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FairValueAssetsMeasuredOnRecurringBasisUnobservableInputReconciliationByAssetClassDomain_8c8475a5-da15-45a7-a2f1-9269721a4ec3_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FairValueAssetsMeasuredOnRecurringBasisUnobservableInputReconciliationByAssetClassDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_FairValueByAssetClassAxis_8c8475a5-da15-45a7-a2f1-9269721a4ec3" xlink:to="loc_us-gaap_FairValueAssetsMeasuredOnRecurringBasisUnobservableInputReconciliationByAssetClassDomain_8c8475a5-da15-45a7-a2f1-9269721a4ec3_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FairValueAssetsMeasuredOnRecurringBasisUnobservableInputReconciliationByAssetClassDomain_206f693b-4a4e-4ff7-8381-9d1618dc2b58" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FairValueAssetsMeasuredOnRecurringBasisUnobservableInputReconciliationByAssetClassDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_FairValueByAssetClassAxis_8c8475a5-da15-45a7-a2f1-9269721a4ec3" xlink:to="loc_us-gaap_FairValueAssetsMeasuredOnRecurringBasisUnobservableInputReconciliationByAssetClassDomain_206f693b-4a4e-4ff7-8381-9d1618dc2b58" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesMember_b07988ec-6e7a-44c8-92a2-c56b65f58d72" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtSecuritiesMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueAssetsMeasuredOnRecurringBasisUnobservableInputReconciliationByAssetClassDomain_206f693b-4a4e-4ff7-8381-9d1618dc2b58" xlink:to="loc_us-gaap_DebtSecuritiesMember_b07988ec-6e7a-44c8-92a2-c56b65f58d72" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AuctionRateSecuritiesMember_b0993b44-3958-423d-a2e2-396a3dc54f66" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AuctionRateSecuritiesMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtSecuritiesMember_b07988ec-6e7a-44c8-92a2-c56b65f58d72" xlink:to="loc_us-gaap_AuctionRateSecuritiesMember_b0993b44-3958-423d-a2e2-396a3dc54f66" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_USGovernmentSponsoredEnterprisesDebtSecuritiesMember_197b0a73-e8e1-4c93-8ee4-263f6750ec55" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_USGovernmentSponsoredEnterprisesDebtSecuritiesMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueAssetsMeasuredOnRecurringBasisUnobservableInputReconciliationByAssetClassDomain_206f693b-4a4e-4ff7-8381-9d1618dc2b58" xlink:to="loc_us-gaap_USGovernmentSponsoredEnterprisesDebtSecuritiesMember_197b0a73-e8e1-4c93-8ee4-263f6750ec55" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_USGovernmentAgenciesDebtSecuritiesMember_551b5720-bc08-4238-a1c1-8f38314520c5" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_USGovernmentAgenciesDebtSecuritiesMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueAssetsMeasuredOnRecurringBasisUnobservableInputReconciliationByAssetClassDomain_206f693b-4a4e-4ff7-8381-9d1618dc2b58" xlink:to="loc_us-gaap_USGovernmentAgenciesDebtSecuritiesMember_551b5720-bc08-4238-a1c1-8f38314520c5" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_GuaranteeAndCommitmentObligationsMember_b151cd2e-87a3-4f2f-a606-372eb2113f2a" xlink:href="agm-20240331.xsd#agm_GuaranteeAndCommitmentObligationsMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueAssetsMeasuredOnRecurringBasisUnobservableInputReconciliationByAssetClassDomain_206f693b-4a4e-4ff7-8381-9d1618dc2b58" xlink:to="loc_agm_GuaranteeAndCommitmentObligationsMember_b151cd2e-87a3-4f2f-a606-372eb2113f2a" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_ProductOrServiceAxis_174d4f1a-f735-4b4d-b2a4-bbdce48f96d2" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_ProductOrServiceAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_FairValueAssetsMeasuredOnRecurringBasisUnobservableInputReconciliationTable_19bc2d49-8148-48a0-8fae-22a67811e2ac" xlink:to="loc_srt_ProductOrServiceAxis_174d4f1a-f735-4b4d-b2a4-bbdce48f96d2" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_ProductsAndServicesDomain_174d4f1a-f735-4b4d-b2a4-bbdce48f96d2_default" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_ProductsAndServicesDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_srt_ProductOrServiceAxis_174d4f1a-f735-4b4d-b2a4-bbdce48f96d2" xlink:to="loc_srt_ProductsAndServicesDomain_174d4f1a-f735-4b4d-b2a4-bbdce48f96d2_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_ProductsAndServicesDomain_b3d99790-50d9-497c-b44f-6ea074e6c0c8" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_ProductsAndServicesDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_srt_ProductOrServiceAxis_174d4f1a-f735-4b4d-b2a4-bbdce48f96d2" xlink:to="loc_srt_ProductsAndServicesDomain_b3d99790-50d9-497c-b44f-6ea074e6c0c8" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_FloatingInterestRateMember_039bd8c6-07df-420a-aa58-9266e596d210" xlink:href="agm-20240331.xsd#agm_FloatingInterestRateMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_ProductsAndServicesDomain_b3d99790-50d9-497c-b44f-6ea074e6c0c8" xlink:to="loc_agm_FloatingInterestRateMember_039bd8c6-07df-420a-aa58-9266e596d210" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FairValueByFairValueHierarchyLevelAxis_5a2197d3-1514-4cc6-8c83-3e29ad0a495e" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FairValueByFairValueHierarchyLevelAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_FairValueAssetsMeasuredOnRecurringBasisUnobservableInputReconciliationTable_19bc2d49-8148-48a0-8fae-22a67811e2ac" xlink:to="loc_us-gaap_FairValueByFairValueHierarchyLevelAxis_5a2197d3-1514-4cc6-8c83-3e29ad0a495e" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FairValueMeasurementsFairValueHierarchyDomain_5a2197d3-1514-4cc6-8c83-3e29ad0a495e_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FairValueMeasurementsFairValueHierarchyDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_FairValueByFairValueHierarchyLevelAxis_5a2197d3-1514-4cc6-8c83-3e29ad0a495e" xlink:to="loc_us-gaap_FairValueMeasurementsFairValueHierarchyDomain_5a2197d3-1514-4cc6-8c83-3e29ad0a495e_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FairValueMeasurementsFairValueHierarchyDomain_09546dde-3628-4e49-81a4-aa9a2d23a536" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FairValueMeasurementsFairValueHierarchyDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_FairValueByFairValueHierarchyLevelAxis_5a2197d3-1514-4cc6-8c83-3e29ad0a495e" xlink:to="loc_us-gaap_FairValueMeasurementsFairValueHierarchyDomain_09546dde-3628-4e49-81a4-aa9a2d23a536" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FairValueInputsLevel3Member_b3906f28-96ee-466d-82c2-b771baacf7c5" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FairValueInputsLevel3Member"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueMeasurementsFairValueHierarchyDomain_09546dde-3628-4e49-81a4-aa9a2d23a536" xlink:to="loc_us-gaap_FairValueInputsLevel3Member_b3906f28-96ee-466d-82c2-b771baacf7c5" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FairValueByMeasurementFrequencyAxis_a900f576-27e8-47bc-96c3-65a6ee722e14" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FairValueByMeasurementFrequencyAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_FairValueAssetsMeasuredOnRecurringBasisUnobservableInputReconciliationTable_19bc2d49-8148-48a0-8fae-22a67811e2ac" xlink:to="loc_us-gaap_FairValueByMeasurementFrequencyAxis_a900f576-27e8-47bc-96c3-65a6ee722e14" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FairValueMeasurementFrequencyDomain_a900f576-27e8-47bc-96c3-65a6ee722e14_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FairValueMeasurementFrequencyDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_FairValueByMeasurementFrequencyAxis_a900f576-27e8-47bc-96c3-65a6ee722e14" xlink:to="loc_us-gaap_FairValueMeasurementFrequencyDomain_a900f576-27e8-47bc-96c3-65a6ee722e14_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FairValueMeasurementFrequencyDomain_21f371ea-2129-42e2-bd35-5daef95bd75f" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FairValueMeasurementFrequencyDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_FairValueByMeasurementFrequencyAxis_a900f576-27e8-47bc-96c3-65a6ee722e14" xlink:to="loc_us-gaap_FairValueMeasurementFrequencyDomain_21f371ea-2129-42e2-bd35-5daef95bd75f" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FairValueMeasurementsRecurringMember_6d65ac6d-d236-40dd-b1a8-1c8499259019" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FairValueMeasurementsRecurringMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueMeasurementFrequencyDomain_21f371ea-2129-42e2-bd35-5daef95bd75f" xlink:to="loc_us-gaap_FairValueMeasurementsRecurringMember_6d65ac6d-d236-40dd-b1a8-1c8499259019" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StatementBusinessSegmentsAxis_4c22c39c-a09f-4f90-b474-ae69ec7eef9f" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_StatementBusinessSegmentsAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_FairValueAssetsMeasuredOnRecurringBasisUnobservableInputReconciliationTable_19bc2d49-8148-48a0-8fae-22a67811e2ac" xlink:to="loc_us-gaap_StatementBusinessSegmentsAxis_4c22c39c-a09f-4f90-b474-ae69ec7eef9f" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SegmentDomain_4c22c39c-a09f-4f90-b474-ae69ec7eef9f_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SegmentDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementBusinessSegmentsAxis_4c22c39c-a09f-4f90-b474-ae69ec7eef9f" xlink:to="loc_us-gaap_SegmentDomain_4c22c39c-a09f-4f90-b474-ae69ec7eef9f_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SegmentDomain_3ccc0cf2-562f-42d3-b31a-f37e1c9e8974" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SegmentDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementBusinessSegmentsAxis_4c22c39c-a09f-4f90-b474-ae69ec7eef9f" xlink:to="loc_us-gaap_SegmentDomain_3ccc0cf2-562f-42d3-b31a-f37e1c9e8974" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_InstitutionalCreditMember_13950240-4292-49cf-8b8a-d3189b548baf" xlink:href="agm-20240331.xsd#agm_InstitutionalCreditMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_3ccc0cf2-562f-42d3-b31a-f37e1c9e8974" xlink:to="loc_agm_InstitutionalCreditMember_13950240-4292-49cf-8b8a-d3189b548baf" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_FarmerMacGuaranteedSecuritiesMember_00f44b02-5451-4c73-90fa-008072b51a58" xlink:href="agm-20240331.xsd#agm_FarmerMacGuaranteedSecuritiesMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_3ccc0cf2-562f-42d3-b31a-f37e1c9e8974" xlink:to="loc_agm_FarmerMacGuaranteedSecuritiesMember_00f44b02-5451-4c73-90fa-008072b51a58" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_GuaranteeObligationsByNatureAxis_97365a4b-a901-4573-a615-b01af1dc6678" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_GuaranteeObligationsByNatureAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_FairValueAssetsMeasuredOnRecurringBasisUnobservableInputReconciliationTable_19bc2d49-8148-48a0-8fae-22a67811e2ac" xlink:to="loc_us-gaap_GuaranteeObligationsByNatureAxis_97365a4b-a901-4573-a615-b01af1dc6678" xlink:type="arc" order="6"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_GuaranteeObligationsNatureDomain_97365a4b-a901-4573-a615-b01af1dc6678_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_GuaranteeObligationsNatureDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_GuaranteeObligationsByNatureAxis_97365a4b-a901-4573-a615-b01af1dc6678" xlink:to="loc_us-gaap_GuaranteeObligationsNatureDomain_97365a4b-a901-4573-a615-b01af1dc6678_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_GuaranteeObligationsNatureDomain_762d0345-5d25-4ee3-8b0b-9897d584f563" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_GuaranteeObligationsNatureDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_GuaranteeObligationsByNatureAxis_97365a4b-a901-4573-a615-b01af1dc6678" xlink:to="loc_us-gaap_GuaranteeObligationsNatureDomain_762d0345-5d25-4ee3-8b0b-9897d584f563" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_GuaranteeAssetMember_323b6798-7f8d-43a6-af30-38b0b07d9bd0" xlink:href="agm-20240331.xsd#agm_GuaranteeAssetMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_GuaranteeObligationsNatureDomain_762d0345-5d25-4ee3-8b0b-9897d584f563" xlink:to="loc_agm_GuaranteeAssetMember_323b6798-7f8d-43a6-af30-38b0b07d9bd0" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FairValueAssetsMeasuredOnRecurringBasisUnobservableInputReconciliationCalculationRollForward_8336cc32-45a6-4d3e-9f1d-01467b2e5f5b" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FairValueAssetsMeasuredOnRecurringBasisUnobservableInputReconciliationCalculationRollForward"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueAssetsMeasuredOnRecurringBasisUnobservableInputReconciliationLineItems_5e3d8148-97b9-416d-a598-c013c6184495" xlink:to="loc_us-gaap_FairValueAssetsMeasuredOnRecurringBasisUnobservableInputReconciliationCalculationRollForward_8336cc32-45a6-4d3e-9f1d-01467b2e5f5b" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FairValueMeasurementWithUnobservableInputsReconciliationRecurringBasisAssetValue_1d4e25c3-94b8-4d03-87d4-7dde92c10671" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FairValueMeasurementWithUnobservableInputsReconciliationRecurringBasisAssetValue"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueAssetsMeasuredOnRecurringBasisUnobservableInputReconciliationCalculationRollForward_8336cc32-45a6-4d3e-9f1d-01467b2e5f5b" xlink:to="loc_us-gaap_FairValueMeasurementWithUnobservableInputsReconciliationRecurringBasisAssetValue_1d4e25c3-94b8-4d03-87d4-7dde92c10671" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FairValueMeasurementWithUnobservableInputsReconciliationRecurringBasisAssetPurchases_69c04c52-1fdb-4575-a330-cef5a2b43a6c" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FairValueMeasurementWithUnobservableInputsReconciliationRecurringBasisAssetPurchases"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueAssetsMeasuredOnRecurringBasisUnobservableInputReconciliationCalculationRollForward_8336cc32-45a6-4d3e-9f1d-01467b2e5f5b" xlink:to="loc_us-gaap_FairValueMeasurementWithUnobservableInputsReconciliationRecurringBasisAssetPurchases_69c04c52-1fdb-4575-a330-cef5a2b43a6c" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FairValueMeasurementWithUnobservableInputsReconciliationRecurringBasisAssetSettlements_e0dbd07a-dadd-429a-bd71-dfcd63a8b299" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FairValueMeasurementWithUnobservableInputsReconciliationRecurringBasisAssetSettlements"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueAssetsMeasuredOnRecurringBasisUnobservableInputReconciliationCalculationRollForward_8336cc32-45a6-4d3e-9f1d-01467b2e5f5b" xlink:to="loc_us-gaap_FairValueMeasurementWithUnobservableInputsReconciliationRecurringBasisAssetSettlements_e0dbd07a-dadd-429a-bd71-dfcd63a8b299" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_FairValueMeasurementWithUnobservableInputsReconciliationRecurringBasisAssetAllowanceForCreditLoss_815b5532-e82c-44fa-b23f-225e53feb572" xlink:href="agm-20240331.xsd#agm_FairValueMeasurementWithUnobservableInputsReconciliationRecurringBasisAssetAllowanceForCreditLoss"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueAssetsMeasuredOnRecurringBasisUnobservableInputReconciliationCalculationRollForward_8336cc32-45a6-4d3e-9f1d-01467b2e5f5b" xlink:to="loc_agm_FairValueMeasurementWithUnobservableInputsReconciliationRecurringBasisAssetAllowanceForCreditLoss_815b5532-e82c-44fa-b23f-225e53feb572" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FairValueMeasurementWithUnobservableInputsReconciliationRecurringBasisAssetGainLossIncludedInEarnings1_c16ebb6a-7d4b-4ee3-abdc-75e7d851bb12" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FairValueMeasurementWithUnobservableInputsReconciliationRecurringBasisAssetGainLossIncludedInEarnings1"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueAssetsMeasuredOnRecurringBasisUnobservableInputReconciliationCalculationRollForward_8336cc32-45a6-4d3e-9f1d-01467b2e5f5b" xlink:to="loc_us-gaap_FairValueMeasurementWithUnobservableInputsReconciliationRecurringBasisAssetGainLossIncludedInEarnings1_c16ebb6a-7d4b-4ee3-abdc-75e7d851bb12" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FairValueRecurringBasisUnobservableInputReconciliationAssetGainLossStatementOfIncomeExtensibleList_4e27ead6-5356-435e-9dd8-159359bd3a16" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FairValueRecurringBasisUnobservableInputReconciliationAssetGainLossStatementOfIncomeExtensibleList"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueMeasurementWithUnobservableInputsReconciliationRecurringBasisAssetGainLossIncludedInEarnings1_c16ebb6a-7d4b-4ee3-abdc-75e7d851bb12" xlink:to="loc_us-gaap_FairValueRecurringBasisUnobservableInputReconciliationAssetGainLossStatementOfIncomeExtensibleList_4e27ead6-5356-435e-9dd8-159359bd3a16" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FairValueMeasurementWithUnobservableInputsReconciliationRecurringBasisAssetGainLossIncludedInOtherComprehensiveIncomeLoss_a40012bb-bf82-4553-95bc-f28cce227be6" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FairValueMeasurementWithUnobservableInputsReconciliationRecurringBasisAssetGainLossIncludedInOtherComprehensiveIncomeLoss"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueAssetsMeasuredOnRecurringBasisUnobservableInputReconciliationCalculationRollForward_8336cc32-45a6-4d3e-9f1d-01467b2e5f5b" xlink:to="loc_us-gaap_FairValueMeasurementWithUnobservableInputsReconciliationRecurringBasisAssetGainLossIncludedInOtherComprehensiveIncomeLoss_a40012bb-bf82-4553-95bc-f28cce227be6" xlink:type="arc" order="6"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FairValueRecurringBasisUnobservableInputReconciliationAssetGainLossStatementOfOtherComprehensiveIncomeExtensibleList_faf32aeb-db82-4b76-bf63-04fdd80b5c66" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FairValueRecurringBasisUnobservableInputReconciliationAssetGainLossStatementOfOtherComprehensiveIncomeExtensibleList"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueMeasurementWithUnobservableInputsReconciliationRecurringBasisAssetGainLossIncludedInOtherComprehensiveIncomeLoss_a40012bb-bf82-4553-95bc-f28cce227be6" xlink:to="loc_us-gaap_FairValueRecurringBasisUnobservableInputReconciliationAssetGainLossStatementOfOtherComprehensiveIncomeExtensibleList_faf32aeb-db82-4b76-bf63-04fdd80b5c66" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FairValueMeasurementWithUnobservableInputsReconciliationRecurringBasisAssetValue_709cb714-2574-4fd8-be87-a1bb7547bd05" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FairValueMeasurementWithUnobservableInputsReconciliationRecurringBasisAssetValue"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.farmermac.com/role/FAIRVALUEDISCLOSURESQuantitativeInformationDetails" xlink:type="simple" xlink:href="agm-20240331.xsd#FAIRVALUEDISCLOSURESQuantitativeInformationDetails"/>
  <link:definitionLink xlink:role="http://www.farmermac.com/role/FAIRVALUEDISCLOSURESQuantitativeInformationDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisValuationTechniquesLineItems_5f2205cf-7c0b-4f3c-a594-5bd900b98800" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisValuationTechniquesLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisValuationTechniquesTable_3ad99ed4-cdb3-4bac-9706-8ff4a184c6a4" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisValuationTechniquesTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisValuationTechniquesLineItems_5f2205cf-7c0b-4f3c-a594-5bd900b98800" xlink:to="loc_us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisValuationTechniquesTable_3ad99ed4-cdb3-4bac-9706-8ff4a184c6a4" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_MeasurementInputTypeAxis_54005edf-dcb6-4552-b6b2-38bff5c2c710" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_MeasurementInputTypeAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisValuationTechniquesTable_3ad99ed4-cdb3-4bac-9706-8ff4a184c6a4" xlink:to="loc_us-gaap_MeasurementInputTypeAxis_54005edf-dcb6-4552-b6b2-38bff5c2c710" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_MeasurementInputTypeDomain_54005edf-dcb6-4552-b6b2-38bff5c2c710_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_MeasurementInputTypeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_MeasurementInputTypeAxis_54005edf-dcb6-4552-b6b2-38bff5c2c710" xlink:to="loc_us-gaap_MeasurementInputTypeDomain_54005edf-dcb6-4552-b6b2-38bff5c2c710_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_MeasurementInputTypeDomain_776f36df-28f9-4628-93a3-16871027192d" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_MeasurementInputTypeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_MeasurementInputTypeAxis_54005edf-dcb6-4552-b6b2-38bff5c2c710" xlink:to="loc_us-gaap_MeasurementInputTypeDomain_776f36df-28f9-4628-93a3-16871027192d" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_MeasurementInputRangeOfBrokerQuotesMember_be0d49ba-2c74-4a7d-892d-78a6b91f748b" xlink:href="agm-20240331.xsd#agm_MeasurementInputRangeOfBrokerQuotesMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_MeasurementInputTypeDomain_776f36df-28f9-4628-93a3-16871027192d" xlink:to="loc_agm_MeasurementInputRangeOfBrokerQuotesMember_be0d49ba-2c74-4a7d-892d-78a6b91f748b" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_MeasurementInputDiscountRateMember_367fe26f-db9a-4d6a-b486-78ea89ccdaae" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_MeasurementInputDiscountRateMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_MeasurementInputTypeDomain_776f36df-28f9-4628-93a3-16871027192d" xlink:to="loc_us-gaap_MeasurementInputDiscountRateMember_367fe26f-db9a-4d6a-b486-78ea89ccdaae" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_MeasurementInputConstantPrepaymentRateMember_82f19d34-321d-4420-966c-f3e340479bf9" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_MeasurementInputConstantPrepaymentRateMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_MeasurementInputTypeDomain_776f36df-28f9-4628-93a3-16871027192d" xlink:to="loc_us-gaap_MeasurementInputConstantPrepaymentRateMember_82f19d34-321d-4420-966c-f3e340479bf9" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_RangeAxis_f8d51b71-268a-448f-9c51-897736a36a49" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_RangeAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisValuationTechniquesTable_3ad99ed4-cdb3-4bac-9706-8ff4a184c6a4" xlink:to="loc_srt_RangeAxis_f8d51b71-268a-448f-9c51-897736a36a49" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_RangeMember_f8d51b71-268a-448f-9c51-897736a36a49_default" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_RangeMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_srt_RangeAxis_f8d51b71-268a-448f-9c51-897736a36a49" xlink:to="loc_srt_RangeMember_f8d51b71-268a-448f-9c51-897736a36a49_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_RangeMember_3ec8d6e9-cd03-45ff-b83b-82e49ac22f75" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_RangeMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_srt_RangeAxis_f8d51b71-268a-448f-9c51-897736a36a49" xlink:to="loc_srt_RangeMember_3ec8d6e9-cd03-45ff-b83b-82e49ac22f75" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_MinimumMember_de96cb3c-4dbe-41a7-bfb3-ebb73e09240f" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_MinimumMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_RangeMember_3ec8d6e9-cd03-45ff-b83b-82e49ac22f75" xlink:to="loc_srt_MinimumMember_de96cb3c-4dbe-41a7-bfb3-ebb73e09240f" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_MaximumMember_898287dc-ddd9-4fbd-9e9f-342c8b6a6fa9" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_MaximumMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_RangeMember_3ec8d6e9-cd03-45ff-b83b-82e49ac22f75" xlink:to="loc_srt_MaximumMember_898287dc-ddd9-4fbd-9e9f-342c8b6a6fa9" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_WeightedAverageMember_2f02ff8f-9d78-45e9-92b4-9b9b662e1cd3" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_WeightedAverageMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_RangeMember_3ec8d6e9-cd03-45ff-b83b-82e49ac22f75" xlink:to="loc_srt_WeightedAverageMember_2f02ff8f-9d78-45e9-92b4-9b9b662e1cd3" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StatementBusinessSegmentsAxis_780b821f-eb4e-46ee-8317-0cf3789cab3f" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_StatementBusinessSegmentsAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisValuationTechniquesTable_3ad99ed4-cdb3-4bac-9706-8ff4a184c6a4" xlink:to="loc_us-gaap_StatementBusinessSegmentsAxis_780b821f-eb4e-46ee-8317-0cf3789cab3f" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SegmentDomain_780b821f-eb4e-46ee-8317-0cf3789cab3f_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SegmentDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementBusinessSegmentsAxis_780b821f-eb4e-46ee-8317-0cf3789cab3f" xlink:to="loc_us-gaap_SegmentDomain_780b821f-eb4e-46ee-8317-0cf3789cab3f_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SegmentDomain_ed66a8f1-2a78-4e29-9835-1450efdab62c" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SegmentDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementBusinessSegmentsAxis_780b821f-eb4e-46ee-8317-0cf3789cab3f" xlink:to="loc_us-gaap_SegmentDomain_ed66a8f1-2a78-4e29-9835-1450efdab62c" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_InstitutionalCreditMember_f994e1dd-1c0f-4af1-87e0-540aff622387" xlink:href="agm-20240331.xsd#agm_InstitutionalCreditMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_ed66a8f1-2a78-4e29-9835-1450efdab62c" xlink:to="loc_agm_InstitutionalCreditMember_f994e1dd-1c0f-4af1-87e0-540aff622387" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_FarmerMacGuaranteedSecuritiesMember_aca89a4d-869b-4929-986e-1c8973f875f4" xlink:href="agm-20240331.xsd#agm_FarmerMacGuaranteedSecuritiesMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_ed66a8f1-2a78-4e29-9835-1450efdab62c" xlink:to="loc_agm_FarmerMacGuaranteedSecuritiesMember_aca89a4d-869b-4929-986e-1c8973f875f4" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_USDAGuaranteesMember_664a35fd-9758-4c57-95de-010d51ab24b9" xlink:href="agm-20240331.xsd#agm_USDAGuaranteesMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_ed66a8f1-2a78-4e29-9835-1450efdab62c" xlink:to="loc_agm_USDAGuaranteesMember_664a35fd-9758-4c57-95de-010d51ab24b9" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FairValueByAssetClassAxis_124b95cd-7adf-4c25-b34e-f6f2672becd1" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FairValueByAssetClassAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisValuationTechniquesTable_3ad99ed4-cdb3-4bac-9706-8ff4a184c6a4" xlink:to="loc_us-gaap_FairValueByAssetClassAxis_124b95cd-7adf-4c25-b34e-f6f2672becd1" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FairValueAssetsMeasuredOnRecurringBasisUnobservableInputReconciliationByAssetClassDomain_124b95cd-7adf-4c25-b34e-f6f2672becd1_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FairValueAssetsMeasuredOnRecurringBasisUnobservableInputReconciliationByAssetClassDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_FairValueByAssetClassAxis_124b95cd-7adf-4c25-b34e-f6f2672becd1" xlink:to="loc_us-gaap_FairValueAssetsMeasuredOnRecurringBasisUnobservableInputReconciliationByAssetClassDomain_124b95cd-7adf-4c25-b34e-f6f2672becd1_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FairValueAssetsMeasuredOnRecurringBasisUnobservableInputReconciliationByAssetClassDomain_a5eb3437-3de6-4086-b221-6c89301f5f08" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FairValueAssetsMeasuredOnRecurringBasisUnobservableInputReconciliationByAssetClassDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_FairValueByAssetClassAxis_124b95cd-7adf-4c25-b34e-f6f2672becd1" xlink:to="loc_us-gaap_FairValueAssetsMeasuredOnRecurringBasisUnobservableInputReconciliationByAssetClassDomain_a5eb3437-3de6-4086-b221-6c89301f5f08" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AuctionRateSecuritiesMember_593a16b7-3053-4d06-8950-a3998f4b211a" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AuctionRateSecuritiesMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueAssetsMeasuredOnRecurringBasisUnobservableInputReconciliationByAssetClassDomain_a5eb3437-3de6-4086-b221-6c89301f5f08" xlink:to="loc_us-gaap_AuctionRateSecuritiesMember_593a16b7-3053-4d06-8950-a3998f4b211a" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_USGovernmentSponsoredEnterprisesDebtSecuritiesMember_a23e1298-2042-4182-a2d8-022ad50adbc3" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_USGovernmentSponsoredEnterprisesDebtSecuritiesMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueAssetsMeasuredOnRecurringBasisUnobservableInputReconciliationByAssetClassDomain_a5eb3437-3de6-4086-b221-6c89301f5f08" xlink:to="loc_us-gaap_USGovernmentSponsoredEnterprisesDebtSecuritiesMember_a23e1298-2042-4182-a2d8-022ad50adbc3" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_USGovernmentAgenciesDebtSecuritiesMember_2b2fbecb-2e69-40af-95f1-88d430255461" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_USGovernmentAgenciesDebtSecuritiesMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueAssetsMeasuredOnRecurringBasisUnobservableInputReconciliationByAssetClassDomain_a5eb3437-3de6-4086-b221-6c89301f5f08" xlink:to="loc_us-gaap_USGovernmentAgenciesDebtSecuritiesMember_2b2fbecb-2e69-40af-95f1-88d430255461" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ValuationTechniqueAxis_999a4518-8c3d-4ac8-82d8-2417717ed95c" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ValuationTechniqueAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisValuationTechniquesTable_3ad99ed4-cdb3-4bac-9706-8ff4a184c6a4" xlink:to="loc_us-gaap_ValuationTechniqueAxis_999a4518-8c3d-4ac8-82d8-2417717ed95c" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ValuationTechniqueDomain_999a4518-8c3d-4ac8-82d8-2417717ed95c_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ValuationTechniqueDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_ValuationTechniqueAxis_999a4518-8c3d-4ac8-82d8-2417717ed95c" xlink:to="loc_us-gaap_ValuationTechniqueDomain_999a4518-8c3d-4ac8-82d8-2417717ed95c_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ValuationTechniqueDomain_5d5e403d-fcec-4345-b26c-69faec56a241" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ValuationTechniqueDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_ValuationTechniqueAxis_999a4518-8c3d-4ac8-82d8-2417717ed95c" xlink:to="loc_us-gaap_ValuationTechniqueDomain_5d5e403d-fcec-4345-b26c-69faec56a241" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_MarketApproachValuationTechniqueMember_708fc857-45a8-44fd-8cf6-30e6260628d0" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_MarketApproachValuationTechniqueMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ValuationTechniqueDomain_5d5e403d-fcec-4345-b26c-69faec56a241" xlink:to="loc_us-gaap_MarketApproachValuationTechniqueMember_708fc857-45a8-44fd-8cf6-30e6260628d0" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ValuationTechniqueDiscountedCashFlowMember_24360c5c-c478-4e77-8fa9-6952c2d81c76" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ValuationTechniqueDiscountedCashFlowMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ValuationTechniqueDomain_5d5e403d-fcec-4345-b26c-69faec56a241" xlink:to="loc_us-gaap_ValuationTechniqueDiscountedCashFlowMember_24360c5c-c478-4e77-8fa9-6952c2d81c76" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FairValueByMeasurementFrequencyAxis_1ff83c11-4dcd-4bf7-a5c0-8043c376acfe" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FairValueByMeasurementFrequencyAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisValuationTechniquesTable_3ad99ed4-cdb3-4bac-9706-8ff4a184c6a4" xlink:to="loc_us-gaap_FairValueByMeasurementFrequencyAxis_1ff83c11-4dcd-4bf7-a5c0-8043c376acfe" xlink:type="arc" order="6"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FairValueMeasurementFrequencyDomain_1ff83c11-4dcd-4bf7-a5c0-8043c376acfe_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FairValueMeasurementFrequencyDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_FairValueByMeasurementFrequencyAxis_1ff83c11-4dcd-4bf7-a5c0-8043c376acfe" xlink:to="loc_us-gaap_FairValueMeasurementFrequencyDomain_1ff83c11-4dcd-4bf7-a5c0-8043c376acfe_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FairValueMeasurementFrequencyDomain_66eacedc-94c7-4931-aa27-cc445f9b92fd" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FairValueMeasurementFrequencyDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_FairValueByMeasurementFrequencyAxis_1ff83c11-4dcd-4bf7-a5c0-8043c376acfe" xlink:to="loc_us-gaap_FairValueMeasurementFrequencyDomain_66eacedc-94c7-4931-aa27-cc445f9b92fd" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FairValueMeasurementsRecurringMember_81aa3226-9cae-431b-b6f7-f1405e1622c1" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FairValueMeasurementsRecurringMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueMeasurementFrequencyDomain_66eacedc-94c7-4931-aa27-cc445f9b92fd" xlink:to="loc_us-gaap_FairValueMeasurementsRecurringMember_81aa3226-9cae-431b-b6f7-f1405e1622c1" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FairValueByFairValueHierarchyLevelAxis_efd3d788-ddce-40cd-98a0-9800b1b563ec" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FairValueByFairValueHierarchyLevelAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisValuationTechniquesTable_3ad99ed4-cdb3-4bac-9706-8ff4a184c6a4" xlink:to="loc_us-gaap_FairValueByFairValueHierarchyLevelAxis_efd3d788-ddce-40cd-98a0-9800b1b563ec" xlink:type="arc" order="7"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FairValueMeasurementsFairValueHierarchyDomain_efd3d788-ddce-40cd-98a0-9800b1b563ec_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FairValueMeasurementsFairValueHierarchyDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_FairValueByFairValueHierarchyLevelAxis_efd3d788-ddce-40cd-98a0-9800b1b563ec" xlink:to="loc_us-gaap_FairValueMeasurementsFairValueHierarchyDomain_efd3d788-ddce-40cd-98a0-9800b1b563ec_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FairValueMeasurementsFairValueHierarchyDomain_22e82c33-0dc8-4e1c-931d-6e9db435dafe" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FairValueMeasurementsFairValueHierarchyDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_FairValueByFairValueHierarchyLevelAxis_efd3d788-ddce-40cd-98a0-9800b1b563ec" xlink:to="loc_us-gaap_FairValueMeasurementsFairValueHierarchyDomain_22e82c33-0dc8-4e1c-931d-6e9db435dafe" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FairValueInputsLevel3Member_069b4a6e-71b3-4337-8059-b7445c9f0c81" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FairValueInputsLevel3Member"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueMeasurementsFairValueHierarchyDomain_22e82c33-0dc8-4e1c-931d-6e9db435dafe" xlink:to="loc_us-gaap_FairValueInputsLevel3Member_069b4a6e-71b3-4337-8059-b7445c9f0c81" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_ProductOrServiceAxis_c37d8c94-12b5-4572-8eb5-f5ccbe98bee0" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_ProductOrServiceAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisValuationTechniquesTable_3ad99ed4-cdb3-4bac-9706-8ff4a184c6a4" xlink:to="loc_srt_ProductOrServiceAxis_c37d8c94-12b5-4572-8eb5-f5ccbe98bee0" xlink:type="arc" order="8"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_ProductsAndServicesDomain_c37d8c94-12b5-4572-8eb5-f5ccbe98bee0_default" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_ProductsAndServicesDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_srt_ProductOrServiceAxis_c37d8c94-12b5-4572-8eb5-f5ccbe98bee0" xlink:to="loc_srt_ProductsAndServicesDomain_c37d8c94-12b5-4572-8eb5-f5ccbe98bee0_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_ProductsAndServicesDomain_af783590-4708-4947-b317-777e985d3de4" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_ProductsAndServicesDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_srt_ProductOrServiceAxis_c37d8c94-12b5-4572-8eb5-f5ccbe98bee0" xlink:to="loc_srt_ProductsAndServicesDomain_af783590-4708-4947-b317-777e985d3de4" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_FloatingInterestRateMember_5976c7b9-f638-4e45-a670-49216d2b565b" xlink:href="agm-20240331.xsd#agm_FloatingInterestRateMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_ProductsAndServicesDomain_af783590-4708-4947-b317-777e985d3de4" xlink:to="loc_agm_FloatingInterestRateMember_5976c7b9-f638-4e45-a670-49216d2b565b" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinancialInstrumentAxis_9f3f5996-4582-41dd-a96f-7ec3d137b9ef" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FinancialInstrumentAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisValuationTechniquesTable_3ad99ed4-cdb3-4bac-9706-8ff4a184c6a4" xlink:to="loc_us-gaap_FinancialInstrumentAxis_9f3f5996-4582-41dd-a96f-7ec3d137b9ef" xlink:type="arc" order="9"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_9f3f5996-4582-41dd-a96f-7ec3d137b9ef_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_FinancialInstrumentAxis_9f3f5996-4582-41dd-a96f-7ec3d137b9ef" xlink:to="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_9f3f5996-4582-41dd-a96f-7ec3d137b9ef_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_7a2a06b0-6a87-496c-bbd4-08f1d1496c1f" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_FinancialInstrumentAxis_9f3f5996-4582-41dd-a96f-7ec3d137b9ef" xlink:to="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_7a2a06b0-6a87-496c-bbd4-08f1d1496c1f" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AuctionRateSecuritiesMember_794b01f3-a121-4590-8fde-7b82fc977dfa" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AuctionRateSecuritiesMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_7a2a06b0-6a87-496c-bbd4-08f1d1496c1f" xlink:to="loc_us-gaap_AuctionRateSecuritiesMember_794b01f3-a121-4590-8fde-7b82fc977dfa" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_USGovernmentSponsoredEnterprisesDebtSecuritiesMember_fbe4fd5a-6e50-4785-8f74-adccade18369" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_USGovernmentSponsoredEnterprisesDebtSecuritiesMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_7a2a06b0-6a87-496c-bbd4-08f1d1496c1f" xlink:to="loc_us-gaap_USGovernmentSponsoredEnterprisesDebtSecuritiesMember_fbe4fd5a-6e50-4785-8f74-adccade18369" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleExcludingAccruedInterest_e23ae041-a05b-494e-ba0c-3777afc47c6d" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtSecuritiesAvailableForSaleExcludingAccruedInterest"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisValuationTechniquesLineItems_5f2205cf-7c0b-4f3c-a594-5bd900b98800" xlink:to="loc_us-gaap_DebtSecuritiesAvailableForSaleExcludingAccruedInterest_e23ae041-a05b-494e-ba0c-3777afc47c6d" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TradingSecuritiesDebt_aab2924d-011d-41bf-9050-0947c619e865" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_TradingSecuritiesDebt"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisValuationTechniquesLineItems_5f2205cf-7c0b-4f3c-a594-5bd900b98800" xlink:to="loc_us-gaap_TradingSecuritiesDebt_aab2924d-011d-41bf-9050-0947c619e865" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_GuaranteeAsset_6b66598f-0d2f-493d-9939-43fbc293de41" xlink:href="agm-20240331.xsd#agm_GuaranteeAsset"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisValuationTechniquesLineItems_5f2205cf-7c0b-4f3c-a594-5bd900b98800" xlink:to="loc_agm_GuaranteeAsset_6b66598f-0d2f-493d-9939-43fbc293de41" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleMeasurementInput_db7bb6e4-12f7-409c-8b18-94a2d696d726" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtSecuritiesAvailableForSaleMeasurementInput"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisValuationTechniquesLineItems_5f2205cf-7c0b-4f3c-a594-5bd900b98800" xlink:to="loc_us-gaap_DebtSecuritiesAvailableForSaleMeasurementInput_db7bb6e4-12f7-409c-8b18-94a2d696d726" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesTradingMeasurementInput_93079908-bc6e-4d40-be18-3a6600b59fd1" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtSecuritiesTradingMeasurementInput"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisValuationTechniquesLineItems_5f2205cf-7c0b-4f3c-a594-5bd900b98800" xlink:to="loc_us-gaap_DebtSecuritiesTradingMeasurementInput_93079908-bc6e-4d40-be18-3a6600b59fd1" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_GuaranteeAssetMeasurementInput_f533a6da-b6b1-4f21-905d-461f0f6e59d9" xlink:href="agm-20240331.xsd#agm_GuaranteeAssetMeasurementInput"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisValuationTechniquesLineItems_5f2205cf-7c0b-4f3c-a594-5bd900b98800" xlink:to="loc_agm_GuaranteeAssetMeasurementInput_f533a6da-b6b1-4f21-905d-461f0f6e59d9" xlink:type="arc" order="5"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.farmermac.com/role/FAIRVALUEDISCLOSURESSummaryofCarryingValueandFairValueDetails" xlink:type="simple" xlink:href="agm-20240331.xsd#FAIRVALUEDISCLOSURESSummaryofCarryingValueandFairValueDetails"/>
  <link:definitionLink xlink:role="http://www.farmermac.com/role/FAIRVALUEDISCLOSURESSummaryofCarryingValueandFairValueDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FairValueBalanceSheetGroupingFinancialStatementCaptionsLineItems_e0afd930-bbc1-46e5-bcc2-e84f7cc21f32" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FairValueBalanceSheetGroupingFinancialStatementCaptionsLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FairValueByBalanceSheetGroupingTable_47644f5e-66f4-4de6-a488-b0119f7b1bf3" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FairValueByBalanceSheetGroupingTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_FairValueBalanceSheetGroupingFinancialStatementCaptionsLineItems_e0afd930-bbc1-46e5-bcc2-e84f7cc21f32" xlink:to="loc_us-gaap_FairValueByBalanceSheetGroupingTable_47644f5e-66f4-4de6-a488-b0119f7b1bf3" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FairValueByMeasurementBasisAxis_eba00da0-7731-483a-9f67-c768a8e1a6ea" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FairValueByMeasurementBasisAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_FairValueByBalanceSheetGroupingTable_47644f5e-66f4-4de6-a488-b0119f7b1bf3" xlink:to="loc_us-gaap_FairValueByMeasurementBasisAxis_eba00da0-7731-483a-9f67-c768a8e1a6ea" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PortionAtFairValueFairValueDisclosureMember_eba00da0-7731-483a-9f67-c768a8e1a6ea_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PortionAtFairValueFairValueDisclosureMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_FairValueByMeasurementBasisAxis_eba00da0-7731-483a-9f67-c768a8e1a6ea" xlink:to="loc_us-gaap_PortionAtFairValueFairValueDisclosureMember_eba00da0-7731-483a-9f67-c768a8e1a6ea_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FairValueDisclosureItemAmountsDomain_77053d1a-2083-4441-8847-27fe46aae20e" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FairValueDisclosureItemAmountsDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_FairValueByMeasurementBasisAxis_eba00da0-7731-483a-9f67-c768a8e1a6ea" xlink:to="loc_us-gaap_FairValueDisclosureItemAmountsDomain_77053d1a-2083-4441-8847-27fe46aae20e" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PortionAtFairValueFairValueDisclosureMember_1e25b829-09b3-4a7c-9769-124dd6e4a9db" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PortionAtFairValueFairValueDisclosureMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueDisclosureItemAmountsDomain_77053d1a-2083-4441-8847-27fe46aae20e" xlink:to="loc_us-gaap_PortionAtFairValueFairValueDisclosureMember_1e25b829-09b3-4a7c-9769-124dd6e4a9db" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EstimateOfFairValueFairValueDisclosureMember_666957e1-0db1-4579-a2fb-6465538385d9" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_EstimateOfFairValueFairValueDisclosureMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_PortionAtFairValueFairValueDisclosureMember_1e25b829-09b3-4a7c-9769-124dd6e4a9db" xlink:to="loc_us-gaap_EstimateOfFairValueFairValueDisclosureMember_666957e1-0db1-4579-a2fb-6465538385d9" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CarryingReportedAmountFairValueDisclosureMember_d315aa78-1f22-4bee-b10b-2c6ca4c383a1" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_CarryingReportedAmountFairValueDisclosureMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_PortionAtFairValueFairValueDisclosureMember_1e25b829-09b3-4a7c-9769-124dd6e4a9db" xlink:to="loc_us-gaap_CarryingReportedAmountFairValueDisclosureMember_d315aa78-1f22-4bee-b10b-2c6ca4c383a1" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinancialInstrumentAxis_4abf641e-6df2-4efe-9ed2-55c12906415b" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FinancialInstrumentAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_FairValueByBalanceSheetGroupingTable_47644f5e-66f4-4de6-a488-b0119f7b1bf3" xlink:to="loc_us-gaap_FinancialInstrumentAxis_4abf641e-6df2-4efe-9ed2-55c12906415b" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_4abf641e-6df2-4efe-9ed2-55c12906415b_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_FinancialInstrumentAxis_4abf641e-6df2-4efe-9ed2-55c12906415b" xlink:to="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_4abf641e-6df2-4efe-9ed2-55c12906415b_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_d2b93b0a-3820-448a-8454-860e0947ef9c" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_FinancialInstrumentAxis_4abf641e-6df2-4efe-9ed2-55c12906415b" xlink:to="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_d2b93b0a-3820-448a-8454-860e0947ef9c" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesMember_a4c62fef-18c5-414c-aedc-5642af610f2f" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtSecuritiesMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_d2b93b0a-3820-448a-8454-860e0947ef9c" xlink:to="loc_us-gaap_DebtSecuritiesMember_a4c62fef-18c5-414c-aedc-5642af610f2f" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_USGovernmentSponsoredEnterprisesDebtSecuritiesMember_cd200123-649c-4f26-bac4-5fff5618c61a" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_USGovernmentSponsoredEnterprisesDebtSecuritiesMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_d2b93b0a-3820-448a-8454-860e0947ef9c" xlink:to="loc_us-gaap_USGovernmentSponsoredEnterprisesDebtSecuritiesMember_cd200123-649c-4f26-bac4-5fff5618c61a" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_USGovernmentAgenciesDebtSecuritiesMember_ec713d44-76c6-4a1c-b138-13148b641cd5" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_USGovernmentAgenciesDebtSecuritiesMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_d2b93b0a-3820-448a-8454-860e0947ef9c" xlink:to="loc_us-gaap_USGovernmentAgenciesDebtSecuritiesMember_ec713d44-76c6-4a1c-b138-13148b641cd5" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinancialInstrumentsFinancialAssetsBalanceSheetGroupingsAbstract_9f9884b9-a017-4f7b-a734-32b0a5c01da8" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FinancialInstrumentsFinancialAssetsBalanceSheetGroupingsAbstract"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueBalanceSheetGroupingFinancialStatementCaptionsLineItems_e0afd930-bbc1-46e5-bcc2-e84f7cc21f32" xlink:to="loc_us-gaap_FinancialInstrumentsFinancialAssetsBalanceSheetGroupingsAbstract_9f9884b9-a017-4f7b-a734-32b0a5c01da8" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CashAndCashEquivalentsFairValueDisclosure_376b513d-e2f1-4f5c-b14e-db3bce0cc92a" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_CashAndCashEquivalentsFairValueDisclosure"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FinancialInstrumentsFinancialAssetsBalanceSheetGroupingsAbstract_9f9884b9-a017-4f7b-a734-32b0a5c01da8" xlink:to="loc_us-gaap_CashAndCashEquivalentsFairValueDisclosure_376b513d-e2f1-4f5c-b14e-db3bce0cc92a" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_MarketableSecuritiesFairValueDisclosure_f94030f0-e70e-420c-b7d2-9e298f572628" xlink:href="agm-20240331.xsd#agm_MarketableSecuritiesFairValueDisclosure"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FinancialInstrumentsFinancialAssetsBalanceSheetGroupingsAbstract_9f9884b9-a017-4f7b-a734-32b0a5c01da8" xlink:to="loc_agm_MarketableSecuritiesFairValueDisclosure_f94030f0-e70e-420c-b7d2-9e298f572628" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LoansReceivableFairValueDisclosure_2d4fe224-877e-46f0-baa0-8c87ab68b15b" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LoansReceivableFairValueDisclosure"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FinancialInstrumentsFinancialAssetsBalanceSheetGroupingsAbstract_9f9884b9-a017-4f7b-a734-32b0a5c01da8" xlink:to="loc_us-gaap_LoansReceivableFairValueDisclosure_2d4fe224-877e-46f0-baa0-8c87ab68b15b" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeAssets_9e3b9e1f-ad02-400b-b881-6f531e8e55e5" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DerivativeAssets"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FinancialInstrumentsFinancialAssetsBalanceSheetGroupingsAbstract_9f9884b9-a017-4f7b-a734-32b0a5c01da8" xlink:to="loc_us-gaap_DerivativeAssets_9e3b9e1f-ad02-400b-b881-6f531e8e55e5" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_GuarantyAssets_364a1579-0540-44e2-9e99-a6b76e4e3638" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_GuarantyAssets"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FinancialInstrumentsFinancialAssetsBalanceSheetGroupingsAbstract_9f9884b9-a017-4f7b-a734-32b0a5c01da8" xlink:to="loc_us-gaap_GuarantyAssets_364a1579-0540-44e2-9e99-a6b76e4e3638" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinancialInstrumentsFinancialLiabilitiesBalanceSheetGroupingsAbstract_86916486-e644-4d6d-8a6d-250e226dd939" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FinancialInstrumentsFinancialLiabilitiesBalanceSheetGroupingsAbstract"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueBalanceSheetGroupingFinancialStatementCaptionsLineItems_e0afd930-bbc1-46e5-bcc2-e84f7cc21f32" xlink:to="loc_us-gaap_FinancialInstrumentsFinancialLiabilitiesBalanceSheetGroupingsAbstract_86916486-e644-4d6d-8a6d-250e226dd939" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NotesPayableFairValueDisclosure_a99d8168-8aa0-4878-99e4-252bf8db542b" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_NotesPayableFairValueDisclosure"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FinancialInstrumentsFinancialLiabilitiesBalanceSheetGroupingsAbstract_86916486-e644-4d6d-8a6d-250e226dd939" xlink:to="loc_us-gaap_NotesPayableFairValueDisclosure_a99d8168-8aa0-4878-99e4-252bf8db542b" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_VariableInterestEntityConsolidatedFairValueDisclosureLiabilities_135b76b7-29dd-461f-b16a-668ca33416df" xlink:href="agm-20240331.xsd#agm_VariableInterestEntityConsolidatedFairValueDisclosureLiabilities"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FinancialInstrumentsFinancialLiabilitiesBalanceSheetGroupingsAbstract_86916486-e644-4d6d-8a6d-250e226dd939" xlink:to="loc_agm_VariableInterestEntityConsolidatedFairValueDisclosureLiabilities_135b76b7-29dd-461f-b16a-668ca33416df" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeLiabilities_d4a00f36-d2e7-460b-b8ac-88b3b2d9e93b" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DerivativeLiabilities"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FinancialInstrumentsFinancialLiabilitiesBalanceSheetGroupingsAbstract_86916486-e644-4d6d-8a6d-250e226dd939" xlink:to="loc_us-gaap_DerivativeLiabilities_d4a00f36-d2e7-460b-b8ac-88b3b2d9e93b" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_GuarantyLiabilities_dbd5e666-68b2-4702-9c70-dff0524f26e8" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_GuarantyLiabilities"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FinancialInstrumentsFinancialLiabilitiesBalanceSheetGroupingsAbstract_86916486-e644-4d6d-8a6d-250e226dd939" xlink:to="loc_us-gaap_GuarantyLiabilities_dbd5e666-68b2-4702-9c70-dff0524f26e8" xlink:type="arc" order="4"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.farmermac.com/role/BUSINESSSEGMENTREPORTINGDetails" xlink:type="simple" xlink:href="agm-20240331.xsd#BUSINESSSEGMENTREPORTINGDetails"/>
  <link:definitionLink xlink:role="http://www.farmermac.com/role/BUSINESSSEGMENTREPORTINGDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SegmentReportingInformationLineItems_9322601d-453d-4cd9-a80f-bea6c15af42b" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SegmentReportingInformationLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable_3eb7f052-3be4-48d1-9caa-271882963787" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_SegmentReportingInformationLineItems_9322601d-453d-4cd9-a80f-bea6c15af42b" xlink:to="loc_us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable_3eb7f052-3be4-48d1-9caa-271882963787" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StatementBusinessSegmentsAxis_3c4853e5-7cd1-4412-97a6-183af2e60632" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_StatementBusinessSegmentsAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable_3eb7f052-3be4-48d1-9caa-271882963787" xlink:to="loc_us-gaap_StatementBusinessSegmentsAxis_3c4853e5-7cd1-4412-97a6-183af2e60632" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SegmentDomain_3c4853e5-7cd1-4412-97a6-183af2e60632_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SegmentDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementBusinessSegmentsAxis_3c4853e5-7cd1-4412-97a6-183af2e60632" xlink:to="loc_us-gaap_SegmentDomain_3c4853e5-7cd1-4412-97a6-183af2e60632_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SegmentDomain_74c91f46-6642-4b08-ba50-73e0dcdf5e29" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SegmentDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementBusinessSegmentsAxis_3c4853e5-7cd1-4412-97a6-183af2e60632" xlink:to="loc_us-gaap_SegmentDomain_74c91f46-6642-4b08-ba50-73e0dcdf5e29" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_AgriculturalFinanceMember_1722e280-08c8-4970-a60d-b2c72b9335b4" xlink:href="agm-20240331.xsd#agm_AgriculturalFinanceMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_74c91f46-6642-4b08-ba50-73e0dcdf5e29" xlink:to="loc_agm_AgriculturalFinanceMember_1722e280-08c8-4970-a60d-b2c72b9335b4" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_AgricultureFinanceFarmAndRanchSegmentMember_09dd5dc0-360e-4333-a3dc-c0cc2454edb2" xlink:href="agm-20240331.xsd#agm_AgricultureFinanceFarmAndRanchSegmentMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_agm_AgriculturalFinanceMember_1722e280-08c8-4970-a60d-b2c72b9335b4" xlink:to="loc_agm_AgricultureFinanceFarmAndRanchSegmentMember_09dd5dc0-360e-4333-a3dc-c0cc2454edb2" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_AgricultureFinanceCorporateAgFinanceSegmentMember_ca94b06e-8342-4832-999e-60dffd39ba6e" xlink:href="agm-20240331.xsd#agm_AgricultureFinanceCorporateAgFinanceSegmentMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_agm_AgriculturalFinanceMember_1722e280-08c8-4970-a60d-b2c72b9335b4" xlink:to="loc_agm_AgricultureFinanceCorporateAgFinanceSegmentMember_ca94b06e-8342-4832-999e-60dffd39ba6e" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_RuralInfrastructureFinanceMember_db826280-b411-4b7b-886a-424143f5b201" xlink:href="agm-20240331.xsd#agm_RuralInfrastructureFinanceMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_74c91f46-6642-4b08-ba50-73e0dcdf5e29" xlink:to="loc_agm_RuralInfrastructureFinanceMember_db826280-b411-4b7b-886a-424143f5b201" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_RuralInfrastructureRuralUtilitiesSegementMember_1c60c4fa-6fd0-4ef2-8098-2e98b8ae73c6" xlink:href="agm-20240331.xsd#agm_RuralInfrastructureRuralUtilitiesSegementMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_agm_RuralInfrastructureFinanceMember_db826280-b411-4b7b-886a-424143f5b201" xlink:to="loc_agm_RuralInfrastructureRuralUtilitiesSegementMember_1c60c4fa-6fd0-4ef2-8098-2e98b8ae73c6" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_RuralInfrastructureRenewableEnergySegmentMember_bc1b3356-f07a-4a54-b1b9-39c02d73f2ab" xlink:href="agm-20240331.xsd#agm_RuralInfrastructureRenewableEnergySegmentMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_agm_RuralInfrastructureFinanceMember_db826280-b411-4b7b-886a-424143f5b201" xlink:to="loc_agm_RuralInfrastructureRenewableEnergySegmentMember_bc1b3356-f07a-4a54-b1b9-39c02d73f2ab" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_TreasuryFundingSegmentMember_9e0e795a-a416-44f7-ac6c-865636f94c80" xlink:href="agm-20240331.xsd#agm_TreasuryFundingSegmentMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_74c91f46-6642-4b08-ba50-73e0dcdf5e29" xlink:to="loc_agm_TreasuryFundingSegmentMember_9e0e795a-a416-44f7-ac6c-865636f94c80" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_TreasuryInvestmentsSegmentMember_2d163328-92a9-435e-9139-57f11c0c0bd1" xlink:href="agm-20240331.xsd#agm_TreasuryInvestmentsSegmentMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_74c91f46-6642-4b08-ba50-73e0dcdf5e29" xlink:to="loc_agm_TreasuryInvestmentsSegmentMember_2d163328-92a9-435e-9139-57f11c0c0bd1" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CorporateMember_808b477a-e00a-4379-aaa8-5c97d88a8760" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_CorporateMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_74c91f46-6642-4b08-ba50-73e0dcdf5e29" xlink:to="loc_us-gaap_CorporateMember_808b477a-e00a-4379-aaa8-5c97d88a8760" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_ConsolidationItemsAxis_63c2d44f-3d14-408d-bdcd-3e71209462e0" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_ConsolidationItemsAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable_3eb7f052-3be4-48d1-9caa-271882963787" xlink:to="loc_srt_ConsolidationItemsAxis_63c2d44f-3d14-408d-bdcd-3e71209462e0" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_ConsolidationItemsDomain_63c2d44f-3d14-408d-bdcd-3e71209462e0_default" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_ConsolidationItemsDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_srt_ConsolidationItemsAxis_63c2d44f-3d14-408d-bdcd-3e71209462e0" xlink:to="loc_srt_ConsolidationItemsDomain_63c2d44f-3d14-408d-bdcd-3e71209462e0_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_ConsolidationItemsDomain_27671a21-926f-4f48-8d52-642621cc590f" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_ConsolidationItemsDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_srt_ConsolidationItemsAxis_63c2d44f-3d14-408d-bdcd-3e71209462e0" xlink:to="loc_srt_ConsolidationItemsDomain_27671a21-926f-4f48-8d52-642621cc590f" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingSegmentsMember_86f34621-813f-41da-a58f-90dfbbb0b48f" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OperatingSegmentsMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_ConsolidationItemsDomain_27671a21-926f-4f48-8d52-642621cc590f" xlink:to="loc_us-gaap_OperatingSegmentsMember_86f34621-813f-41da-a58f-90dfbbb0b48f" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_MaterialReconcilingItemsMember_c2d3e4f0-4ac6-4b2d-9edf-2bbec2ed82e6" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_MaterialReconcilingItemsMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_ConsolidationItemsDomain_27671a21-926f-4f48-8d52-642621cc590f" xlink:to="loc_us-gaap_MaterialReconcilingItemsMember_c2d3e4f0-4ac6-4b2d-9edf-2bbec2ed82e6" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SegmentReportingInformationProfitLossAbstract_aaaf72fd-0766-4ff9-ab63-4d10b56cd5b4" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SegmentReportingInformationProfitLossAbstract"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentReportingInformationLineItems_9322601d-453d-4cd9-a80f-bea6c15af42b" xlink:to="loc_us-gaap_SegmentReportingInformationProfitLossAbstract_aaaf72fd-0766-4ff9-ab63-4d10b56cd5b4" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InterestIncomeExpenseNet_320a6a9c-ac1e-48da-bdcc-753b173a5033" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_InterestIncomeExpenseNet"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentReportingInformationProfitLossAbstract_aaaf72fd-0766-4ff9-ab63-4d10b56cd5b4" xlink:to="loc_us-gaap_InterestIncomeExpenseNet_320a6a9c-ac1e-48da-bdcc-753b173a5033" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_ReconcilingAdjustmentsFromNetInterestIncomeToNetEffectiveSpreadNet_37b34a37-a4c7-4f19-9f0f-ae2cbdda8576" xlink:href="agm-20240331.xsd#agm_ReconcilingAdjustmentsFromNetInterestIncomeToNetEffectiveSpreadNet"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentReportingInformationProfitLossAbstract_aaaf72fd-0766-4ff9-ab63-4d10b56cd5b4" xlink:to="loc_agm_ReconcilingAdjustmentsFromNetInterestIncomeToNetEffectiveSpreadNet_37b34a37-a4c7-4f19-9f0f-ae2cbdda8576" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_NetEffectiveSpread_9ed4eb9f-4f12-47bf-9bdf-4fe1a4d7690c" xlink:href="agm-20240331.xsd#agm_NetEffectiveSpread"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentReportingInformationProfitLossAbstract_aaaf72fd-0766-4ff9-ab63-4d10b56cd5b4" xlink:to="loc_agm_NetEffectiveSpread_9ed4eb9f-4f12-47bf-9bdf-4fe1a4d7690c" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InvestmentBankingAdvisoryBrokerageAndUnderwritingFeesAndCommissions_a45dde93-4b2f-419a-a01e-db1ccf2ebe30" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_InvestmentBankingAdvisoryBrokerageAndUnderwritingFeesAndCommissions"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentReportingInformationProfitLossAbstract_aaaf72fd-0766-4ff9-ab63-4d10b56cd5b4" xlink:to="loc_us-gaap_InvestmentBankingAdvisoryBrokerageAndUnderwritingFeesAndCommissions_a45dde93-4b2f-419a-a01e-db1ccf2ebe30" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_OtherNonInterestIncomeExpenseExcludingGuaranteeAndCommitmentFees_bfc9b912-9071-4a44-b47f-676d5a86f2df" xlink:href="agm-20240331.xsd#agm_OtherNonInterestIncomeExpenseExcludingGuaranteeAndCommitmentFees"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentReportingInformationProfitLossAbstract_aaaf72fd-0766-4ff9-ab63-4d10b56cd5b4" xlink:to="loc_agm_OtherNonInterestIncomeExpenseExcludingGuaranteeAndCommitmentFees_bfc9b912-9071-4a44-b47f-676d5a86f2df" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_NoninterestIncomeExcludingProvisionForOtherCreditLosses_fbe828b4-ae6d-423a-9d23-45c7a1e610ce" xlink:href="agm-20240331.xsd#agm_NoninterestIncomeExcludingProvisionForOtherCreditLosses"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentReportingInformationProfitLossAbstract_aaaf72fd-0766-4ff9-ab63-4d10b56cd5b4" xlink:to="loc_agm_NoninterestIncomeExcludingProvisionForOtherCreditLosses_fbe828b4-ae6d-423a-9d23-45c7a1e610ce" xlink:type="arc" order="6"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_ProvisionForLoanAndSecuritiesLosses_dbb144f9-735b-4b0b-9819-587c1070366a" xlink:href="agm-20240331.xsd#agm_ProvisionForLoanAndSecuritiesLosses"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentReportingInformationProfitLossAbstract_aaaf72fd-0766-4ff9-ab63-4d10b56cd5b4" xlink:to="loc_agm_ProvisionForLoanAndSecuritiesLosses_dbb144f9-735b-4b0b-9819-587c1070366a" xlink:type="arc" order="7"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProvisionForOtherCreditLosses_72228261-db74-4b90-8d31-c91e22fac646" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ProvisionForOtherCreditLosses"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentReportingInformationProfitLossAbstract_aaaf72fd-0766-4ff9-ab63-4d10b56cd5b4" xlink:to="loc_us-gaap_ProvisionForOtherCreditLosses_72228261-db74-4b90-8d31-c91e22fac646" xlink:type="arc" order="8"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_NoninterestExpenseExcludingLoanLeaseAndOtherLosses_a99dc2fd-2891-422f-b432-a25763e6388d" xlink:href="agm-20240331.xsd#agm_NoninterestExpenseExcludingLoanLeaseAndOtherLosses"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentReportingInformationProfitLossAbstract_aaaf72fd-0766-4ff9-ab63-4d10b56cd5b4" xlink:to="loc_agm_NoninterestExpenseExcludingLoanLeaseAndOtherLosses_a99dc2fd-2891-422f-b432-a25763e6388d" xlink:type="arc" order="9"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NoninterestExpense_6e8b2f2e-2d7c-4296-ba8d-c2740ca85cfa" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_NoninterestExpense"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentReportingInformationProfitLossAbstract_aaaf72fd-0766-4ff9-ab63-4d10b56cd5b4" xlink:to="loc_us-gaap_NoninterestExpense_6e8b2f2e-2d7c-4296-ba8d-c2740ca85cfa" xlink:type="arc" order="10"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_SegmentCoreEarningsBeforeIncomeTaxes_2dadd623-eca9-49c2-8d1d-4e7d328fe3e0" xlink:href="agm-20240331.xsd#agm_SegmentCoreEarningsBeforeIncomeTaxes"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentReportingInformationProfitLossAbstract_aaaf72fd-0766-4ff9-ab63-4d10b56cd5b4" xlink:to="loc_agm_SegmentCoreEarningsBeforeIncomeTaxes_2dadd623-eca9-49c2-8d1d-4e7d328fe3e0" xlink:type="arc" order="11"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeTaxExpenseBenefit_1533adc3-e424-471a-a51b-5b01464b14f9" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_IncomeTaxExpenseBenefit"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentReportingInformationProfitLossAbstract_aaaf72fd-0766-4ff9-ab63-4d10b56cd5b4" xlink:to="loc_us-gaap_IncomeTaxExpenseBenefit_1533adc3-e424-471a-a51b-5b01464b14f9" xlink:type="arc" order="12"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_SegmentCoreEarningsBeforePreferredStockDividendsAndAttributionOfIncomeToNonControllingInterestPreferredStockDividends_28a04d53-10d4-4a1e-8fd2-810ff7dc3328" xlink:href="agm-20240331.xsd#agm_SegmentCoreEarningsBeforePreferredStockDividendsAndAttributionOfIncomeToNonControllingInterestPreferredStockDividends"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentReportingInformationProfitLossAbstract_aaaf72fd-0766-4ff9-ab63-4d10b56cd5b4" xlink:to="loc_agm_SegmentCoreEarningsBeforePreferredStockDividendsAndAttributionOfIncomeToNonControllingInterestPreferredStockDividends_28a04d53-10d4-4a1e-8fd2-810ff7dc3328" xlink:type="arc" order="13"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PreferredStockDividendsIncomeStatementImpact_ac530fd2-85c5-4084-a455-48468156b4e7" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PreferredStockDividendsIncomeStatementImpact"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentReportingInformationProfitLossAbstract_aaaf72fd-0766-4ff9-ab63-4d10b56cd5b4" xlink:to="loc_us-gaap_PreferredStockDividendsIncomeStatementImpact_ac530fd2-85c5-4084-a455-48468156b4e7" xlink:type="arc" order="14"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_SegmentCoreEarnings_86fb50b6-44dd-4090-b92f-4f55ff2eb25f" xlink:href="agm-20240331.xsd#agm_SegmentCoreEarnings"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentReportingInformationProfitLossAbstract_aaaf72fd-0766-4ff9-ab63-4d10b56cd5b4" xlink:to="loc_agm_SegmentCoreEarnings_86fb50b6-44dd-4090-b92f-4f55ff2eb25f" xlink:type="arc" order="15"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Assets_1b988a91-1b3e-4baa-b01d-47f8aefa9981" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_Assets"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentReportingInformationProfitLossAbstract_aaaf72fd-0766-4ff9-ab63-4d10b56cd5b4" xlink:to="loc_us-gaap_Assets_1b988a91-1b3e-4baa-b01d-47f8aefa9981" xlink:type="arc" order="16"/>
    <link:loc xlink:type="locator" xlink:label="loc_agm_OnAndOffBalanceSheetProgramAssetsAtPrincipalBalance_227ee00a-9c3d-4027-bc11-15b37586d980" xlink:href="agm-20240331.xsd#agm_OnAndOffBalanceSheetProgramAssetsAtPrincipalBalance"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentReportingInformationProfitLossAbstract_aaaf72fd-0766-4ff9-ab63-4d10b56cd5b4" xlink:to="loc_agm_OnAndOffBalanceSheetProgramAssetsAtPrincipalBalance_227ee00a-9c3d-4027-bc11-15b37586d980" xlink:type="arc" order="17"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://fasb.org/us-gaap/role/eedm/ExtensibleEnumerationLists" xlink:type="simple" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-roles-2023.xsd#eedm"/>
  <link:definitionLink xlink:role="http://fasb.org/us-gaap/role/eedm/ExtensibleEnumerationLists" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AssetsAbstract" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AssetsAbstract"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InterestReceivable" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_InterestReceivable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AssetsAbstract" xlink:to="loc_us-gaap_InterestReceivable" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeStatementAbstract" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_IncomeStatementAbstract"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetIncomeLoss" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_NetIncomeLoss"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncomeStatementAbstract" xlink:to="loc_us-gaap_NetIncomeLoss" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StatementOfOtherComprehensiveIncomeAbstract" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_StatementOfOtherComprehensiveIncomeAbstract"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ComprehensiveIncomeNetOfTax" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ComprehensiveIncomeNetOfTax"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementOfOtherComprehensiveIncomeAbstract" xlink:to="loc_us-gaap_ComprehensiveIncomeNetOfTax" xlink:type="arc" order="1"/>
  </link:definitionLink>
</link:linkbase>
